diff --git a/geyser-plugin-interface/src/geyser_plugin_interface.rs b/geyser-plugin-interface/src/geyser_plugin_interface.rs index bdf8694f534388..359be0048b8bef 100644 --- a/geyser-plugin-interface/src/geyser_plugin_interface.rs +++ b/geyser-plugin-interface/src/geyser_plugin_interface.rs @@ -157,6 +157,47 @@ pub struct ReplicaTransactionInfoV2<'a> { pub index: usize, } +/// Information about a transaction, including index in block and post accounts states data +#[derive(Clone, Debug)] +#[repr(C)] +pub struct ReplicaTransactionInfoV3<'a> { + /// The first signature of the transaction, used for identifying the transaction. + pub signature: &'a Signature, + + /// Indicates if the transaction is a simple vote transaction. + pub is_vote: bool, + + /// The sanitized transaction. + pub transaction: &'a SanitizedTransaction, + + /// Metadata of the transaction status. + pub transaction_status_meta: &'a TransactionStatusMeta, + + /// The transaction's index in the block + pub index: usize, + /// States of accounts that was in transaction + pub post_accounts_states: Vec<(&'a [u8], TxnReplicaAccountInfo<'a>)>, +} +#[derive(Debug, Clone, PartialEq, Eq)] +#[repr(C)] +/// Information about an account being updated in txn +pub struct TxnReplicaAccountInfo<'a> { + /// The lamports for the account + pub lamports: u64, + + /// The Pubkey of the owner program account + pub owner: &'a [u8], + + /// This account's data contains a loaded program (and is now read-only) + pub executable: bool, + + /// The epoch at which this account will next owe rent + pub rent_epoch: u64, + + /// The data held in this account. + pub data: &'a [u8], +} + /// A wrapper to future-proof ReplicaTransactionInfo handling. /// If there were a change to the structure of ReplicaTransactionInfo, /// there would be new enum entry for the newer version, forcing @@ -165,6 +206,7 @@ pub struct ReplicaTransactionInfoV2<'a> { pub enum ReplicaTransactionInfoVersions<'a> { V0_0_1(&'a ReplicaTransactionInfo<'a>), V0_0_2(&'a ReplicaTransactionInfoV2<'a>), + V0_0_3(&'a ReplicaTransactionInfoV3<'a>), } #[derive(Clone, Debug)] diff --git a/geyser-plugin-manager/src/transaction_notifier.rs b/geyser-plugin-manager/src/transaction_notifier.rs index c9818cc1a8f7be..ff71466c9c3d6a 100644 --- a/geyser-plugin-manager/src/transaction_notifier.rs +++ b/geyser-plugin-manager/src/transaction_notifier.rs @@ -1,8 +1,12 @@ +use agave_geyser_plugin_interface::geyser_plugin_interface::TxnReplicaAccountInfo; +use solana_account::AccountSharedData; +use solana_account::ReadableAccount; +use solana_pubkey::Pubkey; /// Module responsible for notifying plugins of transactions use { crate::geyser_plugin_manager::GeyserPluginManager, agave_geyser_plugin_interface::geyser_plugin_interface::{ - ReplicaTransactionInfoV2, ReplicaTransactionInfoVersions, + ReplicaTransactionInfoV3, ReplicaTransactionInfoVersions, }, log::*, solana_clock::Slot, @@ -31,6 +35,7 @@ impl TransactionNotifier for TransactionNotifierImpl { signature: &Signature, transaction_status_meta: &TransactionStatusMeta, transaction: &SanitizedTransaction, + post_accounts_states: Vec<(Pubkey, AccountSharedData)>, ) { let mut measure = Measure::start("geyser-plugin-notify_plugins_of_transaction_info"); let transaction_log_info = Self::build_replica_transaction_info( @@ -38,6 +43,7 @@ impl TransactionNotifier for TransactionNotifierImpl { signature, transaction_status_meta, transaction, + &post_accounts_states, ); let plugin_manager = self.plugin_manager.read().unwrap(); @@ -51,7 +57,7 @@ impl TransactionNotifier for TransactionNotifierImpl { continue; } match plugin.notify_transaction( - ReplicaTransactionInfoVersions::V0_0_2(&transaction_log_info), + ReplicaTransactionInfoVersions::V0_0_3(&transaction_log_info), slot, ) { Err(err) => { @@ -89,13 +95,32 @@ impl TransactionNotifierImpl { signature: &'a Signature, transaction_status_meta: &'a TransactionStatusMeta, transaction: &'a SanitizedTransaction, - ) -> ReplicaTransactionInfoV2<'a> { - ReplicaTransactionInfoV2 { + post_accounts_states: &'a [(Pubkey, AccountSharedData)], + ) -> ReplicaTransactionInfoV3<'a> { + ReplicaTransactionInfoV3 { index, signature, is_vote: transaction.is_simple_vote_transaction(), transaction, transaction_status_meta, + post_accounts_states: post_accounts_states + .iter() + .map(|(pubkey, data)| { + ( + pubkey.as_ref(), + Self::accountinfo_from_shared_account_data(data), + ) + }) + .collect(), + } + } + fn accountinfo_from_shared_account_data(account: &AccountSharedData) -> TxnReplicaAccountInfo { + TxnReplicaAccountInfo { + lamports: account.lamports(), + owner: account.owner().as_array(), + executable: account.executable(), + rent_epoch: account.rent_epoch(), + data: account.data(), } } } diff --git a/platform-tools-sdk/sbf/c/inc/sol/alt_bn128.h b/platform-tools-sdk/sbf/c/inc/sol/alt_bn128.h index f93f473e2ac577..58b3ae85b7a0c8 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/alt_bn128.h +++ b/platform-tools-sdk/sbf/c/inc/sol/alt_bn128.h @@ -54,7 +54,7 @@ extern "C" { * @return 0 if executed successfully */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/alt_bn128.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_alt_bn128_group_op(const uint64_t, const uint8_t *, const uint64_t, uint8_t *); #else typedef uint64_t(*sol_alt_bn128_group_op_pointer_type)(const uint64_t, const uint8_t *, const uint64_t, uint8_t *); diff --git a/platform-tools-sdk/sbf/c/inc/sol/alt_bn128_compression.h b/platform-tools-sdk/sbf/c/inc/sol/alt_bn128_compression.h index 8e4a880e65662b..462000d0a386dc 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/alt_bn128_compression.h +++ b/platform-tools-sdk/sbf/c/inc/sol/alt_bn128_compression.h @@ -59,7 +59,7 @@ extern "C" { * @return 0 if executed successfully */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/alt_bn128_compression.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_alt_bn128_compression( const uint64_t op, const uint8_t *input, diff --git a/platform-tools-sdk/sbf/c/inc/sol/assert.h b/platform-tools-sdk/sbf/c/inc/sol/assert.h index ca785fbe7f86f8..6de97446bc2ac4 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/assert.h +++ b/platform-tools-sdk/sbf/c/inc/sol/assert.h @@ -17,7 +17,7 @@ extern "C" { * the SBF VM to immediately halt execution. No accounts' data are updated */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/assert.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 void sol_panic_(const char *, uint64_t, uint64_t, uint64_t); #else typedef void(*sol_panic__pointer_type)(const char *, uint64_t, uint64_t, uint64_t); diff --git a/platform-tools-sdk/sbf/c/inc/sol/big_mod_exp.h b/platform-tools-sdk/sbf/c/inc/sol/big_mod_exp.h index 322ee085857195..0db1962dae6c47 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/big_mod_exp.h +++ b/platform-tools-sdk/sbf/c/inc/sol/big_mod_exp.h @@ -15,7 +15,7 @@ extern "C" { * @return 0 if executed successfully */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/big_mod_exp.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_big_mod_exp(const uint8_t *, uint8_t *); #else typedef uint64_t(*sol_big_mod_exp_pointer_type)(const uint8_t *, uint8_t *); diff --git a/platform-tools-sdk/sbf/c/inc/sol/blake3.h b/platform-tools-sdk/sbf/c/inc/sol/blake3.h index 9ba654a902a61d..34cbfcf99b9e42 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/blake3.h +++ b/platform-tools-sdk/sbf/c/inc/sol/blake3.h @@ -22,7 +22,7 @@ extern "C" { * @param result 32 byte array to hold the result */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/blake3.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_blake3(const SolBytes *, int, const uint8_t *); #else typedef uint64_t(*sol_blake3_pointer_type)(const SolBytes *, int, const uint8_t *); diff --git a/platform-tools-sdk/sbf/c/inc/sol/compute_units.h b/platform-tools-sdk/sbf/c/inc/sol/compute_units.h index cd761fd8a4e3ab..d7b2e190bdb5b7 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/compute_units.h +++ b/platform-tools-sdk/sbf/c/inc/sol/compute_units.h @@ -15,7 +15,7 @@ extern "C" { * Prints a string to stdout */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/compute_units.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_remaining_compute_units(); #else typedef uint64_t(*sol_remaining_compute_units_pointer_type)(); diff --git a/platform-tools-sdk/sbf/c/inc/sol/cpi.h b/platform-tools-sdk/sbf/c/inc/sol/cpi.h index 967d36091de352..f26e72d4d7821b 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/cpi.h +++ b/platform-tools-sdk/sbf/c/inc/sol/cpi.h @@ -57,7 +57,7 @@ typedef struct { * Internal cross-program invocation function */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/cpi.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_invoke_signed_c( const SolInstruction *, const SolAccountInfo *, diff --git a/platform-tools-sdk/sbf/c/inc/sol/keccak.h b/platform-tools-sdk/sbf/c/inc/sol/keccak.h index 07025de588b307..f9783c1b12fe35 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/keccak.h +++ b/platform-tools-sdk/sbf/c/inc/sol/keccak.h @@ -22,7 +22,7 @@ extern "C" { * @param result 32 byte array to hold the result */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/keccak.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_keccak256(const SolBytes *, int, uint8_t *); #else typedef uint64_t(*sol_keccak256_pointer_type)(const SolBytes *, int, uint8_t *); diff --git a/platform-tools-sdk/sbf/c/inc/sol/last_restart_slot.h b/platform-tools-sdk/sbf/c/inc/sol/last_restart_slot.h index 1440d3a4e45575..67e825e4ba57e6 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/last_restart_slot.h +++ b/platform-tools-sdk/sbf/c/inc/sol/last_restart_slot.h @@ -13,7 +13,7 @@ extern "C" { * Get Last Restart Slot */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/last_restart_slot.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 u64 sol_get_last_restart_slot(uint8_t *result); #else typedef u64(*sol_get_last_restart_slot_pointer_type)(uint8_t *result); diff --git a/platform-tools-sdk/sbf/c/inc/sol/log.h b/platform-tools-sdk/sbf/c/inc/sol/log.h index 9c622e236ae3e9..a5e6478f139268 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/log.h +++ b/platform-tools-sdk/sbf/c/inc/sol/log.h @@ -15,7 +15,7 @@ extern "C" { * Prints a string to stdout */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/log.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 void sol_log_(const char *, uint64_t); #else typedef void(*sol_log__pointer_type)(const char *, uint64_t); @@ -30,7 +30,7 @@ static void sol_log_(const char * arg1, uint64_t arg2) { * Prints a 64 bit values represented in hexadecimal to stdout */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/log.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 void sol_log_64_(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); #else typedef void(*sol_log_64__pointer_type)(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); @@ -45,7 +45,7 @@ static void sol_log_64_(uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t ar * Prints the current compute unit consumption to stdout */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/log.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 void sol_log_compute_units_(); #else typedef void(*sol_log_compute_units__pointer_type)(); @@ -71,7 +71,7 @@ static void sol_log_array(const uint8_t *array, int len) { * Print the base64 representation of some arrays. */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/log.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 void sol_log_data(SolBytes *, uint64_t); #else typedef void(*sol_log_data_pointer_type)(SolBytes *, uint64_t); diff --git a/platform-tools-sdk/sbf/c/inc/sol/poseidon.h b/platform-tools-sdk/sbf/c/inc/sol/poseidon.h index 74dddfdd0dbd2e..49566baf0cf908 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/poseidon.h +++ b/platform-tools-sdk/sbf/c/inc/sol/poseidon.h @@ -48,7 +48,7 @@ extern "C" { * @param result 32 byte array to hold the result */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/poseidon.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_poseidon( const uint64_t parameters, const uint64_t endianness, diff --git a/platform-tools-sdk/sbf/c/inc/sol/pubkey.h b/platform-tools-sdk/sbf/c/inc/sol/pubkey.h index 0401113fb3ee5e..fe5e2b92bdbb00 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/pubkey.h +++ b/platform-tools-sdk/sbf/c/inc/sol/pubkey.h @@ -27,7 +27,7 @@ typedef struct { * @param key The public key to print */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/pubkey.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 void sol_log_pubkey(const SolPubkey *); #else typedef void(*sol_log_pubkey_pointer_type)(const SolPubkey *); @@ -79,7 +79,7 @@ typedef struct { * @param program_address Program address created, filled on return */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/pubkey.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_create_program_address(const SolSignerSeed *, int, const SolPubkey *, SolPubkey *); #else typedef uint64_t(*sol_create_program_address_pointer_type)(const SolSignerSeed *, int, const SolPubkey *, SolPubkey *); @@ -99,7 +99,7 @@ static uint64_t sol_create_program_address(const SolSignerSeed * arg1, int arg2, * @param bump_seed Bump seed required to create a valid program address */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/pubkey.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_try_find_program_address(const SolSignerSeed *, int, const SolPubkey *, SolPubkey *, uint8_t *); #else typedef uint64_t(*sol_try_find_program_address_pointer_type)(const SolSignerSeed *, int, const SolPubkey *, SolPubkey *, uint8_t *); diff --git a/platform-tools-sdk/sbf/c/inc/sol/return_data.h b/platform-tools-sdk/sbf/c/inc/sol/return_data.h index f01811fde463dc..7f8d5e2ac9d24e 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/return_data.h +++ b/platform-tools-sdk/sbf/c/inc/sol/return_data.h @@ -23,7 +23,7 @@ extern "C" * @param bytes_len length of byte array. This may not exceed MAX_RETURN_DATA. */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/return_data.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 void sol_set_return_data(const uint8_t *, uint64_t); #else typedef void(*sol_set_return_data_pointer_type)(const uint8_t *, uint64_t); @@ -42,7 +42,7 @@ static void sol_set_return_data(const uint8_t * arg1, uint64_t arg2) { * @param result length of return data (may exceed bytes_len if the return data is longer) */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/return_data.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_get_return_data(uint8_t *, uint64_t, SolPubkey *); #else typedef uint64_t(*sol_get_return_data_pointer_type)(uint8_t *, uint64_t, SolPubkey *); diff --git a/platform-tools-sdk/sbf/c/inc/sol/secp256k1.h b/platform-tools-sdk/sbf/c/inc/sol/secp256k1.h index 73b025e04b64c7..17db5a516b1099 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/secp256k1.h +++ b/platform-tools-sdk/sbf/c/inc/sol/secp256k1.h @@ -33,7 +33,7 @@ extern "C" { * @return 0 if executed successfully */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/secp256k1.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_secp256k1_recover(const uint8_t *, uint64_t, const uint8_t *, uint8_t *); #else typedef uint64_t(*sol_secp256k1_recover_pointer_type)(const uint8_t *, uint64_t, const uint8_t *, uint8_t *); diff --git a/platform-tools-sdk/sbf/c/inc/sol/sha.h b/platform-tools-sdk/sbf/c/inc/sol/sha.h index b2cdaddbf4e146..7e690af3ba84b6 100644 --- a/platform-tools-sdk/sbf/c/inc/sol/sha.h +++ b/platform-tools-sdk/sbf/c/inc/sol/sha.h @@ -22,7 +22,7 @@ extern "C" { * @param result 32 byte array to hold the result */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE platform-tools-sdk/sbf/c/inc/sol/inc/sha.inc AND RUN `cargo run --bin gen-headers` */ -#ifndef SOL_SBFV2 +#ifndef SOL_SBPFV3 uint64_t sol_sha256(const SolBytes *, int, uint8_t *); #else typedef uint64_t(*sol_sha256_pointer_type)(const SolBytes *, int, uint8_t *); diff --git a/rpc/src/transaction_notifier_interface.rs b/rpc/src/transaction_notifier_interface.rs index d09a207b1c6e18..4f5d00d38c1685 100644 --- a/rpc/src/transaction_notifier_interface.rs +++ b/rpc/src/transaction_notifier_interface.rs @@ -1,3 +1,6 @@ +use solana_pubkey::Pubkey; +use solana_sdk::account::AccountSharedData; + use { solana_sdk::{clock::Slot, signature::Signature, transaction::SanitizedTransaction}, solana_transaction_status::TransactionStatusMeta, @@ -12,6 +15,7 @@ pub trait TransactionNotifier { signature: &Signature, transaction_status_meta: &TransactionStatusMeta, transaction: &SanitizedTransaction, + post_accounts_states: Vec<(Pubkey, AccountSharedData)>, ); } diff --git a/rpc/src/transaction_status_service.rs b/rpc/src/transaction_status_service.rs index b28f3b8c1a4290..9efa521aa2245d 100644 --- a/rpc/src/transaction_status_service.rs +++ b/rpc/src/transaction_status_service.rs @@ -140,6 +140,7 @@ impl TransactionStatusService { executed_units, fee_details, rent_debits, + post_accounts_states, .. } = committed_tx; @@ -185,6 +186,7 @@ impl TransactionStatusService { transaction.signature(), &transaction_status_meta, &transaction, + post_accounts_states, ); } @@ -269,6 +271,7 @@ pub(crate) mod tests { solana_ledger::{genesis_utils::create_genesis_config, get_tmp_ledger_path_auto_delete}, solana_runtime::bank::{Bank, TransactionBalancesSet}, solana_sdk::{ + account::AccountSharedData, account_utils::StateMut, clock::Slot, fee::FeeDetails, @@ -325,6 +328,7 @@ pub(crate) mod tests { signature: &Signature, transaction_status_meta: &TransactionStatusMeta, transaction: &SanitizedTransaction, + _post_accounts_states: Vec<(Pubkey, AccountSharedData)>, ) { self.notifications.insert( TestNotifierKey { @@ -393,6 +397,8 @@ pub(crate) mod tests { fee_details: FeeDetails::default(), rent_debits, loaded_account_stats: TransactionLoadedAccountsStats::default(), + //Do we need to put something here? + post_accounts_states: vec![], }); let balances = TransactionBalancesSet { @@ -519,6 +525,8 @@ pub(crate) mod tests { fee_details: FeeDetails::default(), rent_debits: RentDebits::default(), loaded_account_stats: TransactionLoadedAccountsStats::default(), + //Do we need to put something here? + post_accounts_states: vec![], }); let balances = TransactionBalancesSet { diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 3c78a5bccda656..595ffd3f8163c4 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -3800,6 +3800,7 @@ impl Bank { loaded_accounts_count: loaded_accounts.len(), loaded_accounts_data_size, }, + post_accounts_states: loaded_accounts, }) } ProcessedTransaction::FeesOnly(fees_only_tx) => Ok(CommittedTransaction { @@ -3814,6 +3815,7 @@ impl Bank { loaded_accounts_count: fees_only_tx.rollback_accounts.count(), loaded_accounts_data_size, }, + post_accounts_states: vec![], }), } }) diff --git a/runtime/src/bank/tests.rs b/runtime/src/bank/tests.rs index 1c88b586f70529..2d184e8b9b7ba1 100644 --- a/runtime/src/bank/tests.rs +++ b/runtime/src/bank/tests.rs @@ -3272,6 +3272,7 @@ fn test_load_and_execute_commit_transactions_fees_only(enable_fees_only_txs: boo loaded_accounts_count: 2, loaded_accounts_data_size: nonce_size as u32, }, + post_accounts_states: vec![] })] ); } else { diff --git a/svm/src/transaction_commit_result.rs b/svm/src/transaction_commit_result.rs index 5e260e08ea863f..60de38ff6c4717 100644 --- a/svm/src/transaction_commit_result.rs +++ b/svm/src/transaction_commit_result.rs @@ -1,3 +1,5 @@ +use solana_transaction_context::TransactionAccount; + use { crate::transaction_execution_result::TransactionLoadedAccountsStats, solana_fee_structure::FeeDetails, solana_rent_debits::RentDebits, @@ -18,6 +20,7 @@ pub struct CommittedTransaction { pub fee_details: FeeDetails, pub rent_debits: RentDebits, pub loaded_account_stats: TransactionLoadedAccountsStats, + pub post_accounts_states: Vec, } pub trait TransactionCommitResultExtensions {