Store program logs in blockstore / bigtable (TransactionWithStatusMeta) (#12678)
* introduce store program logs in blockstore / bigtable * fix test, transaction logs created for successful transactions * fix test for legacy bincode implementation around log_messages * only api nodes should record logs * truncate transaction logs to 100KB * refactor log truncate for improved coverage
This commit is contained in:
@ -534,13 +534,14 @@ impl BankingStage {
|
||||
mut loaded_accounts,
|
||||
results,
|
||||
inner_instructions,
|
||||
transaction_logs,
|
||||
mut retryable_txs,
|
||||
tx_count,
|
||||
signature_count,
|
||||
) = bank.load_and_execute_transactions(
|
||||
batch,
|
||||
MAX_PROCESSING_AGE,
|
||||
None,
|
||||
transaction_status_sender.is_some(),
|
||||
transaction_status_sender.is_some(),
|
||||
);
|
||||
load_execute_time.stop();
|
||||
@ -580,6 +581,7 @@ impl BankingStage {
|
||||
tx_results.processing_results,
|
||||
TransactionBalancesSet::new(pre_balances, post_balances),
|
||||
inner_instructions,
|
||||
transaction_logs,
|
||||
sender,
|
||||
);
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ impl TransactionStatusService {
|
||||
statuses,
|
||||
balances,
|
||||
inner_instructions,
|
||||
transaction_logs,
|
||||
} = write_transaction_status_receiver.recv_timeout(Duration::from_secs(1))?;
|
||||
|
||||
let slot = bank.slot();
|
||||
@ -65,12 +66,14 @@ impl TransactionStatusService {
|
||||
pre_balances,
|
||||
post_balances,
|
||||
inner_instructions,
|
||||
log_messages,
|
||||
) in izip!(
|
||||
OrderedIterator::new(&transactions, iteration_order.as_deref()),
|
||||
statuses,
|
||||
balances.pre_balances,
|
||||
balances.post_balances,
|
||||
inner_instructions
|
||||
inner_instructions,
|
||||
transaction_logs
|
||||
) {
|
||||
if Bank::can_commit(&status) && !transaction.signatures.is_empty() {
|
||||
let fee_calculator = match hash_age_kind {
|
||||
@ -96,6 +99,8 @@ impl TransactionStatusService {
|
||||
.collect()
|
||||
});
|
||||
|
||||
let log_messages = Some(log_messages);
|
||||
|
||||
blockstore
|
||||
.write_transaction_status(
|
||||
slot,
|
||||
@ -108,6 +113,7 @@ impl TransactionStatusService {
|
||||
pre_balances,
|
||||
post_balances,
|
||||
inner_instructions,
|
||||
log_messages,
|
||||
},
|
||||
)
|
||||
.expect("Expect database write to succeed");
|
||||
|
Reference in New Issue
Block a user