diff --git a/Cargo.lock b/Cargo.lock index c40da875a1..27be052485 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2509,9 +2509,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -4857,9 +4857,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.3", diff --git a/bundle/src/bundle_execution.rs b/bundle/src/bundle_execution.rs index 5b70f58844..0dbd737851 100644 --- a/bundle/src/bundle_execution.rs +++ b/bundle/src/bundle_execution.rs @@ -17,8 +17,9 @@ use { transaction::{SanitizedTransaction, TransactionError, VersionedTransaction}, }, solana_svm::{ - account_loader::TransactionLoadResult, account_overrides::AccountOverrides, - transaction_processor::ExecutionRecordingConfig, + account_loader::TransactionLoadResult, + account_overrides::AccountOverrides, + transaction_processor::{ExecutionRecordingConfig, TransactionProcessingCallback}, transaction_results::TransactionExecutionResult, }, solana_transaction_status::{token_balances::TransactionTokenBalances, PreBalanceInfo}, @@ -264,6 +265,18 @@ pub fn load_and_execute_bundle<'a>( account_overrides.upsert_account_overrides( bank.get_account_overrides_for_simulation(&account_keys), ); + + // An unfrozen bank's state is always changing. + // By taking a snapshot of the accounts we're mocking out grabbing their locks. + // **Note** this does not prevent race conditions, just mocks preventing them. + if !bank.is_frozen() { + for pk in account_keys.iter() { + // Save on a disk read. + if account_overrides.get(pk).is_none() { + account_overrides.set_account(pk, bank.get_account_shared_data(pk)); + } + } + } }); } diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 74f0561628..c0a53e926a 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -2082,9 +2082,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -4301,9 +4301,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.3",