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:
@@ -145,6 +145,8 @@ pub struct TransactionStatusMeta {
|
||||
pub post_balances: Vec<u64>,
|
||||
#[serde(deserialize_with = "default_on_eof")]
|
||||
pub inner_instructions: Option<Vec<InnerInstructions>>,
|
||||
#[serde(deserialize_with = "default_on_eof")]
|
||||
pub log_messages: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
impl Default for TransactionStatusMeta {
|
||||
@@ -155,6 +157,7 @@ impl Default for TransactionStatusMeta {
|
||||
pre_balances: vec![],
|
||||
post_balances: vec![],
|
||||
inner_instructions: None,
|
||||
log_messages: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,6 +172,7 @@ pub struct UiTransactionStatusMeta {
|
||||
pub pre_balances: Vec<u64>,
|
||||
pub post_balances: Vec<u64>,
|
||||
pub inner_instructions: Option<Vec<UiInnerInstructions>>,
|
||||
pub log_messages: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
impl UiTransactionStatusMeta {
|
||||
@@ -184,6 +188,7 @@ impl UiTransactionStatusMeta {
|
||||
.map(|ix| UiInnerInstructions::parse(ix, message))
|
||||
.collect()
|
||||
}),
|
||||
log_messages: meta.log_messages,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,6 +204,7 @@ impl From<TransactionStatusMeta> for UiTransactionStatusMeta {
|
||||
inner_instructions: meta
|
||||
.inner_instructions
|
||||
.map(|ixs| ixs.into_iter().map(|ix| ix.into()).collect()),
|
||||
log_messages: meta.log_messages,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user