* add default_cost as mandatory field for Builtin
* updated tests
* set zkp program default to VerifyTransfer CUs
---------
Co-authored-by: Jon Cinque <joncinque@pm.me>
* upgrade spl-token-2022 to 0.6.0
* Add spl_token_2022-0.6.0.so to program-test
* cargo lock
* update account decoder tests to use Pubkey::new_from_array instead of Pubkey::new
* update rpc tests to use Pubkey::new_from_array instead of Pubkey::new
* update token-2022 .so file
* cargo lock
* increase the threshold for allowable rebuilds in ci
* update spl ATA to v1.1.3
* decrement back the threshold for allowable rebuilds
* cargo lock
* increment ci rebuild threshold
#### Problem
The existing StoredAccountMeta requires the file and in-memory layout of
account metadata to match StoredMeta and AccountMeta. This limits the
flexibility to implement different accounts storage file formats.
#### Summary of Changes
This PR abstracts out StoredAccountMeta as an Enum.
1. replace hardcoded loaded accounts data size limit with compute budget instruction;
2. new transaction error for invalid account data size limit
3. test requested limit with combination of features and transactions
* Removes first_instruction_account from process_loader_upgradeable_instruction(), process_loader_instruction() and write_program_data().
* Removes first_instruction_account from process_instruction_common().
* Removes get_index_in_transaction() and try_borrow_account().
* Disable cache if retired 3 times
* Add more comments
* Reduce if nesting to avoid maintenance pitfall by DISABLE_CACHE
* Well /home was required...
* Adjust to align with third time's the charm
* Adjust if arrangement a bit with tweaks
As `Range` is a special case of an `Iterator`, this is a generalization
that makes `get_all_accounts()` accept other kinds of ranges. Such as
`RangeInclusive`.
#### Problem
The existing append_accounts returns a vector of offsets, which accounts-db
later uses it to infer the storage size of each account. However, such inference
does not apply to the new hot/cold storage format.
#### Summary of Changes
This PR changes the return value of append_accounts() to `Vec<StoredAccountInfo>`,
which includes both offset and storage size information of an account.
* support loading snapshots with > 1 append vec per slot
* pr feedback
* drain to into_values
* unwrap() -> expect()
* loop to find non-conflicting file and add test
* Add helper function to create BlockstoreOptions from ValidatorConfig
* Make backup_and_clear_blockstore() honor ValidatorConfig options
backup_and_clear_blockstore() opens a Blockstore session; however, it
is currently using Blockstore::open(). This Blockstore method uses
BlockstoreOption::default() under the hood. As a result, any validator
args that adjust Blockstore settings are not considered in
backup_and_clear_blockstore().
This is especially problematic if the non-default value of
--rocksdb-shred-compaction is being used. In this case,
backup_and_clear_blockstore() was opening the wrong directory and
incorrectly finding an empty ledger.
This change plumbs any blockstore configuration to
backup_and_clear_blockstore().
https://github.com/solana-labs/solana/pull/26070
introduced MAX_CODE_SHREDS_PER_SLOT which because of how coding shreds
are generated was later set larger than MAX_DATA_SHREDS_PER_SLOT.
The old code was discarding: index >= MAX_DATA_SHREDS_PER_SLOT
regardless of if the shred is code or data:
https://github.com/solana-labs/solana/blob/v1.13.6/core/src/window_service.rs#L193-L195
Since that many code (or data) shreds will probably never result in a
rooted slot anyways, the commit reduces MAX_CODE_SHREDS_PER_SLOT to what
previously was the effective limit.
All the references returned from a `StoredAccountMeta` instance
actually come from the underlying account. As written, the lifetimes of
the returned references are constrained by the lifetime of the
`StoredAccountMeta` instance.
While technically correct, it is overly strict. It is totally fine to
use the returned reference as long as the underlying account is alive.
Which could be longer than the lifetime of the `StoredAccountMeta`
wrapper.