Commit Graph

366 Commits

Author SHA1 Message Date
Michael Vines 0c9ca5522c Bump version to v1.7.0 2021-03-13 09:01:21 +00:00
Trent Nelson 79ac1997de sdk: add macro for unchecked div with const denominator 2021-03-11 08:44:36 +00:00
Trent Nelson 24d18b3cf2 docs: add docs links for crates published to crates.io 2021-03-11 08:38:18 +00:00
Tyera Eulberg e3e8179f2d
Sdk: start to appease clippy's integer arithmetic check (#15736)
* Move to module-level clippy allowance

* Fix stake_weighted_timestamp math

* Fix genesis_config

* Fix shred_version

* Fix hard_forks

* Fix process_instruction

* Add ArithmeticOverflow ix error

* Fix nonce_keyed_account

* Update BankSlotDelta frozen abi due to new ix error
2021-03-08 18:37:57 -07:00
Jack May b53cb8eb2d
Deprecate Instruction::new (#15695) 2021-03-04 05:46:48 +00:00
Jack May 4a05210d8e
Clarify Instruction::new (#15686)
Not related to local-cluster, merging
2021-03-03 17:39:04 -08:00
sakridge 8399851d11
check program owners (#15495)
* check program owners

* BankSlotDelta should change because InstructionError variant added

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-02-26 22:21:34 +00:00
Michael Vines fd3b71a2c6 cargo fmt 2021-02-19 20:08:41 -08:00
Michael Vines 995bd0cb6b Rename IOError to BorshIoError 2021-02-19 10:54:39 -08:00
Jon Cinque 0f6f6080f3
sdk: Add Borsh support for types and utilities (#15290)
* sdk: Add Borsh to Pubkey

* Add serialization error for easier borsh integration

* Add Borsh usage to banks-client and sdk

* Rename SerializationError -> IOError

* Add new errors to proto

* Update Cargo lock

* Update Cargo.lock based on CI

* Clippy

* Update ABI on bank

* Address review feedback

* Update sanity program instruction count test
2021-02-18 11:14:56 +01:00
Trent Nelson 7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
Jon Cinque 3ac7e09de6
docs: Remove references to "create_address_with_seed" (#15339) 2021-02-17 14:25:02 +01:00
Tyera Eulberg 7e17a0d3bb Move fn to sdk 2021-02-16 19:25:00 -08:00
Trent Nelson 1a20ab968f sdk: sanitize `Hash` base58 input 2021-02-13 08:40:35 +00:00
Jack May d24d5fba0e
Upgradeable loader max_data_len limit (#15039) 2021-02-03 09:16:25 -08:00
dependabot[bot] 1df93fa2be
chore: bump serde from 1.0.112 to 1.0.118 (#14828)
* chore: bump serde from 1.0.112 to 1.0.122

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.122.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.122)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Update frozen_abi digest following serde update

* Revert "chore: bump serde from 1.0.112 to 1.0.122"

This reverts commit a3ef4442a4c985144ae2bd7ceaf8899a7ab8d7c0.

* Revert "[auto-commit] Update all Cargo lock files"

This reverts commit c41c3b005fb1ccade55155302c52cd5736c4b55f.

* chore: bump serde from 1.0.112 to 1.0.118

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.118)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Remove serum-dex pinning

* blind commit!

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-02-02 23:28:16 +09:00
Jack May 07cef5a557
Buffer authority must match upgrade authority for deploys and upgrades (#14923) 2021-01-29 12:43:42 -08:00
Jack May 4a4881d30f
Update find_program_address docs (#14840) 2021-01-25 16:03:26 -08:00
Michael Vines cbffab7850 Upgrade to Rust v1.49.0 2021-01-23 19:16:36 -08:00
sakridge 191193289f
Upgrade sha2 to 0.9.3 (#14746) 2021-01-22 22:25:22 -08:00
Michael Vines bf1943e489 Add solana-test-validator --warp-slot argument 2021-01-22 21:17:02 -08:00
Trent Nelson 447e3de1f2 Nonce address doesn't sign AdvanceNonceAccount 2021-01-21 04:14:36 +00:00
Trent Nelson 250b3969d4 SDK: Sanitize base58 pubkey input 2021-01-20 23:59:26 +00:00
Jack May a480b63234
Bail on small deploy buffers (#14677) 2021-01-20 01:56:44 +00:00
Jack May e3bd9e5300
Prevent the invoke and upgrade of programs in the same tx batch (#14653)
* Prevent the invoke and upgrade of programs in the same tx batch

* Pass program address as writable in the upgrade instruction
2021-01-19 16:24:44 -08:00
Jack May 58487c6360
Add buffer authority to upgradeable loader (#14482) 2021-01-08 09:37:57 -08:00
Jeff Washington (jwash) 773b21b34e
consolidate DEFAULT_HASHES_PER_TICK (#14463) 2021-01-07 09:49:42 -06:00
Jeff Washington (jwash) 938d482135
consolidate constants related to time for future refactoring (#14440) 2021-01-07 09:49:24 -06:00
Jack May 5eacc5d08d
Enable program upgrades via CPI (#14449) 2021-01-06 14:31:14 -08:00
carllin 5affd8aa72
Add secondary indexes (#14212) 2020-12-31 18:06:03 -08:00
Michael Vines 1e977ac025 Bump version to v1.6.0 2020-12-15 18:28:04 +00:00
Jack May d513b0c4ca
Add Program loader/environment instruction errors (#14120) 2020-12-15 09:54:07 -08:00
Jack May ab98c1f2d4
Add try_find_program_address syscall (#14118) 2020-12-15 08:15:01 -08:00
Jack May 9e90394583
Upgradeable loader (#13689) 2020-12-14 15:35:10 -08:00
Michael Vines 7143aaa89b Clippy 2020-12-14 08:03:29 -08:00
Jack May 1d95b5476e
Add next_account_infos helper (#14087) 2020-12-12 20:12:56 -08:00
Jack May d9655ea507
Add message helpers to get program info (#14047) 2020-12-10 16:39:43 -08:00
Jack May 5ea80e673f
Fix priv escalation test (#14046) 2020-12-10 22:36:33 +00:00
Jack May 20c0e8793e
Rent account passed to loader can be read-only (#13997) 2020-12-07 19:44:32 +00:00
Jack May 3f841df7cf
Cap number of program address seeds (#13924) 2020-12-02 22:25:06 +00:00
Trent Nelson 17defbff13 Make `Accounts::is_non_loader_key()` a method on `Message` 2020-12-02 20:10:08 +00:00
Alexander Meißner aebc3a17ce
Fix undefined symbol "custom panic" in BPF test programs (#13840)
* Implements missing "custom_panic" symbol
2020-12-01 16:52:20 +01:00
Jack May 57dd60f671
Use msg! in program entrypoint (#13889) 2020-12-01 10:56:26 +00:00
Michael Vines 6705b5a98c Add msg! macro for program logging, deprecate info! macro 2020-11-30 20:39:42 -08:00
Tyera Eulberg 91f4e99b4c
Fix parsing CreateAccountWithSeed instructions (#13513)
* Reduce required num_system_accounts and handle 2-account instructions properly

* Update CreateAccountWithSeed account docs to be correct

* Add CreateAccountWithSeed test
2020-11-10 23:51:53 +00:00
Jack May c280d40b40
align cluster and sim logging as hex (#13484) 2020-11-10 02:43:20 +00:00
Jack May 461ae40eea
provide full Rust panic messages in BPF and add memory optimizations (#13455) 2020-11-09 13:40:26 -08:00
Tyera Eulberg 4c5f345798
Fix stake split rent-exempt adjustment (#13357)
* Add failing tests

* Fix stake split

* Calculate split rent-exempt-reserve and use

* Add comment in rent.rs

* Add tests for edge cases when splitting to larger accounts, and reject overflow splits

* Reframe InsufficientFunds checks in terms of lamports var

* Test hardening review comments
2020-11-06 20:32:05 +00:00
Michael Vines 8c4995b22b Improve invoke_signed() docs 2020-11-04 23:44:04 +00:00
Jack May f6a73098a4
Update sol_log_compute_units (#13360) 2020-11-03 08:16:31 -08:00
Tyera Eulberg 3a1e125ce3 Add Clock sysvar details, update struct docs 2020-10-31 21:30:42 -07:00
Tyera Eulberg 0049ab69fb Repurpose unused as Clock::epoch_start_timestamp; add gated update 2020-10-31 21:30:42 -07:00
Michael Vines 4b65e32f22 Move Feature struct to solana-program 2020-10-30 17:57:51 -07:00
Ryo Onodera 1df15d85c3
Fix tower/blockstore unsync due to external causes (#12671)
* Fix tower/blockstore unsync due to external causes

* Add and clean up long comments

* Clean up test

* Comment about warped_slot_history

* Run test_future_tower with master-only/master-slave

* Update comments about false leader condition
2020-10-30 19:31:23 +09:00
Jack May 72d41e5801
Update AccountInfo comments (#13302) 2020-10-30 08:16:44 +00:00
Michael Vines 66e51a7363 Add sol_log_compute_units syscall 2020-10-29 21:45:24 -07:00
Jack May b5c8b86e7c
clarify comment (#13289) 2020-10-29 21:16:01 +00:00
Jack May c458d4b213
move Account to solana-sdk (#13198) 2020-10-28 22:01:07 -07:00
Michael Vines 92d6521a7f Add try_find_program_address() 2020-10-28 19:34:51 -07:00
Jack May 26eba5ac7d
Fix pr crossing for sysvar keyed-accounts (#13189) 2020-10-26 21:59:32 -07:00
Jack May 322c667655
check sysvar id for AccountInfo (#13175) 2020-10-26 20:38:45 -07:00
Michael Vines 1b343665a1 Move KeyedAccount out of solana-program. Native programs are not supported by solana-program 2020-10-26 18:54:54 -07:00
Michael Vines a4956844bd Update frozen_abi hashes
The movement of files in sdk/ caused ABI hashes to change
2020-10-24 08:37:55 -07:00
Michael Vines dd711ab5fb Rename solana-program-sdk to solana-program 2020-10-24 08:37:55 -07:00
Michael Vines 63db324204 Initial population of solana-program-sdk 2020-10-24 08:37:55 -07:00
Michael Vines 3718771ffb Add solana-program-sdk boilerplate 2020-10-24 08:37:55 -07:00