RPC: rewards, return error if epoch_boundary_block is a lie (#2758)
* Return error if epoch_boundary_block is not actually the epoch boundary block
* Update rpc-client-api/src/custom_error.rs
Co-authored-by: Trent Nelson <490004+t-nelson@users.noreply.github.com>
---------
Co-authored-by: Trent Nelson <490004+t-nelson@users.noreply.github.com>
(cherry picked from commit 9a4b094ded)
Co-authored-by: Tyera <tyera@anza.xyz>
Clean up disable_fees_sysvar feature (#2003)
* Clean up disable_fees_sysvar
* Remove bank fees test
* Remove unused rpc response types
* Fixup sysvar_cache tests
* Remove fees-sysvar from bootstrap_validator_stake_lamports; no longer included
* Update account counts, since fees no longer touched
* Update bank hashes in test, since fees sysvar is not populated
* Remove test case passing fees sysvar as account
(cherry picked from commit 1c34908d03)
Co-authored-by: Tyera <tyera@anza.xyz>
Use num_partitions to find specific stake rewards in partitions (#1677)
* Add helper to find and filter rewards from a slot
* Check feature enabled for desired epoch
* Refactor existing rewards code to support vote-rewards after activation
* Append stake rewards from partitions
* Remove feature deactivation from TestValidator
* Improve comments
* Add comment about retaining feature activation slot logic
* Add custom error and use in getInflationReward
* Review nit
(cherry picked from commit 0496b06f89)
Co-authored-by: Tyera <tyera@anza.xyz>
* rpc-client: Print transaction logs in preflight error
* Address feedback
* Update expected error message in program deploy test
* Use a semicolon before the data
* move RpcFilterType::allows to solana-rpc as `filter_allows`
* update imports
* restore and deprecate allows() method
* use Account::valid_account_data from solana_inline_spl
* remove old import
* fix: use inline token_2022
* fix inline_spl import
* fix: another place where inline token_2022 is needed
* feat: include replaced blockhash in RPC simulation response
* rename blockhash field to `replacement_blockhash`
* add tests to ensure replacement_blockhash is returning correctly
* fixed tests
* fixed tests again for real this time?
* Support min_context_slot field in getBlocksWithLimit input
* Use min_context_slot in get_blocks_with_limit
* Support min_context_slot field in getBlocks input
* Use min_context_slot in get_blocks
* allow pedantic invalid cast lint
* allow lint with false-positive triggered by `test-case` crate
* nightly `fmt` correction
* adapt to rust layout changes
* remove dubious test
* Use transmute instead of pointer cast and de/ref when check_aligned is false.
* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.
* bump rust nightly to 2023-08-25
* Upgrades Rust to 1.72.0
---------
Co-authored-by: Trent Nelson <trent@solana.com>
* introduce workspace.package
* introduce workspace.dependencies
* read version from root cargo.toml
* pass check when version = { workspace = true }
* don't bump version when version = { workspace = true }
* including workspace Cargo.toml when bump version
* programs/sbf use workspace inheritance
* fix increasing cargo version ignore program/sbf/Cargo.toml
* Deprecate Memcmp inner fields
* Add Memcmp::new
* Replace some literal construction
* Add convert_to_raw_bytes method and use
* Make convert_to_raw_bytes fallible
* Allow literal matches for complex cases
* introduce workspace.package
* introduce workspace.dependencies
* read version from root cargo.toml
* pass check when version = { workspace = true }
* don't bump version when version = { workspace = true }
* including workspace Cargo.toml when bump version
* programs/sbf use workspace inheritance
* fix increasing cargo version ignore program/sbf/Cargo.toml
* support CpiGuard and PermanentDelegate extensions in transaction-status and account-decoder
* update transaction-status and account-decoder to new ConfidentialTransfer interfaces
* Move OptionalContext to solana-rpc-client-api
* Add helper function
* Add failing test
* Support OptionalContext in RpcClient::get_program_accounts_with_config