Skip to content

Conversation

@Charlie-Mack
Copy link

Draft PR

Resolves #19162 when complete

Changes:

  • Added additional --from-file argument to run reth-bench from a file input

  • Included new modules Block Storage and Generate File

    Block Storage

    • Adds new type alias ConsensusBlock to differentiate between optimism and eth blocks. Happy to hear feedback on this if there is a better way.
    • Provides block type detection from decoded block in files
    • Supports reading batches of RLP encoded blocks from a file with configurable batch size

    Generate File

  • Refactored new_payload_fcu and new_payload_only to run the benchmark against the file type inputs

  • Refactored valid_payload to extract the payload from explicit block types (op + eth) which we have to specify when loading blocks from a file.

I still have work to do to write unit tests and run it against my node (waiting for it to sync) but I thought it was a good moment to open a draft pr to showcase my design and gather some early feedback as I iterate.

- Block storage uses a ConsensusBlock to differentiate between Ethereum and OP block types
- Implements BlockFileReader for streaming blocks from files
- Adds detection for OP blocks from files
- Supports batch reading with configurable batch size
- Generate file generates an RLP encoded block file for a range of blocks from an RPC endpoint (This will be extended / replaced with artificial block building later on)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

High TPS Reth Bench: Load block data from file

1 participant