* Uses transaction_context.get_key_of_account_at_index() when only the key is needed.
* Uses "!instruction_context.is_signer()" instead of ".signer_key().is_none()".
* Uses instruction_context.get_index_in_transaction() to detect account aliasing.
* Makes sure that there is only one KeyedAccount at a time.
Everywhere except for DeployWithMaxDataLen and Upgrade.
* Makes sure that there is only one KeyedAccount at a time.
In DeployWithMaxDataLen and Upgrade.
* Replaces KeyedAccount by BorrowedAccount.
* Removes unused code.
* Adds transaction_context and instruction_context where invoke_context.get_keyed_accounts() is used.
* Use instruction_context.get_instruction_data() instead of an explicit parameter.
* Removes instruction_data parameter from Executor::execute().
* Removes instruction_data parameter from ProcessInstructionWithContext.
* Replaces KeyedAccount in create_executor().
* Refactors len to write_offset in write_program_data().
* Replaces KeyedAccount in write_program_data().
* Use transaction_context.get_key_of_account_at_index() in process_instruction_common().
* Renames next_first_instruction_account to program_account_index.
* Replaces program KeyedAccount by BorrowedAccount in process_instruction_common().
* Removes _program in process_instruction_common().
* Replaces first_account KeyedAccount by BorrowedAccount in process_instruction_common().
* Moves KeyedAccount lookup inside common_close_account().
* Replaces close_account, recipient_account and authority_account KeyedAccount by BorrowedAccount in common_close_account().
* Replaces all use sites of get_sysvar_with_account_check by get_sysvar_with_account_check2.
* Removes get_sysvar_with_account_check.
* Renames get_sysvar_with_account_check2 to get_sysvar_with_account_check.
* Make Rust definitions of C types repr(C)
* Make SolInstruction field types agree with C definitions
* Use correct SolSignerSeedsC type in SyscallInvokeSignedC
* rustfmt
* Change asserts to debug asserts in syscall.rs
* Use visit_each_account_once() in CPI syscall to prevent duplicate accounts from being translated twice.
* remove unwrap() from runtime
Co-authored-by: Jack May <jack@solana.com>
* Revert "Replaces KeyedAccount by BorrowedAccount in the BPF loader. (#23056)"
6c56eb9663
* Revert "Replaces `KeyedAccount` by `BorrowedAccount` in `system_instruction_processor`. (#23217)"
ee7e411d68
* Revert "Replaces `KeyedAccount` by `BorrowedAccount` in `nonce_keyed_account`. (#23214)"
1a68f81f89
* Revert "Replaces KeyedAccount by BorrowedAccount in the config processor. (#23302)"
a14c7c37ee
* Revert "Replaces `KeyedAccount` by `BorrowedAccount` in vote processor (#23348)"
e2fa6a0f7a
* Revert "Refactor: Prepare stake_instruction.rs to remove `KeyedAccount`s (#23375)"
ee3fc39f1c
This change prevents zero-cost computation of hash functions on
unbound number of zero-length slices of data. The cost for each slice
is at least equal to the base cost of a memory operation, but could be
more for longer slices.
* Moves TransactionContext::get_program_key() to InstructionContext::get_program_key().
* Removes TransactionContext::get_loader_key().
* Test full program and loader executable account chain in BPF loader.
* Moves stack_height of the instruction_trace into InstructionContext.
* Uses nesting_level instead of stack_height internally in transaction_context.rs
* Uses the instruction_trace instead of the instruction_context_stack internally.
* Adds feature gate: record_instruction_in_transaction_context_push.
* Adds BorrowedAccount::check_sysvar().
* Adds BorrowedAccount::get_data_mut().
* Implements account resizing in BorrowedAccount.
* Exposes is_signer() and is_writable() in InstructionContext.
* Removes AccountMeta and get_instruction_accounts_metas().
* Makes throwing errors in BorrowedAccount optional.
* Removes result return values from BorrowedAccount.