#[repr(C)]pub struct TxEventLog {
pub tx_hash: SHA256Hash,
pub exec_result: ExecResult,
pub root_output: InvocationFrameOutput,
pub gas_consumed: u64,
pub events: VecM<TxEmittedEvent, thruput_xdr::::event::TxEventLog::{constant#0}>,
}Expand description
Event log for a single transaction, stored in the merkle-patricia trie. The trie leaf is encoded canonically as follows:
- key: the leading TransactionHash from XDR(TxEventLog);
- value: the remainder of XDR(TxEventLog), followed by XDR(NondeterministicProposalData).
The appended proposal data binds the nondeterministic inputs used during execution to the events root. Signature-wrapper bytes are deliberately not included: TransactionHash identifies the inner Transaction independently of its signatures, so validators with different valid wrappers compute the same root.
That key is the identity of the transaction the submitter signed, not of
the ProposedTransaction the proposer assembled from it, so a
submitter can compute it before submission and use it to find its own
events. See TransactionHash.
root_output carries the InvocationFrameOutput of the transaction’s
root frame: the Return buffer on success, the Abort buffer on a
deterministic revert, or the Fault variant when no root output was
produced (e.g., non-deterministic failure). Downstream indexers and
the receipt-read paths surface this as return_data/abort_data.
gas_consumed is the gas the whole transaction consumed: the root frame,
every frame it invoked, and the pre-execution validation of attached
contracts. On an out-of-gas fault it is the transaction’s gas limit. It
is part of the leaf, so the events root commits to it and every
validator’s re-execution must reproduce it.
Fields§
§tx_hash: SHA256Hash§exec_result: ExecResult§root_output: InvocationFrameOutput§gas_consumed: u64§events: VecM<TxEmittedEvent, thruput_xdr::::event::TxEventLog::{constant#0}>Trait Implementations§
Source§impl Clone for TxEventLog
impl Clone for TxEventLog
Source§fn clone(&self) -> TxEventLog
fn clone(&self) -> TxEventLog
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConstMaxSize for TxEventLog
impl ConstMaxSize for TxEventLog
Source§impl ConstMaxSize for TxEventLog
impl ConstMaxSize for TxEventLog
Source§impl Debug for TxEventLog
impl Debug for TxEventLog
impl EncodesAs<TxEventLog> for TxEventLog
impl Eq for TxEventLog
Source§impl Hash for TxEventLog
impl Hash for TxEventLog
Source§impl JsonSchema for TxEventLog
impl JsonSchema for TxEventLog
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for TxEventLog
impl Ord for TxEventLog
Source§fn cmp(&self, other: &TxEventLog) -> Ordering
fn cmp(&self, other: &TxEventLog) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TxEventLog
impl PartialEq for TxEventLog
Source§impl PartialOrd for TxEventLog
impl PartialOrd for TxEventLog
Source§impl<'_r> ReadXDR<'_r> for TxEventLog
impl<'_r> ReadXDR<'_r> for TxEventLog
Source§fn read_xdr<R>(r: &mut R) -> Result<TxEventLog, ReadError>where
R: Reader<'_r>,
fn read_xdr<R>(r: &mut R) -> Result<TxEventLog, ReadError>where
R: Reader<'_r>,
Source§fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, TxEventLog>,
) -> Result<Init<'__xdrs_s, TxEventLog>, ReadError>where
R: Reader<'_r>,
fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, TxEventLog>,
) -> Result<Init<'__xdrs_s, TxEventLog>, ReadError>where
R: Reader<'_r>,
slot, without first building it
on the stack. Read more