* runtime: Factor out `DurableNoncePartial` finishing logic and add tests
(cherry picked from commit 8df2a4bac0)
* accounts: Don't assume fee-payer is the first account
(cherry picked from commit 47af5933ca)
* accounts: Replace nonce_rollback unreachable block with descriptive panic
(cherry picked from commit be7760caa1)
* sdk: Check owner when verifying nonce accounts
(cherry picked from commit 274312ebb5)
* runtime: Replace `HashAgeKind` with `NonceRollbackInfo`
(cherry picked from commit 404fc1570d)
* Make `Accounts::is_non_loader_key()` a method on `Message`
(cherry picked from commit 17defbff13)
Co-authored-by: Trent Nelson <trent@solana.com>
* solana-tokens: optimize PickleDb dumps (#13879)
* Dump PickleDb after transaction sends/confirmation
* Dump PickleDb on ctrlc
* Don't exit during tests
* Add build_messages helper and test db dump
* Add send_messages helper and test db dump
* Add combined test
* Add log_transaction_confirmations helper and test db dump
* Add update_finalized_transactions test
* Return error instead of process::exit
* Close TestValidator
(cherry picked from commit 8c40dd34b2)
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Check that the program was granted access to program_id (#13890)
(cherry picked from commit 733fcbaa6c)
# Conflicts:
# programs/bpf/Cargo.toml
# programs/bpf/tests/programs.rs
* Resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
* Revert solana-tokens to RpcClient
* Fixup check_payer_balances tests
* Use RpcClient::new_with_commitment in other tests
* Sneak in helper fn from #13820
Co-authored-by: Tyera Eulberg <tyera@solana.com>
Co-authored-by: Greg Fitzgerald <greg@solana.com>
Gossip and other places repeatedly de-serialize vote-state stored in
vote accounts. Ideally the first de-serialization should cache the
result.
This commit adds new VoteAccount type which lazily de-serializes
VoteState from Account data and caches the result internally.
Serialize and Deserialize traits are manually implemented to match
existing code. So, despite changes to frozen_abi, this commit should be
backward compatible.
(cherry picked from commit e1793e5a13)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Currently, commitment for `logs_subscribe` must be specified using the
non-flattened form in JSON, ie `{"commitment":{"commitment":"max}}`.
This brings the commitment in line with documentation.
(cherry picked from commit 6203d1c94c)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Support ledger-tool for multi-epoch rewards
* nits
* Ensure not to skip some records in csv
(cherry picked from commit 6048342c57)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
* runtime: Add `FeeCalculator` resolution method to `HashAgeKind`
* runtime: Plumb fee-collected accounts for failed nonce tx rollback
* runtime: Use fee-collected nonce/fee account for nonced TX error rollback
* runtime: Add test for failed nonced TX accounts rollback
* Fee payer test
* fixup: replace nonce account when it pays the fee
* fixup: nonce fee-payer collect test
* fixup: fixup: clippy/fmt for replace...
* runtime: Test for `HashAgeKind::fee_calculator()`
* Clippy
Co-authored-by: Trent Nelson <trent@solana.com>
(cherry picked from commit b70abdc645)
Co-authored-by: sakridge <sakridge@gmail.com>
* Add stake calculation tests with inflation/slashing
* Clean up the test
(cherry picked from commit 42421e77a9)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>