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. BeaconBlockHeader is passed because also need the slot in order to find out which period and which sync committee is used.

  4. 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.

This Proof is used for the following RPC-Methods:

EthLogsTx

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/eth/ssz/verify_proof_types.h.

class EthLogsTx(Container):
    transaction      : Bytes[1073741824]      # the raw transaction payload
    transactionIndex : Uint32                 # the index of the transaction in the block
    proof            : List [bytes_1024, 256] # the Merklr Patricia Proof of the transaction receipt ending in the receipt root

EthLogsBlock

a single Block with its proof the all the receipts or txs required to proof for the logs.

The Type is defined in src/chains/eth/ssz/verify_proof_types.h.

class EthLogsBlock(Container):
    blockNumber              : Uint64                # the number of the execution block containing the transaction
    blockHash                : Bytes32               # the blockHash of the execution block containing the transaction
    proof                    : List [bytes32, 1024]  # the multi proof of the transaction, receipt_root,blockNumber and blockHash
    header                   : BeaconBlockHeader     # the header of the beacon block
    historic_proof           : Union [               # optional historic proof. If non null, the block is verified by this proof and the signature confirm the future block.
        None,                                        # no block-proof for latest
        EthHistoricBlockProof,                       # proof for a historic block using the state_root
        EthHeadersBlockProof]                        # proof block giving headers
    sync_committee_bits      : BitVector [512]       # the bits of the validators that signed the block
    sync_committee_signature : ByteVector [96]       # the signature of the sync committee
    txs                      : List [EthLogsTx, 256] # the transactions of the block

Referenced Types

EthReceiptDataLog

a log entry in the receipt

The Type is defined in src/chains/eth/ssz/verify_data_types.h.

class EthReceiptDataLog(Container):
    blockHash        : Bytes32           # the blockHash of the execution block containing the transaction
    blockNumber      : Uint64            # the number of the execution block containing the transaction
    transactionHash  : Bytes32           # the hash of the transaction
    transactionIndex : Uint32            # the index of the transaction in the block
    address          : Address           # the address of the log
    logIndex         : Uint32            # the index of the log in the transaction
    removed          : Boolean           # whether the log was removed
    topics           : List [bytes32, 8] # the topics of the log
    data             : Bytes[1073741824] # the data of the log

Last updated