* Disables verification-less reloading.
* Refactors LoadedPrograms::extract() to use a mutable parameter instead of returning the list of missing entries.
* cargo fmt
* Refactors LoadedPrograms::extract() to use a mutable parameter instead of returning a LoadedProgramsForTxBatch.
* Adds explicit SecondLevel structure to LoadedPrograms.
* Adds cooperative_loading_task.
* Implements cooperative loading in the bank.
* Fixes fork graph in tests.
* Adds LoadingTaskWaiter.
Output BankHashDetails file when leader drops its' own block (#34256)
Currently, the file is generated when a node drops a block that was
produced by another node. However, it would also be beneficial to see
the account state when a node drops its' own block.
Output the file in this additional failure codepath
(cherry picked from commit 935e06f8f1)
Co-authored-by: steviez <steven@solana.com>
Fix - `Bank::compute_active_feature_set()` and `Bank::apply_feature_activations()` (#34124)
* Moves modification of feature accounts from Bank::compute_active_feature_set() into Bank::apply_feature_activations().
* Renames allow_new_activations and newly_activated to include_pending and pending.
* Fix test_compute_active_feature_set.
(cherry picked from commit 6b8545061f)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Use program cache fork graph in extract() (#33806)
* Use program cache fork graph instead of WorkingSlot trait
* Fix deadlocked tests
* keep WorkingSlot trait for now
(cherry picked from commit 78c31aa6b8)
Co-authored-by: Pankaj Garg <pankaj@solana.com>
Set a global fork graph in program cache (#33776)
* Set a global fork graph in program cache
* fix deadlock
* review feedback
(cherry picked from commit 59cb3b57ee)
Co-authored-by: Pankaj Garg <pankaj@solana.com>
* updated inner_call for hashing fn to follow generic approach (#33128)
* updated inner_call for hashing fn to follow generic approach
* different hash compute budget values for all digests
* fixed conflicts
* reverted changes to compute_budget.rs and added 3method to trait to get compute budget values
* updated type for result fn for HasherImpl
* using Hash directly in result fn, got rid of HASH_BYTES and removed comment form compute_budget
* updated import statement
* cargo fmt -all
* removed unused import and reference related warning
* oops forgot semicolon
* removed trailing white space
(cherry picked from commit a60d1857bf)
* Bump solana_rbpf to v0.8.0 (#33679)
* Bumps solana_rbpf to v0.8.0
* Adjustments:
Replaces declare_syscall!() with declare_builtin_function!().
Removes Config::encrypt_runtime_environment.
Simplifies error propagation.
(cherry picked from commit a5c7c999e2)
---------
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Fix non-determinism in account_hash_ignore_slot on genesis (#33692)
(cherry picked from commit 69495f4c13)
Co-authored-by: Jeff Washington (jwash) <jeff.washington@solana.com>
bank: do not remove trailing 0 bytes from return data (#33639)
This is creating havoc for Solang, as the return data is borsh encoded
and therefore `u64` values like 0x100 get truncated.
(cherry picked from commit 47511999bb)
Co-authored-by: Sean Young <sean@mess.org>
Update hashes per tick with feature gates (#33600)
* Update hashes per tick with feature gates
(cherry picked from commit b36d051b51)
Co-authored-by: Brennan <brennan.watt@solana.com>
Bank: Add function to replace empty account with upgradeable program on feature activation (#32783)
* replace program account
* modify for all cases
* remove non-data swap
* address tests & conditional feedback
* get the rent involved
* mix in owner & executable
* feature-related cases
* stripped back to feature-specific case only
* added feature
* address initial feedback
* added more lamport checks
* condense tests
* using test_case
* add fail cases to tests
* more cleanup
* add verifiably built program
* update program account state
* cleaned up serializing logic
* use full word capitalization
* rename old & new to dst & src
* swap src and dst in parameters
* add warnings and errors
* rename feature to programify
* test suite description clarity
* remove strings from datapoints
* spell out source and destination
* more verbose comments in account replace functions
* move lamport calculation
* swap lamport check for state check
* move replace functions to helper module
* make replace_account methods fallible
* refactor error handling
* add test for source program state
(cherry picked from commit 25460f76e7)
Co-authored-by: Joe C <jcaulfield135@gmail.com>
Deprecate bz2/gzip/none/tar snapshot compression types (#33484)
These options are now disallowed on the command line for
solana-validator and solana-ledger-tool, which effectively means no more
snapshots will be created with this types in normal usecases. However,
support for reading the deprecated types is still in place.
(cherry picked from commit 73e9e6dd70)
Co-authored-by: steviez <steven@solana.com>
* solana-program - altbn128: add g1 & g2 compression
still fixing tests for point of infinity
feat: proof compression syscall working
add rust test to ci
remove prints
added c test
added sycall pricing
* fixed ci checks
* refactored altbn128 and compression
Replaces `TransactionError::InstructionError(0, InstructionError::UnbalancedInstruction)` with `TransactionError::UnbalancedTransaction`.
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
* Add feature gate
* Add helper fn
* Require split destination to be rent-exempt if it is active
* Update cli to prefund split accounts
* cli: require rent param with sign-only
* Update tokens to prefund split accounts
* Update split tests with sysvar accounts
* Fix test_split_to_account_with_rent_exempt_reserve
* Fix test_staked_split_destination_minimum_balance
* Fix test_split_more_than_staked
* Fix test_split_minimum_stake_delegation and remove misleading StakeState::Initialized case
* Fix test_split_from_larger_sized_account
* Add test for pre-/post-activation behavior splitting some or all of stake account
* Assert active stake
* Fix runtime test
* Ignore stake-pool downstream
* Review comments
* Feature gate sysvar reads
* Move vote related code to its own crate
* Update imports in code and tests
* update programs/sbf/Cargo.lock
* fix check errors
* update abi_digest
* rebase fixes
* fixes after rebase
The program owners pubkeys are constant, no need to reconstruct the
Vec<Pubkey> and Vec<&Pubkey> each time this function runs (every time we
execute transactions).
Recalculating new_warmup_cooldown_rate_epoch for each item is redundant
and wasteful and instead can be done only once outside the iterators and
for loops.
Also NewWarmupCooldownRateEpoch is unnecessary and verbose and is
removed in this commit.
* Do not unnecessarily re-verify unloaded program
* clippy fixes
* new unit test for extract
* fixes after rebase
* fixes after rebase
* address review comments
* fix clippy
* Adds a module `address_lookup_table` to the SDK.
* Adds a module `address_lookup_table::instruction` to the SDK.
* Adds a module `address_lookup_table::error` to the SDK.
* Adds a module `address_lookup_table::state` to the SDK.
* Moves AddressLookupTable into SDK as well.
* Moves AddressLookupTableAccount into address_lookup_table.
* Adds deprecation messages.
* Disentangles dependencies across cargo files.