Skip to main content

Overview

ReceiptManager() creates an in-memory store for transaction receipts. Dev nodes such as Tevm and ZEVM use it to answer eth_getTransactionReceipt, eth_getBlockReceipts, and eth_getLogs without re-executing blocks. The store keeps two indexes:
  • block hash → receipts, in transaction order
  • transaction hash → (block hash, tx index)
Logs are derived from stored receipts, so deleting a block removes its receipts, logs, and transaction index entries together.

API

Block and transaction hashes must be 32 bytes. Any other length throws InvalidReceiptLengthError.

Log filters

Filters follow eth_getLogs semantics:
  • blockHashes: search only these blocks. Omitted means every stored block.
  • address: one address, or a list matched as OR. An empty list matches any address.
  • topics: positional. null is a wildcard; an array is an OR list; an empty array is a wildcard.

Reorgs

When a block leaves the canonical chain, delete its receipts:
If a transaction was re-included in another block, its tx index keeps pointing to that block. Deleting the orphaned block does not remove the newer entry.