mergify[bot]
81a4769de7
Fix parsing CreateAccountWithSeed instructions ( #13513 ) ( #13516 )
...
* Reduce required num_system_accounts and handle 2-account instructions properly
* Update CreateAccountWithSeed account docs to be correct
* Add CreateAccountWithSeed test
(cherry picked from commit 91f4e99b4c
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2020-11-11 01:01:38 +00:00
mergify[bot]
20678cf5ef
Fix stake split rent-exempt adjustment ( #13357 ) ( #13452 )
...
* 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
(cherry picked from commit 4c5f345798
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2020-11-06 21:55:08 +00:00
Jack May
4513128c75
check sysvar id for AccountInfo ( #13175 )
2020-11-01 06:58:02 +00:00
Jack May
74bfb00959
Update AccountInfo comments ( #13302 )
...
(cherry picked from commit 72d41e5801
)
2020-10-30 08:09:42 -07:00
mergify[bot]
4296bfc728
clarify comment ( #13289 ) ( #13291 )
...
(cherry picked from commit b5c8b86e7c
)
Co-authored-by: Jack May <jack@solana.com >
2020-10-29 22:28:09 +00:00
mergify[bot]
e29a49f107
Use pico inflation for ledger-tool capitalization --enable-inflation ( #13215 ) ( #13221 )
...
* Use pico inflation for ledger-tool capitalization --enable-inflation
* rust fmt
(cherry picked from commit 7d2962135d
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-28 20:54:56 +09:00
Michael Vines
884d68ddcf
Add Pubkey::new_unique()/Hash::new_unique()
2020-10-23 03:19:38 +00:00
Michael Vines
5ad0ccdfe1
cargo fmt
2020-10-21 20:27:57 -07:00
Michael Vines
422bb3c526
Run codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand
2020-10-21 20:27:57 -07:00
Michael Vines
048a2b982c
Add pubkey_new_rand(), mark Pubkey::new_rand() deprecated
2020-10-21 20:27:57 -07:00
Michael Vines
76f0557462
Add hash_new_rand(), mark Hash::new_rand() as deprecated
2020-10-21 20:27:57 -07:00
mergify[bot]
9ed1d2337b
Parse stake and system instructions (bp #13035 ) ( #13044 )
...
* Parse stake and system instructions (#13035 )
* Fix token account check
* Add helper to check num accounts
* Add parse_stake
* Add parse_system
* Fix AuthorizeNonce docs
* Remove jsonParsed unstable markers
* Clippy
(cherry picked from commit 46d0019955
)
* Fix for older clippy
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2020-10-21 04:20:02 +00:00
mergify[bot]
964f05afa8
Fix secp256k1 instruction indexing and add tests ( #13026 ) ( #13031 )
...
(cherry picked from commit 83c53ae4b5
)
Co-authored-by: sakridge <sakridge@gmail.com >
2020-10-20 22:24:20 +00:00
mergify[bot]
782ed192b6
program log pubkey as base58 (bp #12901 ) ( #12910 )
...
* program log pubkey as base58 (#12901 )
(cherry picked from commit 3f9e6a600b
)
# Conflicts:
# programs/bpf/benches/bpf_loader.rs
# programs/bpf/c/src/tuner/tuner.c
# programs/bpf_loader/src/syscalls.rs
# runtime/src/process_instruction.rs
* fix conflicts
Co-authored-by: Jack May <jack@solana.com >
2020-10-15 19:21:27 +00:00
mergify[bot]
2c0b4f3b4f
Respect RefCell when calling invoke ( #12858 ) ( #12890 )
...
* Respect RefCell when calling invoke
* nudge
(cherry picked from commit 969f7b015b
)
Co-authored-by: Jack May <jack@solana.com >
2020-10-15 02:24:51 +00:00
mergify[bot]
46b864dcb0
Expose program error constants ( #12861 ) ( #12870 )
...
(cherry picked from commit d4e953277e
)
Co-authored-by: Jack May <jack@solana.com >
2020-10-14 08:48:45 +00:00
mergify[bot]
9dab79274b
terminology update, nonce to bump seed (bp #12840 ) ( #12850 )
...
* terminology update, nonce to bump seed (#12840 )
(cherry picked from commit 56211378d3
)
# Conflicts:
# sdk/src/pubkey.rs
* fix conflicts
Co-authored-by: Jack May <jack@solana.com >
2020-10-13 19:24:30 +00:00
mergify[bot]
edf59cccd8
Fix fee mismatch on snapshot deserialize ( #12697 ) ( #12753 )
...
Co-authored-by: Carl Lin <carl@solana.com >
(cherry picked from commit c879e7c1ad
)
Co-authored-by: carllin <wumu727@gmail.com >
2020-10-12 11:34:13 +00:00
mergify[bot]
596ede864b
document program address collisions (bp #12774 ) ( #12781 )
...
* document program address collisions (#12774 )
(cherry picked from commit 9ac8db3533
)
# Conflicts:
# sdk/src/pubkey.rs
* Update pubkey.rs
* Update pubkey.rs
Co-authored-by: Jack May <jack@solana.com >
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-10-10 06:50:58 +00:00
mergify[bot]
b31ec0579c
Local program allocator ( #12679 ) ( #12767 )
...
(cherry picked from commit 630eb3b907
)
Co-authored-by: Jack May <jack@solana.com >
2020-10-10 01:44:18 +00:00
mergify[bot]
b34ba0fc4e
Remove skip-no-mangle entirely (bp #12696 ) ( #12708 )
...
* Remove skip-no-mangle entirely (#12696 )
(cherry picked from commit 41ad3dd8f0
)
# Conflicts:
# account-decoder/Cargo.toml
# core/Cargo.toml
# transaction-status/Cargo.toml
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com >
2020-10-09 20:44:50 +00:00
mergify[bot]
17de653ce0
Move nonce utils from runtime to sdk (bp #12577 ) ( #12583 )
...
* runtime: Move prepare_if_nonce_account into accounts
(cherry picked from commit caec631344
)
* Move nonced tx helpers to SDK
(cherry picked from commit 65b868f4eb
)
* Move remaining nonce utils from runtime to SDK
(cherry picked from commit 3c7b9c2938
)
# Conflicts:
# runtime/src/bank.rs
* Fix conflict
Co-authored-by: Trent Nelson <trent@solana.com >
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2020-10-01 06:25:25 +00:00
mergify[bot]
d9d3a95a72
Fix TransactionStatusMeta breakage in blockstore ( #12587 ) ( #12596 )
...
* Add helper to facilitate deserializing legacy structs
* Use default_on_eof to fix blockstore vis-a-vis TransactionStatusMeta
* Add should-panic test and comments
(cherry picked from commit 865d01c38d
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2020-09-30 19:18:43 +00:00
mergify[bot]
966d0f72bb
Move process_instruction defs to runtime ( #12507 ) ( #12549 )
...
(cherry picked from commit 2ff983647f
)
Co-authored-by: Jack May <jack@solana.com >
2020-09-29 15:52:38 +00:00
Michael Vines
4bd29c1b32
Add pico-inflation feature
...
(cherry picked from commit aa5c008fa8
)
2020-09-28 09:34:35 -07:00
mergify[bot]
bc3aa53e02
Runtime feature activation framework (bp #12376 ) ( #12497 )
...
* Runtime feature activation framework
(cherry picked from commit 93259f0bae
)
# Conflicts:
# runtime/src/bank.rs
* Add feature set identifier to gossiped version information
(cherry picked from commit 35f5f9fc7b
)
# Conflicts:
# Cargo.lock
# version/Cargo.toml
* Port instructions sysvar and secp256k1 program activation to FeatureSet
(cherry picked from commit c10da16d7b
)
# Conflicts:
# runtime/src/bank.rs
# runtime/src/message_processor.rs
* Add feature management commands
(cherry picked from commit 93ed0ab2bb
)
# Conflicts:
# Cargo.lock
# cli/Cargo.toml
* Make test_process_rest_api less fragile
(cherry picked from commit 7526bb96f3
)
* Remove id field
(cherry picked from commit cc6ba1e131
)
* FeatureSet test
(cherry picked from commit 92406cf9a0
)
* cargo fmt
(cherry picked from commit 199940d683
)
* cli review feedback
(cherry picked from commit 3a2b8c5e5b
)
* Rename active() to is_active()
(cherry picked from commit e39fac9f01
)
* Resolve merge conflicts
* Remove continues from compute_active_feature_set()
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-09-26 17:49:53 +00:00
mergify[bot]
21ba2bad24
Add Signers
impl for Vec<Box<dyn Signer>>
( #12470 )
...
(cherry picked from commit 07dfa37cce
)
Co-authored-by: Trent Nelson <trent@solana.com >
2020-09-25 10:45:29 +00:00
mergify[bot]
c44f6981b1
adds an atomic variant of the bloom filter ( #12422 ) ( #12459 )
...
For crds_gossip_pull, we want to parallelize build_crds_filters, which
requires concurrent writes to bloom filters.
This commit implements a variant of the bloom filter which uses atomics
for its bits vector and so is thread-safe.
(cherry picked from commit bb183938d9
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2020-09-24 19:49:10 +00:00
mergify[bot]
7212bb12ea
Record and store invoked instructions in transaction meta ( #12311 ) ( #12449 )
...
* Record invoked instructions and store in transaction meta
* Enable cpi recording if transaction sender is some
* Rename invoked to innerInstructions
(cherry picked from commit 6601ec8f26
)
Co-authored-by: Justin Starry <justin@solana.com >
2020-09-24 15:42:34 +00:00
mergify[bot]
0f3208dece
Cleanup and feature gate instruction processing ( #12359 ) ( #12384 )
...
(cherry picked from commit 22d8b3c3f8
)
Co-authored-by: sakridge <sakridge@gmail.com >
2020-09-22 06:19:14 +00:00
mergify[bot]
a85a2839e4
Add way to look at tx instructions ( #11943 ) ( #12375 )
...
Co-authored-by: sakridge <sakridge@gmail.com >
2020-09-22 00:59:46 +00:00
mergify[bot]
8af90c9c08
Add keccak-secp256k1 instruction ( #11839 ) ( #12368 )
...
* Implement keccak-secp256k1 instruction
Verifies eth addreses with ecrecover function
* Move secp256k1 test
Co-authored-by: sakridge <sakridge@gmail.com >
2020-09-21 18:09:05 +00:00
mergify[bot]
3ede265ff9
Add Pack and COption to sdk (bp #12294 ) ( #12322 )
...
* Add Pack and COption to sdk (#12294 )
* Add COption to sdk
* Add Pack to sdk
* Except program_option from nits check
* No Default::default
(cherry picked from commit 58542cf7f6
)
# Conflicts:
# ci/nits.sh
* Fix conflict
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2020-09-18 04:31:09 +00:00
mergify[bot]
11ff80c64b
Cache re-usable work performed by the loader (bp #12135 ) ( #12216 )
...
* Cache re-usable work performed by the loader (#12135 )
(cherry picked from commit 3278d78f08
)
# Conflicts:
# programs/bpf/Cargo.toml
# programs/bpf/tests/programs.rs
# programs/bpf_loader/Cargo.toml
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com >
2020-09-15 21:25:32 +00:00
mergify[bot]
61dcab8c07
Update commitment options ( #12173 ) ( #12189 )
...
(cherry picked from commit 3c69cd6d61
)
Co-authored-by: carllin <wumu727@gmail.com >
2020-09-11 19:24:16 +00:00
mergify[bot]
640bf7015f
Check bank capitalization (bp #11927 ) ( #12184 )
...
* Check bank capitalization (#11927 )
* Check bank capitalization
* Simplify and unify capitalization calculation
* Improve and add tests
* Avoid overflow and inhibit automatic restart
* Fix test
* Tweak checked sum for cap. and add tests
* Fix broken build after merge conflicts..
* Rename to ClusterType
* Rename confusing method
* Clarify comment
* Verify cap. in rent and inflation tests
Co-authored-by: Stephen Akridge <sakridge@gmail.com >
(cherry picked from commit de4a613610
)
# Conflicts:
# Cargo.lock
# accounts-bench/Cargo.toml
* Fix conflict 1/2
* Fix conflict 2/2
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-09-11 18:04:10 +00:00
mergify[bot]
d1fdc96969
Add support for deprecated loader (bp #11946 ) ( #12114 )
...
* Add support for deprecated loader (#11946 )
(cherry picked from commit ae0fd3043a
)
* fix version
Co-authored-by: Jack May <jack@solana.com >
2020-09-08 18:41:29 +00:00
Ryo Onodera
2341394e8b
Rename to ClusterType and restore devnet compat. (manual bp) ( #12069 )
...
* Rename to ClusterType and restore devnet compat.
* De-duplicate parse code and add comments
* Adjust default Devnet genesis & reduce it in tests
2020-09-08 23:54:54 +09:00
mergify[bot]
f29a741582
Clarify comments and names in inflation code ( #11977 ) ( #12008 )
...
(cherry picked from commit 89bca6110a
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-09-03 06:47:13 +00:00
mergify[bot]
2f3fced8a8
Switch account hashing to blake3 ( #11969 ) ( #11992 )
...
* Switch account hashing to blake3
Co-authored-by: Carl <carl@solana.com >
(cherry picked from commit af08221aec
)
Co-authored-by: carllin <wumu727@gmail.com >
2020-09-02 08:40:07 +00:00
mergify[bot]
67d9faaefc
Bump compute budget ( #11864 ) ( #11867 )
...
* Bump compute budget
* nudge
(cherry picked from commit ea179ad762
)
Co-authored-by: Jack May <jack@solana.com >
2020-08-26 23:12:01 +00:00
mergify[bot]
39eeb0142e
Add SystemInstruction::CreateAccount support to CPI (bp #11649 ) ( #11831 )
...
* Add SystemInstruction::CreateAccount support to CPI (#11649 )
(cherry picked from commit e9b610b8df
)
# Conflicts:
# programs/bpf_loader/src/syscalls.rs
# runtime/src/bank.rs
# sdk/src/instruction.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com >
2020-08-25 19:52:27 +00:00
mergify[bot]
d5d1a344c3
Switch programs activation to whole-set based gating (bp #11750 ) ( #11837 )
...
* Switch programs activation to whole-set based gating (#11750 )
* Implement Debug for MessageProcessor
* Switch from delta-based gating to whole-set gating
* Remove dbg!
* Fix clippy
* Clippy
* Add test
* add loader to stable operating mode at proper epoch
* refresh_programs_and_inflation after ancestor setup
* Callback via snapshot; avoid account re-add; Debug
* Fix test
* Fix test and fix the past history
* Make callback management stricter and cleaner
* Fix test
* Test overwrite and frozen for native programs
* Test epoch callback with genesis-programs
* Add assertions for parent bank
* Add tests and some minor cleaning
* Remove unsteady assertion...
* Fix test...
* Fix DOS
* Skip ensuring account by dual (whole/delta) gating
* Fix frozen abi implementation...
* Move compute budget constatnt init back into bank
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
(cherry picked from commit db4bbb3569
)
# Conflicts:
# genesis-programs/src/lib.rs
* Fix conflicts
Co-authored-by: Jack May <jack@solana.com >
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-08-25 19:00:41 +00:00
mergify[bot]
08bece7651
More efficient padding ( #11656 ) ( #11823 )
...
(cherry picked from commit f1ba2387d3
)
Co-authored-by: Jack May <jack@solana.com >
2020-08-25 10:10:59 +00:00
mergify[bot]
f162c6d1d0
Align host addresses (bp #11384 ) ( #11817 )
...
* Align host addresses (#11384 )
* Align host addresses
* support new program abi
* update epoch rollout
* Enforce aligned pointers in cross-program invocations
(cherry picked from commit 9290e561e1
)
# Conflicts:
# core/src/validator.rs
# genesis-programs/src/lib.rs
# programs/bpf_loader/src/deprecated.rs
# programs/bpf_loader/src/lib.rs
# sdk/src/entrypoint_native.rs
# sdk/src/lib.rs
* resolve conflicts
* nudge
Co-authored-by: Jack May <jack@solana.com >
2020-08-25 07:23:20 +00:00
mergify[bot]
f3904b5765
sdk: Make PubKey::create_program_address available in program unit tests (bp #11745 ) ( #11810 )
...
* sdk: Make PubKey::create_program_address available in program unit tests (#11745 )
* sdk: Make PubKey::create_program_address available in program unit tests
This finishes the work started in #11604 to have
`create_program_address` available when `target_arch` is not `bpf` and
`program` is enabled. Otherwise, there is an undefined reference error
to `sol_create_program_address`, which is only defined in `bpf`.
A small test to simply call the function has been added in order to catch
the problem in the future.
The default dependency to `solana-sdk/default` doesn't cause a problem with
existing programs since `build.sh` always specifies
`--no-default-features`, and programs in `solana-program-library` all
use it too.
* Add `default-features = false` for inter-program dependencies
Fix the build error found during CI. The `--no-default-features` flag
only applies to the top-level package, and not to dependencies. A program that
depends on another program, i.e. `128bit` which depends on `128bit_dep`,
must specify `default-features = false` when including that package,
otherwise the `bpf` build will try to pull in default packages, which
includes `std`.
(cherry picked from commit 9a366281d3
)
# Conflicts:
# programs/bpf/rust/128bit/Cargo.toml
# programs/bpf/rust/invoke/Cargo.toml
# programs/bpf/rust/many_args/Cargo.toml
# programs/bpf/rust/param_passing/Cargo.toml
* resolve conflicts
Co-authored-by: Jon Cinque <jon.cinque@gmail.com >
Co-authored-by: Jack May <jack@solana.com >
2020-08-24 20:41:54 +00:00
mergify[bot]
0dcbc6d4d1
The constraints on compute power a program can consume is limited only to its instruction count (bp #11717 ) ( #11800 )
...
* The constraints on compute power a program can consume is limited only to its instruction count (#11717 )
(cherry picked from commit 8d362f682b
)
# Conflicts:
# programs/bpf/Cargo.toml
# programs/bpf_loader/Cargo.toml
# programs/bpf_loader/src/lib.rs
# programs/bpf_loader/src/syscalls.rs
# runtime/src/bank.rs
# sdk/src/instruction.rs
* Resolve conflicts
* nudge
Co-authored-by: Jack May <jack@solana.com >
2020-08-24 17:27:40 +00:00
mergify[bot]
6540d3c63e
Make BPF Loader static (bp #11516 ) ( #11790 )
...
* Make BPF Loader static (#11516 )
(cherry picked from commit 7c736f71fe
)
# Conflicts:
# Cargo.lock
# core/Cargo.toml
# core/src/lib.rs
# core/src/validator.rs
# genesis-programs/src/lib.rs
# programs/bpf_loader/src/deprecated.rs
# programs/bpf_loader/src/lib.rs
# sdk/src/entrypoint_native.rs
# sdk/src/lib.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com >
2020-08-22 01:54:50 +00:00
mergify[bot]
2b4e0abb43
fix region checks ( #11651 ) ( #11785 )
...
(cherry picked from commit 768b386f0a
)
Co-authored-by: Jack May <jack@solana.com >
2020-08-22 01:14:13 +00:00
mergify[bot]
6775e01747
Add StakeInstruction::AuthorizeWithSeed ( #11700 ) ( #11779 )
...
* Add StakeInstruction::AuthorizeWithSeed
* chore: add authorize-with-seed to web.js
* fix: add address_owner
* Add SystemInstruction::TransferWithSeed
* Update ABI hash
* chore: better variable names
* Add AuthorizeWithSeedArgs
* Reorder and rename arguments for clarity
(cherry picked from commit f02a78d8ff
)
Co-authored-by: Greg Fitzgerald <greg@solana.com >
2020-08-21 19:39:36 +00:00