* check android builds
* feature: set rent_epoch to Epoch::MAX
* tweaks
* Update runtime/src/rent_collector.rs
Co-authored-by: Brooks Prumo <brooks@prumo.org>
* simplify changes to tests
* back out some test changes
* calculate_rent_result passes through Exempt
* move calc outside loop
* if rent epoch is already max, use 'NoRentCollectionNow'
Co-authored-by: Brooks Prumo <brooks@prumo.org>
The commit allocates 2% of slots to running experiments with different
turbine fanouts based on the slot number.
The experiment is feature gated with an additional feature to disable
the experiment.
* Bump sbf-tools to v1.32
This version of sbf-tools is based on Rust 1.65.0 and LLVM 15.0.
* Temporary ignore build-sbf tests until issue with buildkite cache resolved
* vote: Prevent commission update in the second half of epochs
* Address feedback
* Fix tests
* Make the feature enabled by single-contributor
* Use a cooler pubkey
* Registers the feature enable_program_redeployment_cooldown.
* Adds redeployment slot constraint.
* Adds test to assert that closed programs can not be reopened.
* Ensure that program close truncates the account data.
* Adds set_sysvar_for_tests() to SBF program tests.
* Update cost model to use requested_cu instead of estimated cu #27608
* remove CostUpdate and CostModel from replay/tvu
* revive cost update service to send cost tracker stats
* CostModel is now static
* remove unused package
Co-authored-by: Tao Zhu <tao@solana.com>
- Add new compute-budget instruction to set transaction-wide accounts data size limit
- Set default accounts data limit to 10MB, and max to 100MB, per transaction;
- Add getters to make changing default and/or max values easier in the future with feature gates;
- added error counter for transactions exceed data size limit
* Adds proc_macro_derive(CloneZeroed).
* Switches over all use sites of clone_zeroed() and copy_field().
* Removes clone_zeroed() and copy_field().
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Add docs for system_instruction and some of its functions
* Apply suggestions from code review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Apply review feedback
* Use PDAs in system_instruction examples
* Fix 'bump seed' terminology in system_instruction docs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* SetAuthorityChecked
* restore old logic for loader
* add more upgrade authority checked test cases
* setBufferAuthority checked tests
* format
* add set_buffer_authority_checked instruction to sdk
* Update transaction-status/src/parse_bpf_loader.rs
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
* add is_set_authority_checked function
* fix set_buffer_authority_checked sdk instruction
* feature gate setAuthorityChecked
* add bpf loader tests for setAuthorityChecked ixs
* test that you can set to same authority
* allow set_authority_checked to be called via cpi (if feature is enabled)
* fix ci
* fmt
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
Co-authored-by: Justin Starry <justin@solana.com>
* Extends is_nonoverlapping() to be able to deal with two different lengths.
* Uses is_nonoverlapping() for syscall output parameters.
* Feature gates the new throws of SyscallError::CopyOverlapping.
* Adds tests which trigger SyscallError::CopyOverlapping.
* Split out voting and banking threads in banking stage
Additionally this allows us to aggressively prune the buffer for voting threads
as with the new vote state only the latest vote from each validator is
necessary.
* Update local cluster test to use new Vote ix
* Encapsulate transaction storage filtering better
* Address pr comments
* Commit cargo lock change
* clippy
* Remove unsafe impls
* pr comments
* compute_sanitized_transaction -> build_sanitized_transaction
* &Arc -> Arc
* Move test
* Refactor metrics enums
* clippy
* add Eq, PartialEq to EpochInfo
* add Eq, PartialEq related to transactions and messages
* add Eq, PartialEq to Ed25519SignatureOffsets
* add Eq, PartialEq to FeatureSet
* add Eq, PartialEq to fee.rs
* add Eq, PartialEq to GenesisConfig
* don't add Eq to GenesisConfig because floats
* add Eq, PartialEq to PohConfig
* add Eq, PartialEq to SecpSignatureOffsets
* add some missing derives to transaction_context.rs
* add Eq, PartialEq to ProcessedSiblingInstruction
* Use infallible, unchecked methods to write into the serialization buffer
We serialize in two steps: first we compute the size of the buffer, then
we write into it. Therefore there's no need to check if each individual
write fits the buffer - we know it does we just computed the required
size.
* serialize_parameters: remove extra loop/borrows
Remove one extra loop over accounts to gather account lengths. Also
gather all accounts at once and avoid temporary borrows.
* Move creating MemoryRegions for serialized parameters from create_vm to serialize_parameters
This is in preparation of using multiple MemoryRegions once we land direct account mapping.
* bpf_loader: introduce internal API to build serialization buffer/regions
This is prep work for landing the direct_mapping feature, which maps account
data in their own memory regions.
* serialization: fix after API changes
* BorrowedAccount: add set_data_from_slice(), make set_data() take owned values
set_data() used to take a slice and would force alloc+copy if the caller
has owned values (eg account creation, account lookup table).
Expose set_data_from_slice() for callers that have slices, and switch
set_data() to taking an owned Vec.
* BorrowAccount: refactor common accounts_update_delta code in helper method
* BorrowedAccount: add extend_from_slice()
This allows avoiding copies appending entries to account lookup tables.
* BorrowedAccount: remove unnecessary ifs around update_accounts_resize_delta
* Add structure to collect and coalesce vote packets
Will be used in banking stage to throw out extraneous vote packets
before processing
* pr comments
* Update inner lock to arc to improve performance
* keygen: add --use-derivation-path for new & grind
* keygen: add prompt:// uri scheme to new and grind
* fmt
* migrate to clap-v3-utils
* Revert "migrate to clap-v3-utils"
This reverts commit 77f33262ce6c4e95ac1cc62cca32749516f7f357.
* Revert "fmt"
This reverts commit 038cd4ce9628c57dec1f5a4716e2c5baacbe57b3.
* Revert "keygen: add prompt:// uri scheme to new and grind"
This reverts commit 029ea61409a1a16ba2c45483ade2c01f84f25fac.
* - remove `use` from arg
- fix issue from first commit with default value for derivation path
- refactor arg definition and acquiring
* Lets instruction_accounts_lamport_sum() have the &InstructionContext as parameter directly.
* Updates docu comments.
* Uses accessors methods instead of accessing private properties of other structs.
* Adds #![deny(clippy::indexing_slicing)].
* Has get_signers() return a Result instead of using unwrap().
* Removes InvokeContext::get_key_of_account_at_index().
* Replaces InstructionContext::new() by InstructionContext::configure().
Adds TransactionContext::get_next_instruction_context().
* Switch back to using references as parameters.
* Hoists InstructionContext::configure() from TransactionContext::push() into InvokeContext::push().
* Moves InstructionContext::config() to the beginning of InvokeContext::push().
* Hoists InstructionContext::configure() from InvokeContext::push() into InvokeContext::process_instruction().
* Review feedback: Updates docu comments.
* Marks methods and structs which are only to be used by the program runtime.
* Removes TransactionContext::get_keys_of_accounts().
* Adds InstructionContext::get_instruction_accounts_lamport_sum().
* Add a SanitizedMessage type that caches writable accounts indexes
* Add is_writable_account_cache to both SanitizedMessage variants, cache is initialized in constructors