token-2022: Use mainnet-beta binary in all tools (#3165)
#### Problem
The binary of token-2022 bundled in program-test and fetch-spl.sh is
very out of date with what's currently running on mainnet.
#### Summary of changes
Update the shared object and version to fetch.
(cherry picked from commit 96955661f7)
Co-authored-by: Jon C <me@jonc.dev>
* clippy: allow dead_code for SubscriptionToken
* clippy: allow dead_code for GraphVoteAccountModeError
* clippy: allow dead_code for DroppableTask
* remove the string in the GraphVoteAccountModeError
* abort the joinhandle when drop
* only trace JoinHandle in the drop
* add comment
* Persist EpochRewards sysvar between reward intervals
* Adjust initial EpochRewards balance to ensure it is not debited out of existence
* Set EpochRewards::active = false at end of distribution
* Fix tests
* Extend test to 2 epochs, assert sysvar still exists
* Stop adjusting EpochRewards balance based on rewards
* Fix tests
* Review suggestions
RuntimeConfig doesn't use anything SVM specific and logically belongs
in program runtime rather than SVM. This change moves the definition
of RuntimeConfig struct from the SVM crate to program-runtime and
adjusts `use` statements accordingly.
* Update genesis processing to have a fallback collector id for tests
* DCOU-ify the collector id for tests parameter (#1902)
* wrap test_collector_id in DCOU
* rename param to collector_id_for_tests
* fix program test
* fix dcou
---------
Co-authored-by: Brooks <brooks@prumo.org>
* Update toml and lockfiles
* account-decoder: Add group and group member extensions
* transaction-status: Add token group + pointer extensions
* program-test: Update token-2022 binary
* Initialize fork graph in program cache during bank_forks creation
* rename BankForks::new to BankForks::new_rw_arc
* fix compilation
* no need to set fork_graph on insert()
* fix partition tests
* token: Update to 4.0.0
* token-2022: Bump and support new account and instruction types
* Update token-2022 in fetch_spl / program-test
* Fixup downstream uses
* Mint and destination were flipped in 0.9.0
* Don't use `convert_pubkey`
* Bump spl dependencies to versions which avoid recompilations
* fix stake deactivation in the same epoch after redelegation bug
add tests
refactor common code into fn
avoid early return
add feature gate for the new stake redelegate behavior
move stake tests out of cli
add stake-program-test crate
reimplemnt stake test with program-test
remove stake-program-test crate
reviews
add setup.rs
remove clippy
reveiws
* reviews
* review comments
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
* 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>
In most cases, either a &Bank or an Arc<Bank> is more proper.
- &Bank is used if the function only needs a momentary reference
- Arc<Bank> is used if the function needs its' own copy
This PR leaves several instances of &Arc<Bank> around; these instances
are situations where a clone may only happen conditionally.