This project is an Ethereum indexer that writes block headers and MEV-boost relay data to a remote DuckDB instance. It leverages Reth's Executable Extensions (ExEx) framework to efficiently process and store Ethereum blockchain data.
- Indexes Ethereum block headers
- Captures MEV-boost relay data (winning payloads and proposing relays)
- Writes data to a remote DuckDB instance
- Utilizes Reth's ExEx framework for seamless integration with Reth node
The indexer follows the Ethereum chain head and processes new chain state notifications:
- Reverts headers when necessary
- Inserts new block headers
- Fetches and stores MEV-boost data for each block
init
: Initializes the ExEx and creates necessary DuckDB tablesindexer_exex
: Main ExEx function that processes chain state notificationswrite_headers
: Writes block header data to DuckDBwrite_mevboost_data
: Fetches and writes MEV-boost data to DuckDBrbuilder_types.rs
: MEV-Boost handler for fetching relay data (Flashbots rbuilder)
- Ensure you have Rust and Cargo installed
- Clone this repository
- Set the
DB_ENDPOINT
environment variable to your DuckDB instance URL - Build and run the project with
cargo run
This project is made possible by Reth's Executable Extensions (ExEx) framework, which simplifies the creation of Ethereum indexers and other blockchain-related tools.