Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bank: enable extended tx metadata storage when rpc requires it #2

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ pub extern "C" fn fd_ext_bank_verify_precompiles( bank: *const std::ffi::c_void,


#[no_mangle]
pub extern "C" fn fd_ext_bank_load_and_execute_txns( bank: *const std::ffi::c_void, txns: *const std::ffi::c_void, txn_count: u64, out_load_results: *mut i32, out_executing_results: *mut i32, out_executed_results: *mut i32, out_consumed_cus: *mut u32 ) -> *mut std::ffi::c_void {
pub extern "C" fn fd_ext_bank_load_and_execute_txns( bank: *const std::ffi::c_void, txns: *const std::ffi::c_void, txn_count: u64, enable_extended_metadata: i32, out_load_results: *mut i32, out_executing_results: *mut i32, out_executed_results: *mut i32, out_consumed_cus: *mut u32 ) -> *mut std::ffi::c_void {
let txns = unsafe {
std::slice::from_raw_parts(txns as *const SanitizedTransaction, txn_count as usize)
};
Expand All @@ -287,6 +287,7 @@ pub extern "C" fn fd_ext_bank_load_and_execute_txns( bank: *const std::ffi::c_vo
let mut batch = TransactionBatch::new(lock_results, bank.as_ref(), Cow::Borrowed(txns));
batch.set_needs_unlock(false);

let enable = enable_extended_metadata != 0;
let mut timings = ExecuteTimings::default();
let output = bank.load_and_execute_transactions(&batch, MAX_PROCESSING_AGE, &mut timings,
TransactionProcessingConfig {
Expand All @@ -296,9 +297,9 @@ pub extern "C" fn fd_ext_bank_load_and_execute_txns( bank: *const std::ffi::c_vo
log_messages_bytes_limit: None,
limit_to_load_programs: false,
recording_config: ExecutionRecordingConfig {
enable_cpi_recording: false,
enable_log_recording: false,
enable_return_data_recording: false
enable_cpi_recording: enable,
enable_log_recording: enable,
enable_return_data_recording: enable
},
transaction_account_lock_limit: Some(64),
}
Expand Down