Logs Proof

eth_getLogs returns a list of log entries from different transaction receipts. So the proof must contain the receipt proofs for each transaction.

  1. The transaction is used to create its SSZ Hash Tree Root.

  2. The SSZ Merkle Proof from the Transactions of the ExecutionPayload to the BlockBodyRoot. (Total Depth: 29)

  3. The BeaconBlockHeader is passed because we also need the slot in order to find out which period and which sync committee is used.

  4. The Signature of the SyncCommittee (taken from the following block) is used to verify the SignData where the blockhash is part of the message and the Domain is calculated from the fork and the Genesis Validator Root. Note: OP-Stack uses the same consensus layer as Ethereum, so these verification steps apply here as well.

OpLogsTx

Represents one single transaction receipt with the required transaction and receipt-proof. The proof contains the raw receipt as part of its last leaf.

The Type is defined in src/chains/op/ssz/op_proof_types.h.

class OpLogsTx(Container):
    transactionIndex : Uint32                 # the index of the transaction in the block
    proof            : List [bytes_1024, 256] # the Merkle Patricia Proof of the transaction receipt ending in the receipt root
    tx_proof         : List [bytes_1024, 64]  # the Merkle Patricia Proof of the transaction (empty for preconf blocks since full execution payload is available)

OpLogsBlock

Container type for a single transaction with its receipt and transaction proofs A single block with its proof containing all the receipts or txs required to prove the logs.

The Type is defined in src/chains/op/ssz/op_proof_types.h.

class OpLogsBlock(Container):
    block_proof : Union [              # proof for the block (preconfirmation)
        OpPreconf]                     # preconfirmation proof (sequencer-signed execution payload)
    txs         : List [OpLogsTx, 256] # the transactions of the block with their proofs

Referenced Types

Last updated