Skip to main content

Module generate_big_block

Module generate_big_block 

Source
Expand description

Command for generating large blocks by merging transactions from consecutive real blocks.

This command fetches consecutive blocks from an RPC until a target gas usage is reached, takes block 0 as the โ€œbaseโ€ payload, concatenates transactions from subsequent blocks, and saves the result to disk as a BigBlockData JSON file containing the merged [ExecutionData] and environment switches at each block boundary.

Structsยง

BigBlocksInitialState ๐Ÿ”’
State used to continue generated big block replay from the benchmark nodeโ€™s current tip.
CollectionResult
Result of collecting transactions from blocks.
Command
reth bench generate-big-block command
RawTransaction
A single transaction with its gas used and raw encoded bytes.
RpcTransactionSource
RPC-based transaction source that fetches from a remote node.
TransactionCollector
Collects transactions from a source up to a target gas usage.

Traitsยง

TransactionSource
Abstraction over sources of transactions for big block generation.

Functionsยง

big_blocks_stream ๐Ÿ”’
Produces a stream of big block payloads given a stream of regular blocks.
compute_payload_block_hash
Computes the block hash for an [ExecutionData] by converting it to a raw block and hashing the header.
fetch_one_block ๐Ÿ”’
Fetches one block + receipts (and optionally its BAL) from the RPC. Returns Ok(None) when the block doesnโ€™t exist yet (chain-tip reached).
merge_account_changes ๐Ÿ”’
merge_block_access_list ๐Ÿ”’
merge_slot_changes ๐Ÿ”’
shift_account_changes ๐Ÿ”’