EEVM.Block.Result (eevm v0.1.0)

Copy Markdown View Source

The outcome of executing a block — the post-state database plus every commitment derived from it. Returned by EEVM.Block.execute/4 and EEVM.Block.build/4, and by the lower-level EEVM.Block.Processor.process_block/4.

Fields

  • db — the EEVM.Database after system calls, every transaction, the withdrawals, and the request system calls have been applied in order. post_state_db is a deprecated copy, kept for one minor version.
  • receipts — the per-transaction receipts, already carrying their cumulative_gas_used figures, and for each successful contract creation the deployed contract_address.
  • state_root — post-execution world-state MPT root.
  • receipts_root — MPT root of {rlp(index) => rlp(receipt)}.
  • transactions_root — MPT root of {rlp(index) => rlp(transaction)}.
  • logs_bloom — bitwise OR of every receipt's logs bloom.
  • gas_used — total gas consumed across all transactions (matches the final receipt's cumulative_gas_used, 0 when the block is empty).
  • requests — the block's EIP-7685 requests, each a type byte followed by its payload (see EEVM.Block.Requests); nil before Prague.
  • changes — the block's writes as an EEVM.StateChanges. EEVM.Block has already committed them to db when the backend implements EEVM.Database.commit/2; EEVM.Block.Processor leaves this nil.
  • trace — with the :tracer option, one EEVM.Tracer per transaction, in block order; otherwise nil.

Summary

Types

t()

@type t() :: %EEVM.Block.Result{
  changes: EEVM.StateChanges.t() | nil,
  db: EEVM.Database.t(),
  gas_used: non_neg_integer(),
  logs_bloom: EEVM.Block.Bloom.t(),
  post_state_db: EEVM.Database.t(),
  receipts: [EEVM.Block.Receipt.t()],
  receipts_root: binary(),
  requests: [binary()] | nil,
  state_root: binary(),
  trace: [EEVM.Tracer.t()] | nil,
  transactions_root: binary()
}