Logs Proof
A Logs Proof verifies that specific log entries, returned by eth_getLogs, are correctly included within transaction receipts of a verified execution block.
Transaction Root Calculation: For each transaction producing a log entry, the transaction payload is used to compute its SSZ hash tree root.
Execution Payload Proof: An SSZ Merkle proof is constructed, linking the
transactionsfield within the ExecutionPayload to theblockBodyRoot. The total proof depth for this structure is 29.Consensus Reference: The BeaconBlockHeader is included in the proof to provide the
slotinformation. This identifies which sync committee is responsible for signing the corresponding block root.Sync Committee Signature: The BLS aggregate signature of the following block’s sync committee is verified against the
SignDatathat includes the block hash. The signing domain is derived from the fork version and the Genesis Validator Root. Successful verification confirms that the block—and therefore all contained receipts and logs—is part of the canonical chain.
Each log proof must reference its corresponding receipt proof, ensuring that every verified log entry is linked to a valid transaction and included in a verified execution block.
This Proof is used for the following RPC-Methods:
eth_getLogs - currently everthing except the logIndex is verified
eth_getLogs - currently everthing except the logIndex is verified
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 Merkle Patricia Proof of the transaction receipt ending in the receipt rootEthLogsBlock
A single Block with its proof containing all the receipts or txs required to prove the logs.
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
Referenced Types
EthCompletenessTx
A Logs Completeness Proof proves for a contiguous range of execution blocks [fromBlock, toBlock] that no matching log for the eth_getLogs filter was omitted. The normal Logs Proof only proves inclusion of the returned logs; this proof additionally guarantees completeness. Continuity. A single signed anchor header (the beacon block of toBlock) plus a parent_root chain of ProofHeaders down to fromBlock. Because the execution-layer blockNumber increments by exactly 1 per non-empty beacon block, an unbroken parent_root chain together with a gap-free blockNumber sequence fromBlock..toBlock guarantees that no block was skipped. Only one sync-committee BLS signature (over the anchor) is required. Per block one of two variants (covers the three scenarios of issue #128):
BloomNegative:blockNumber+logsBloomare proven via a multi-merkle proof against the block'sbodyRoot. The verifier computes the query bloom(s) from the filter and asserts that none is a bit-subset of the block'slogsBloom, hence no matching log can exist in this block.FullReceipts:blockNumber+blockHash+receiptsRoot(and the matching transactions) are proven; all RLP receipts are delivered so the verifier rebuilds the receipts trie, compares it to the provenreceiptsRoot, and filters the logs locally. An empty match set corresponds to scenario 2, a non-empty one to scenario 3 (the raw transactions provide the transaction hashes). A slim transaction entry (raw payload + index) used to reconstruct transaction hashes for matched logs; the transaction is bound to the block via the block's multi proof.
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
EthCompletenessBloomNegative
Bloom-negative block: proves that the query bloom is not a subset of the block's logsBloom.
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
EthCompletenessFullReceipts
Full-receipts block: all receipts are delivered so the verifier rebuilds the receipts trie.
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
Referenced Types
EthLogsCompletenessProof
The main proof data for a logs completeness proof over a contiguous block range. The claim (the requested block range) comes from the RPC request, so the range endpoints are NOT carried in the proof; the verifier derives fromBlock/toBlock from the (proven) per-block payloads and binds them to the request. header is the full beacon header of the oldest block; headers is the ascending parentRoot chain up to the anchor (the newest block). The anchor's canonicity is established via the shared header_proof union (signature / header-chain / historic summaries), exactly like every other proof type -- the verifier reconstructs the anchor header from the chain and passes it to c4_verify_header. tag_proof proves the anchor's block tag for an open-ended toBlock (the same union that account proofs use): the timestamp variant (proven via tag_proof_branch against the anchor's bodyRoot) gates the latest freshness, while the checkpoint_proof variant is reserved for safe/finalized (structurally prepared; verification pending). For a pinned toBlock the none variant is used.
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
Referenced Types
EthCompletenessBlock
EthReceiptDataLog
A log entry in the receipt.
The Type is defined in src/chains/eth/ssz/verify_data_types.h.
Last updated