├── .cargo
└── config.toml
├── .codespellrc
├── .config
└── nextest.toml
├── .dockerignore
├── .editorconfig
├── .gitattributes
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── bug.yml
│ ├── config.yml
│ ├── docs.yml
│ └── feature.yml
├── assets
│ ├── check_wasm.sh
│ ├── hive
│ │ ├── Dockerfile
│ │ ├── build_simulators.sh
│ │ ├── expected_failures.yaml
│ │ ├── expected_failures_experimental.yaml
│ │ ├── load_images.sh
│ │ ├── no_sim_build.diff
│ │ ├── parse.py
│ │ └── run_simulator.sh
│ ├── install_geth.sh
│ └── label_pr.js
├── dependabot.yml
└── workflows
│ ├── assertoor.yml
│ ├── bench.yml
│ ├── book.yml
│ ├── deny.yml
│ ├── dependencies.yml
│ ├── docker.yml
│ ├── eth-sync.yml
│ ├── hive.yml
│ ├── integration.yml
│ ├── label-pr.yml
│ ├── lint-actions.yml
│ ├── lint.yml
│ ├── op-sync.yml
│ ├── release-dist.yml
│ ├── release.yml
│ ├── stage.yml
│ ├── stale.yml
│ └── unit.yml
├── .gitignore
├── CONTRIBUTING.md
├── Cargo.lock
├── Cargo.toml
├── Cross.toml
├── Dockerfile
├── Dockerfile.cross
├── DockerfileOp.cross
├── LICENSE-APACHE
├── LICENSE-MIT
├── Makefile
├── README.md
├── SECURITY.md
├── assets
├── reth-alpha.png
├── reth-beta.png
├── reth-docs.png
├── reth-prod.png
└── reth.jpg
├── audit
└── sigma_prime_audit_v2.pdf
├── bin
├── reth-bench
│ ├── Cargo.toml
│ ├── README.md
│ └── src
│ │ ├── authenticated_transport.rs
│ │ ├── bench
│ │ ├── context.rs
│ │ ├── mod.rs
│ │ ├── new_payload_fcu.rs
│ │ ├── new_payload_only.rs
│ │ └── output.rs
│ │ ├── bench_mode.rs
│ │ ├── main.rs
│ │ └── valid_payload.rs
└── reth
│ ├── Cargo.toml
│ └── src
│ ├── cli
│ └── mod.rs
│ ├── commands
│ ├── debug_cmd
│ │ ├── build_block.rs
│ │ ├── execution.rs
│ │ ├── in_memory_merkle.rs
│ │ ├── merkle.rs
│ │ ├── mod.rs
│ │ └── replay_engine.rs
│ └── mod.rs
│ ├── lib.rs
│ ├── macros.rs
│ ├── main.rs
│ └── optimism.rs
├── book.toml
├── book
├── SUMMARY.md
├── cli
│ ├── SUMMARY.md
│ ├── cli.md
│ ├── help.py
│ ├── op-reth.md
│ ├── reth.md
│ ├── reth
│ │ ├── config.md
│ │ ├── db.md
│ │ ├── db
│ │ │ ├── checksum.md
│ │ │ ├── clear.md
│ │ │ ├── clear
│ │ │ │ ├── mdbx.md
│ │ │ │ ├── static-file.md
│ │ │ │ └── static_file.md
│ │ │ ├── diff.md
│ │ │ ├── drop.md
│ │ │ ├── get.md
│ │ │ ├── get
│ │ │ │ ├── mdbx.md
│ │ │ │ ├── static-file.md
│ │ │ │ └── static_file.md
│ │ │ ├── list.md
│ │ │ ├── path.md
│ │ │ ├── static_file.md
│ │ │ ├── stats.md
│ │ │ └── version.md
│ │ ├── debug.md
│ │ ├── debug
│ │ │ ├── build-block.md
│ │ │ ├── execution.md
│ │ │ ├── in-memory-merkle.md
│ │ │ ├── merkle.md
│ │ │ └── replay-engine.md
│ │ ├── dump-genesis.md
│ │ ├── import-op.md
│ │ ├── import-receipts-op.md
│ │ ├── import.md
│ │ ├── init-state.md
│ │ ├── init.md
│ │ ├── node.md
│ │ ├── p2p.md
│ │ ├── p2p
│ │ │ ├── body.md
│ │ │ ├── header.md
│ │ │ ├── rlpx.md
│ │ │ └── rlpx
│ │ │ │ └── ping.md
│ │ ├── prune.md
│ │ ├── recover.md
│ │ ├── recover
│ │ │ └── storage-tries.md
│ │ ├── stage.md
│ │ ├── stage
│ │ │ ├── drop.md
│ │ │ ├── dump.md
│ │ │ ├── dump
│ │ │ │ ├── account-hashing.md
│ │ │ │ ├── execution.md
│ │ │ │ ├── merkle.md
│ │ │ │ └── storage-hashing.md
│ │ │ ├── run.md
│ │ │ ├── unwind.md
│ │ │ └── unwind
│ │ │ │ ├── num-blocks.md
│ │ │ │ └── to-block.md
│ │ ├── test-vectors.md
│ │ └── test-vectors
│ │ │ └── tables.md
│ └── update.sh
├── developers
│ ├── contribute.md
│ ├── developers.md
│ ├── exex
│ │ ├── assets
│ │ │ └── remote_exex.png
│ │ ├── exex.md
│ │ ├── hello-world.md
│ │ ├── how-it-works.md
│ │ ├── remote.md
│ │ └── tracking-state.md
│ └── profiling.md
├── installation
│ ├── binaries.md
│ ├── build-for-arm-devices.md
│ ├── docker.md
│ ├── installation.md
│ ├── priorities.md
│ └── source.md
├── intro.md
├── jsonrpc
│ ├── admin.md
│ ├── debug.md
│ ├── eth.md
│ ├── intro.md
│ ├── net.md
│ ├── rpc.md
│ ├── trace.md
│ ├── txpool.md
│ └── web3.md
├── run
│ ├── config.md
│ ├── mainnet.md
│ ├── observability.md
│ ├── optimism.md
│ ├── ports.md
│ ├── private-testnet.md
│ ├── pruning.md
│ ├── run-a-node.md
│ ├── sync-op-mainnet.md
│ ├── transactions.md
│ └── troubleshooting.md
├── templates
│ └── source_and_github.md
└── theme
│ └── head.hbs
├── clippy.toml
├── crates
├── blockchain-tree-api
│ ├── Cargo.toml
│ └── src
│ │ ├── error.rs
│ │ └── lib.rs
├── blockchain-tree
│ ├── Cargo.toml
│ ├── docs
│ │ └── mermaid
│ │ │ └── tree.mmd
│ └── src
│ │ ├── block_buffer.rs
│ │ ├── block_indices.rs
│ │ ├── blockchain_tree.rs
│ │ ├── bundle.rs
│ │ ├── canonical_chain.rs
│ │ ├── chain.rs
│ │ ├── config.rs
│ │ ├── externals.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── noop.rs
│ │ ├── shareable.rs
│ │ └── state.rs
├── chain-state
│ ├── Cargo.toml
│ └── src
│ │ ├── chain_info.rs
│ │ ├── in_memory.rs
│ │ ├── lib.rs
│ │ ├── memory_overlay.rs
│ │ ├── notifications.rs
│ │ └── test_utils.rs
├── chainspec
│ ├── Cargo.toml
│ ├── res
│ │ └── genesis
│ │ │ ├── base.json
│ │ │ ├── dev.json
│ │ │ ├── goerli.json
│ │ │ ├── holesky.json
│ │ │ ├── mainnet.json
│ │ │ ├── optimism.json
│ │ │ ├── sepolia.json
│ │ │ ├── sepolia_base.json
│ │ │ └── sepolia_op.json
│ └── src
│ │ ├── api.rs
│ │ ├── constants.rs
│ │ ├── info.rs
│ │ ├── lib.rs
│ │ └── spec.rs
├── cli
│ ├── cli
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── chainspec.rs
│ │ │ └── lib.rs
│ ├── commands
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── common.rs
│ │ │ ├── config_cmd.rs
│ │ │ ├── db
│ │ │ ├── checksum.rs
│ │ │ ├── clear.rs
│ │ │ ├── diff.rs
│ │ │ ├── get.rs
│ │ │ ├── list.rs
│ │ │ ├── mod.rs
│ │ │ ├── stats.rs
│ │ │ └── tui.rs
│ │ │ ├── dump_genesis.rs
│ │ │ ├── import.rs
│ │ │ ├── init_cmd.rs
│ │ │ ├── init_state.rs
│ │ │ ├── lib.rs
│ │ │ ├── node.rs
│ │ │ ├── p2p
│ │ │ ├── mod.rs
│ │ │ └── rlpx.rs
│ │ │ ├── prune.rs
│ │ │ ├── recover
│ │ │ ├── mod.rs
│ │ │ └── storage_tries.rs
│ │ │ ├── stage
│ │ │ ├── drop.rs
│ │ │ ├── dump
│ │ │ │ ├── execution.rs
│ │ │ │ ├── hashing_account.rs
│ │ │ │ ├── hashing_storage.rs
│ │ │ │ ├── merkle.rs
│ │ │ │ └── mod.rs
│ │ │ ├── mod.rs
│ │ │ ├── run.rs
│ │ │ └── unwind.rs
│ │ │ └── test_vectors
│ │ │ ├── mod.rs
│ │ │ └── tables.rs
│ ├── runner
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ └── util
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── lib.rs
│ │ ├── load_secret_key.rs
│ │ ├── parsers.rs
│ │ └── sigsegv_handler.rs
├── config
│ ├── Cargo.toml
│ └── src
│ │ ├── config.rs
│ │ └── lib.rs
├── consensus
│ ├── auto-seal
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── client.rs
│ │ │ ├── lib.rs
│ │ │ ├── mode.rs
│ │ │ └── task.rs
│ ├── beacon
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── engine
│ │ │ ├── error.rs
│ │ │ ├── event.rs
│ │ │ ├── forkchoice.rs
│ │ │ ├── handle.rs
│ │ │ ├── hooks
│ │ │ │ ├── controller.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── prune.rs
│ │ │ │ └── static_file.rs
│ │ │ ├── invalid_headers.rs
│ │ │ ├── message.rs
│ │ │ ├── metrics.rs
│ │ │ ├── mod.rs
│ │ │ ├── sync.rs
│ │ │ └── test_utils.rs
│ │ │ └── lib.rs
│ ├── common
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── calc.rs
│ │ │ ├── lib.rs
│ │ │ └── validation.rs
│ ├── consensus
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── noop.rs
│ │ │ └── test_utils.rs
│ └── debug-client
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── client.rs
│ │ ├── lib.rs
│ │ └── providers
│ │ ├── etherscan.rs
│ │ ├── mod.rs
│ │ └── rpc.rs
├── e2e-test-utils
│ ├── Cargo.toml
│ └── src
│ │ ├── engine_api.rs
│ │ ├── lib.rs
│ │ ├── network.rs
│ │ ├── node.rs
│ │ ├── payload.rs
│ │ ├── rpc.rs
│ │ ├── traits.rs
│ │ ├── transaction.rs
│ │ └── wallet.rs
├── engine
│ ├── primitives
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── service
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── service.rs
│ ├── tree
│ │ ├── Cargo.toml
│ │ ├── src
│ │ │ ├── backfill.rs
│ │ │ ├── chain.rs
│ │ │ ├── download.rs
│ │ │ ├── engine.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics.rs
│ │ │ ├── persistence.rs
│ │ │ ├── test_utils.rs
│ │ │ └── tree
│ │ │ │ ├── config.rs
│ │ │ │ ├── metrics.rs
│ │ │ │ └── mod.rs
│ │ └── test-data
│ │ │ └── holesky
│ │ │ ├── 1.rlp
│ │ │ └── 2.rlp
│ └── util
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── engine_store.rs
│ │ ├── lib.rs
│ │ ├── reorg.rs
│ │ ├── skip_fcu.rs
│ │ └── skip_new_payload.rs
├── errors
│ ├── Cargo.toml
│ └── src
│ │ ├── error.rs
│ │ └── lib.rs
├── ethereum-forks
│ ├── Cargo.toml
│ └── src
│ │ ├── display.rs
│ │ ├── forkcondition.rs
│ │ ├── forkid.rs
│ │ ├── hardfork
│ │ ├── dev.rs
│ │ ├── ethereum.rs
│ │ ├── macros.rs
│ │ ├── mod.rs
│ │ └── optimism.rs
│ │ ├── hardforks
│ │ ├── ethereum.rs
│ │ ├── mod.rs
│ │ └── optimism.rs
│ │ ├── head.rs
│ │ └── lib.rs
├── ethereum
│ ├── cli
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── chainspec.rs
│ │ │ └── lib.rs
│ ├── consensus
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── validation.rs
│ ├── engine-primitives
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── payload.rs
│ ├── evm
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── config.rs
│ │ │ ├── dao_fork.rs
│ │ │ ├── eip6110.rs
│ │ │ ├── execute.rs
│ │ │ └── lib.rs
│ ├── node
│ │ ├── Cargo.toml
│ │ ├── src
│ │ │ ├── evm.rs
│ │ │ ├── lib.rs
│ │ │ └── node.rs
│ │ └── tests
│ │ │ ├── assets
│ │ │ └── genesis.json
│ │ │ ├── e2e
│ │ │ ├── blobs.rs
│ │ │ ├── dev.rs
│ │ │ ├── eth.rs
│ │ │ ├── main.rs
│ │ │ ├── p2p.rs
│ │ │ └── utils.rs
│ │ │ └── it
│ │ │ ├── builder.rs
│ │ │ ├── exex.rs
│ │ │ └── main.rs
│ └── payload
│ │ ├── Cargo.toml
│ │ └── src
│ │ └── lib.rs
├── etl
│ ├── Cargo.toml
│ └── src
│ │ └── lib.rs
├── evm
│ ├── Cargo.toml
│ ├── execution-errors
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── trie.rs
│ ├── execution-types
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── chain.rs
│ │ │ ├── execute.rs
│ │ │ ├── execution_outcome.rs
│ │ │ └── lib.rs
│ └── src
│ │ ├── builder.rs
│ │ ├── either.rs
│ │ ├── execute.rs
│ │ ├── lib.rs
│ │ ├── noop.rs
│ │ ├── provider.rs
│ │ ├── system_calls.rs
│ │ └── test_utils.rs
├── exex
│ ├── exex
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── backfill
│ │ │ ├── factory.rs
│ │ │ ├── job.rs
│ │ │ ├── mod.rs
│ │ │ ├── stream.rs
│ │ │ └── test_utils.rs
│ │ │ ├── context.rs
│ │ │ ├── event.rs
│ │ │ ├── lib.rs
│ │ │ └── manager.rs
│ ├── test-utils
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ └── types
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── finished_height.rs
│ │ ├── lib.rs
│ │ └── notification.rs
├── fs-util
│ ├── Cargo.toml
│ └── src
│ │ └── lib.rs
├── metrics
│ ├── Cargo.toml
│ ├── metrics-derive
│ │ ├── Cargo.toml
│ │ ├── src
│ │ │ ├── expand.rs
│ │ │ ├── lib.rs
│ │ │ ├── metric.rs
│ │ │ └── with_attrs.rs
│ │ └── tests
│ │ │ ├── compile-fail
│ │ │ ├── metric_attr.rs
│ │ │ ├── metric_attr.stderr
│ │ │ ├── metrics_attr.rs
│ │ │ └── metrics_attr.stderr
│ │ │ ├── metrics.rs
│ │ │ └── trybuild.rs
│ └── src
│ │ ├── common
│ │ ├── mod.rs
│ │ └── mpsc.rs
│ │ └── lib.rs
├── net
│ ├── banlist
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── discv4
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src
│ │ │ ├── config.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── node.rs
│ │ │ ├── proto.rs
│ │ │ ├── table.rs
│ │ │ └── test_utils.rs
│ ├── discv5
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src
│ │ │ ├── config.rs
│ │ │ ├── enr.rs
│ │ │ ├── error.rs
│ │ │ ├── filter.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics.rs
│ │ │ └── network_stack_id.rs
│ ├── dns
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── config.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── query.rs
│ │ │ ├── resolver.rs
│ │ │ ├── sync.rs
│ │ │ └── tree.rs
│ ├── downloaders
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── bodies
│ │ │ ├── bodies.rs
│ │ │ ├── mod.rs
│ │ │ ├── noop.rs
│ │ │ ├── queue.rs
│ │ │ ├── request.rs
│ │ │ ├── task.rs
│ │ │ └── test_utils.rs
│ │ │ ├── file_client.rs
│ │ │ ├── file_codec.rs
│ │ │ ├── headers
│ │ │ ├── mod.rs
│ │ │ ├── noop.rs
│ │ │ ├── reverse_headers.rs
│ │ │ ├── task.rs
│ │ │ └── test_utils.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics.rs
│ │ │ ├── receipt_file_client.rs
│ │ │ └── test_utils
│ │ │ ├── bodies_client.rs
│ │ │ └── mod.rs
│ ├── ecies
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── algorithm.rs
│ │ │ ├── codec.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── mac.rs
│ │ │ ├── stream.rs
│ │ │ └── util.rs
│ ├── eth-wire-types
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── blocks.rs
│ │ │ ├── broadcast.rs
│ │ │ ├── capability.rs
│ │ │ ├── disconnect_reason.rs
│ │ │ ├── header.rs
│ │ │ ├── lib.rs
│ │ │ ├── message.rs
│ │ │ ├── receipts.rs
│ │ │ ├── response.rs
│ │ │ ├── state.rs
│ │ │ ├── status.rs
│ │ │ ├── transactions.rs
│ │ │ └── version.rs
│ ├── eth-wire
│ │ ├── Cargo.toml
│ │ ├── src
│ │ │ ├── capability.rs
│ │ │ ├── disconnect.rs
│ │ │ ├── errors
│ │ │ │ ├── eth.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── p2p.rs
│ │ │ ├── ethstream.rs
│ │ │ ├── hello.rs
│ │ │ ├── lib.rs
│ │ │ ├── multiplex.rs
│ │ │ ├── p2pstream.rs
│ │ │ ├── pinger.rs
│ │ │ ├── protocol.rs
│ │ │ └── test_utils.rs
│ │ ├── testdata
│ │ │ ├── blob_transaction
│ │ │ ├── bsc_new_block_network_one
│ │ │ ├── bsc_new_block_network_two
│ │ │ ├── new_block_network_rlp
│ │ │ ├── new_pooled_transactions_network_rlp
│ │ │ ├── pooled_transactions_with_blob
│ │ │ ├── request_pair_pooled_blob_transactions
│ │ │ └── rpc_blob_transaction
│ │ └── tests
│ │ │ ├── fuzz_roundtrip.rs
│ │ │ ├── new_block.rs
│ │ │ ├── new_pooled_transactions.rs
│ │ │ └── pooled_transactions.rs
│ ├── nat
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── network-api
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── downloaders.rs
│ │ │ ├── error.rs
│ │ │ ├── events.rs
│ │ │ ├── lib.rs
│ │ │ ├── noop.rs
│ │ │ └── test_utils
│ │ │ ├── mod.rs
│ │ │ └── peers_manager.rs
│ ├── network-types
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── backoff.rs
│ │ │ ├── lib.rs
│ │ │ ├── peers
│ │ │ ├── addr.rs
│ │ │ ├── config.rs
│ │ │ ├── kind.rs
│ │ │ ├── mod.rs
│ │ │ ├── reputation.rs
│ │ │ └── state.rs
│ │ │ └── session
│ │ │ ├── config.rs
│ │ │ └── mod.rs
│ ├── network
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── benches
│ │ │ └── bench.rs
│ │ ├── docs
│ │ │ └── mermaid
│ │ │ │ ├── fetch-client.mmd
│ │ │ │ ├── network-manager.mmd
│ │ │ │ └── swarm.mmd
│ │ ├── src
│ │ │ ├── budget.rs
│ │ │ ├── builder.rs
│ │ │ ├── cache.rs
│ │ │ ├── config.rs
│ │ │ ├── discovery.rs
│ │ │ ├── error.rs
│ │ │ ├── eth_requests.rs
│ │ │ ├── fetch
│ │ │ │ ├── client.rs
│ │ │ │ └── mod.rs
│ │ │ ├── flattened_response.rs
│ │ │ ├── import.rs
│ │ │ ├── lib.rs
│ │ │ ├── listener.rs
│ │ │ ├── manager.rs
│ │ │ ├── message.rs
│ │ │ ├── metrics.rs
│ │ │ ├── network.rs
│ │ │ ├── peers.rs
│ │ │ ├── protocol.rs
│ │ │ ├── session
│ │ │ │ ├── active.rs
│ │ │ │ ├── conn.rs
│ │ │ │ ├── counter.rs
│ │ │ │ ├── handle.rs
│ │ │ │ └── mod.rs
│ │ │ ├── state.rs
│ │ │ ├── swarm.rs
│ │ │ ├── test_utils
│ │ │ │ ├── init.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── testnet.rs
│ │ │ └── transactions
│ │ │ │ ├── config.rs
│ │ │ │ ├── constants.rs
│ │ │ │ ├── fetcher.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── validation.rs
│ │ └── tests
│ │ │ └── it
│ │ │ ├── big_pooled_txs_req.rs
│ │ │ ├── connect.rs
│ │ │ ├── main.rs
│ │ │ ├── multiplex.rs
│ │ │ ├── requests.rs
│ │ │ ├── session.rs
│ │ │ ├── startup.rs
│ │ │ └── txgossip.rs
│ ├── p2p
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── bodies
│ │ │ ├── client.rs
│ │ │ ├── downloader.rs
│ │ │ ├── mod.rs
│ │ │ └── response.rs
│ │ │ ├── download.rs
│ │ │ ├── either.rs
│ │ │ ├── error.rs
│ │ │ ├── full_block.rs
│ │ │ ├── headers
│ │ │ ├── client.rs
│ │ │ ├── downloader.rs
│ │ │ ├── error.rs
│ │ │ └── mod.rs
│ │ │ ├── lib.rs
│ │ │ ├── priority.rs
│ │ │ ├── sync.rs
│ │ │ └── test_utils
│ │ │ ├── bodies.rs
│ │ │ ├── full_block.rs
│ │ │ ├── headers.rs
│ │ │ └── mod.rs
│ └── peers
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── bootnodes
│ │ ├── ethereum.rs
│ │ ├── mod.rs
│ │ └── optimism.rs
│ │ ├── lib.rs
│ │ ├── node_record.rs
│ │ └── trusted_peer.rs
├── node
│ ├── api
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── node.rs
│ │ │ └── primitives.rs
│ ├── builder
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── docs
│ │ │ └── mermaid
│ │ │ │ └── builder.mmd
│ │ └── src
│ │ │ ├── builder
│ │ │ ├── add_ons.rs
│ │ │ ├── mod.rs
│ │ │ └── states.rs
│ │ │ ├── components
│ │ │ ├── builder.rs
│ │ │ ├── consensus.rs
│ │ │ ├── execute.rs
│ │ │ ├── mod.rs
│ │ │ ├── network.rs
│ │ │ ├── payload.rs
│ │ │ └── pool.rs
│ │ │ ├── exex.rs
│ │ │ ├── handle.rs
│ │ │ ├── hooks.rs
│ │ │ ├── launch
│ │ │ ├── common.rs
│ │ │ ├── engine.rs
│ │ │ ├── exex.rs
│ │ │ └── mod.rs
│ │ │ ├── lib.rs
│ │ │ ├── node.rs
│ │ │ ├── rpc.rs
│ │ │ └── setup.rs
│ ├── core
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src
│ │ │ ├── args
│ │ │ ├── benchmark_args.rs
│ │ │ ├── database.rs
│ │ │ ├── datadir_args.rs
│ │ │ ├── debug.rs
│ │ │ ├── dev.rs
│ │ │ ├── gas_price_oracle.rs
│ │ │ ├── log.rs
│ │ │ ├── mod.rs
│ │ │ ├── network.rs
│ │ │ ├── payload_builder.rs
│ │ │ ├── pruning.rs
│ │ │ ├── rpc_server.rs
│ │ │ ├── rpc_state_cache.rs
│ │ │ ├── stage.rs
│ │ │ ├── txpool.rs
│ │ │ ├── types.rs
│ │ │ └── utils.rs
│ │ │ ├── cli
│ │ │ ├── config.rs
│ │ │ └── mod.rs
│ │ │ ├── dirs.rs
│ │ │ ├── exit.rs
│ │ │ ├── lib.rs
│ │ │ ├── node_config.rs
│ │ │ ├── utils.rs
│ │ │ └── version.rs
│ ├── events
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── cl.rs
│ │ │ ├── lib.rs
│ │ │ └── node.rs
│ └── metrics
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── hooks.rs
│ │ ├── lib.rs
│ │ ├── recorder.rs
│ │ ├── server.rs
│ │ └── version.rs
├── optimism
│ ├── cli
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── chainspec.rs
│ │ │ ├── commands
│ │ │ ├── build_pipeline.rs
│ │ │ ├── import.rs
│ │ │ ├── import_receipts.rs
│ │ │ └── mod.rs
│ │ │ ├── file_codec_ovm_receipt.rs
│ │ │ └── lib.rs
│ ├── consensus
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── validation.rs
│ ├── evm
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── config.rs
│ │ │ ├── error.rs
│ │ │ ├── execute.rs
│ │ │ ├── l1.rs
│ │ │ └── lib.rs
│ ├── node
│ │ ├── Cargo.toml
│ │ ├── src
│ │ │ ├── args.rs
│ │ │ ├── engine.rs
│ │ │ ├── lib.rs
│ │ │ ├── node.rs
│ │ │ ├── rpc.rs
│ │ │ └── txpool.rs
│ │ └── tests
│ │ │ ├── assets
│ │ │ └── genesis.json
│ │ │ ├── e2e
│ │ │ ├── main.rs
│ │ │ ├── p2p.rs
│ │ │ └── utils.rs
│ │ │ └── it
│ │ │ ├── builder.rs
│ │ │ └── main.rs
│ ├── payload
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── builder.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ └── payload.rs
│ ├── primitives
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── bedrock_import.rs
│ │ │ └── lib.rs
│ └── rpc
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── api.rs
│ │ ├── error.rs
│ │ ├── eth
│ │ ├── block.rs
│ │ ├── call.rs
│ │ ├── mod.rs
│ │ ├── pending_block.rs
│ │ ├── receipt.rs
│ │ └── transaction.rs
│ │ └── lib.rs
├── payload
│ ├── basic
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── metrics.rs
│ ├── builder
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── database.rs
│ │ │ ├── error.rs
│ │ │ ├── events.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics.rs
│ │ │ ├── noop.rs
│ │ │ ├── service.rs
│ │ │ ├── test_utils.rs
│ │ │ └── traits.rs
│ ├── primitives
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── payload.rs
│ │ │ └── traits.rs
│ └── validator
│ │ ├── Cargo.toml
│ │ └── src
│ │ └── lib.rs
├── primitives-traits
│ ├── Cargo.toml
│ └── src
│ │ ├── account.rs
│ │ ├── alloy_compat.rs
│ │ ├── constants
│ │ ├── gas_units.rs
│ │ └── mod.rs
│ │ ├── error.rs
│ │ ├── header
│ │ ├── error.rs
│ │ ├── mod.rs
│ │ ├── sealed.rs
│ │ └── test_utils.rs
│ │ ├── integer_list.rs
│ │ ├── lib.rs
│ │ ├── log.rs
│ │ ├── request.rs
│ │ ├── storage.rs
│ │ └── withdrawal.rs
├── primitives
│ ├── Cargo.toml
│ ├── benches
│ │ ├── recover_ecdsa_crit.rs
│ │ └── validate_blob_tx.rs
│ └── src
│ │ ├── alloy_compat.rs
│ │ ├── basefee.rs
│ │ ├── block.rs
│ │ ├── compression
│ │ ├── mod.rs
│ │ ├── receipt_dictionary.bin
│ │ └── transaction_dictionary.bin
│ │ ├── constants
│ │ ├── eip4844.rs
│ │ └── mod.rs
│ │ ├── eip4844.rs
│ │ ├── eip7702.rs
│ │ ├── genesis.rs
│ │ ├── lib.rs
│ │ ├── proofs.rs
│ │ ├── receipt.rs
│ │ └── transaction
│ │ ├── access_list.rs
│ │ ├── blob_data
│ │ ├── README.md
│ │ ├── blob1.json
│ │ ├── blob2.json
│ │ ├── blob3.json
│ │ └── blob4.json
│ │ ├── compat.rs
│ │ ├── eip1559.rs
│ │ ├── eip2930.rs
│ │ ├── eip4844.rs
│ │ ├── eip7702.rs
│ │ ├── error.rs
│ │ ├── legacy.rs
│ │ ├── meta.rs
│ │ ├── mod.rs
│ │ ├── optimism.rs
│ │ ├── pooled.rs
│ │ ├── sidecar.rs
│ │ ├── signature.rs
│ │ ├── tx_type.rs
│ │ ├── util.rs
│ │ └── variant.rs
├── prune
│ ├── prune
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── builder.rs
│ │ │ ├── error.rs
│ │ │ ├── event.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics.rs
│ │ │ ├── pruner.rs
│ │ │ └── segments
│ │ │ ├── mod.rs
│ │ │ ├── receipts.rs
│ │ │ ├── set.rs
│ │ │ ├── static_file
│ │ │ ├── headers.rs
│ │ │ ├── mod.rs
│ │ │ ├── receipts.rs
│ │ │ └── transactions.rs
│ │ │ └── user
│ │ │ ├── account_history.rs
│ │ │ ├── history.rs
│ │ │ ├── mod.rs
│ │ │ ├── receipts.rs
│ │ │ ├── receipts_by_logs.rs
│ │ │ ├── sender_recovery.rs
│ │ │ ├── storage_history.rs
│ │ │ └── transaction_lookup.rs
│ └── types
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── checkpoint.rs
│ │ ├── lib.rs
│ │ ├── limiter.rs
│ │ ├── mode.rs
│ │ ├── pruner.rs
│ │ ├── segment.rs
│ │ └── target.rs
├── revm
│ ├── Cargo.toml
│ └── src
│ │ ├── batch.rs
│ │ ├── database.rs
│ │ ├── lib.rs
│ │ ├── state_change.rs
│ │ └── test_utils.rs
├── rpc
│ ├── ipc
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src
│ │ │ ├── client
│ │ │ └── mod.rs
│ │ │ ├── lib.rs
│ │ │ ├── server
│ │ │ ├── connection.rs
│ │ │ ├── ipc.rs
│ │ │ ├── mod.rs
│ │ │ └── rpc_service.rs
│ │ │ └── stream_codec.rs
│ ├── rpc-api
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── admin.rs
│ │ │ ├── anvil.rs
│ │ │ ├── debug.rs
│ │ │ ├── engine.rs
│ │ │ ├── ganache.rs
│ │ │ ├── hardhat.rs
│ │ │ ├── lib.rs
│ │ │ ├── mev.rs
│ │ │ ├── net.rs
│ │ │ ├── otterscan.rs
│ │ │ ├── reth.rs
│ │ │ ├── rpc.rs
│ │ │ ├── trace.rs
│ │ │ ├── txpool.rs
│ │ │ ├── validation.rs
│ │ │ └── web3.rs
│ ├── rpc-builder
│ │ ├── Cargo.toml
│ │ ├── src
│ │ │ ├── auth.rs
│ │ │ ├── config.rs
│ │ │ ├── cors.rs
│ │ │ ├── error.rs
│ │ │ ├── eth.rs
│ │ │ ├── lib.rs
│ │ │ └── metrics.rs
│ │ └── tests
│ │ │ └── it
│ │ │ ├── auth.rs
│ │ │ ├── http.rs
│ │ │ ├── main.rs
│ │ │ ├── middleware.rs
│ │ │ ├── serde.rs
│ │ │ ├── startup.rs
│ │ │ └── utils.rs
│ ├── rpc-engine-api
│ │ ├── Cargo.toml
│ │ ├── src
│ │ │ ├── capabilities.rs
│ │ │ ├── engine_api.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── message.rs
│ │ │ └── metrics.rs
│ │ └── tests
│ │ │ └── it
│ │ │ ├── main.rs
│ │ │ └── payload.rs
│ ├── rpc-eth-api
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── bundle.rs
│ │ │ ├── core.rs
│ │ │ ├── filter.rs
│ │ │ ├── helpers
│ │ │ ├── block.rs
│ │ │ ├── blocking_task.rs
│ │ │ ├── call.rs
│ │ │ ├── error.rs
│ │ │ ├── fee.rs
│ │ │ ├── mod.rs
│ │ │ ├── pending_block.rs
│ │ │ ├── receipt.rs
│ │ │ ├── signer.rs
│ │ │ ├── spec.rs
│ │ │ ├── state.rs
│ │ │ ├── trace.rs
│ │ │ └── transaction.rs
│ │ │ ├── lib.rs
│ │ │ ├── pubsub.rs
│ │ │ └── types.rs
│ ├── rpc-eth-types
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── builder
│ │ │ ├── config.rs
│ │ │ ├── ctx.rs
│ │ │ └── mod.rs
│ │ │ ├── cache
│ │ │ ├── config.rs
│ │ │ ├── db.rs
│ │ │ ├── metrics.rs
│ │ │ ├── mod.rs
│ │ │ └── multi_consumer.rs
│ │ │ ├── error.rs
│ │ │ ├── fee_history.rs
│ │ │ ├── gas_oracle.rs
│ │ │ ├── id_provider.rs
│ │ │ ├── lib.rs
│ │ │ ├── logs_utils.rs
│ │ │ ├── pending_block.rs
│ │ │ ├── receipt.rs
│ │ │ ├── revm_utils.rs
│ │ │ ├── transaction.rs
│ │ │ └── utils.rs
│ ├── rpc-layer
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── auth_client_layer.rs
│ │ │ ├── auth_layer.rs
│ │ │ ├── jwt_validator.rs
│ │ │ └── lib.rs
│ ├── rpc-server-types
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── constants.rs
│ │ │ ├── lib.rs
│ │ │ ├── module.rs
│ │ │ └── result.rs
│ ├── rpc-testing-util
│ │ ├── Cargo.toml
│ │ ├── assets
│ │ │ ├── noop-tracer.js
│ │ │ └── tracer-template.js
│ │ ├── src
│ │ │ ├── debug.rs
│ │ │ ├── lib.rs
│ │ │ ├── trace.rs
│ │ │ └── utils.rs
│ │ └── tests
│ │ │ └── it
│ │ │ ├── main.rs
│ │ │ └── trace.rs
│ ├── rpc-types-compat
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── block.rs
│ │ │ ├── engine
│ │ │ ├── mod.rs
│ │ │ └── payload.rs
│ │ │ ├── lib.rs
│ │ │ ├── proof.rs
│ │ │ └── transaction
│ │ │ ├── mod.rs
│ │ │ ├── signature.rs
│ │ │ └── typed.rs
│ ├── rpc-types
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── eth
│ │ │ ├── error.rs
│ │ │ ├── mod.rs
│ │ │ └── transaction
│ │ │ │ ├── mod.rs
│ │ │ │ ├── request.rs
│ │ │ │ └── typed.rs
│ │ │ └── lib.rs
│ └── rpc
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── admin.rs
│ │ ├── debug.rs
│ │ ├── engine.rs
│ │ ├── eth
│ │ ├── bundle.rs
│ │ ├── core.rs
│ │ ├── filter.rs
│ │ ├── helpers
│ │ │ ├── block.rs
│ │ │ ├── call.rs
│ │ │ ├── fees.rs
│ │ │ ├── mod.rs
│ │ │ ├── pending_block.rs
│ │ │ ├── receipt.rs
│ │ │ ├── signer.rs
│ │ │ ├── spec.rs
│ │ │ ├── state.rs
│ │ │ ├── trace.rs
│ │ │ └── transaction.rs
│ │ ├── mod.rs
│ │ └── pubsub.rs
│ │ ├── lib.rs
│ │ ├── net.rs
│ │ ├── otterscan.rs
│ │ ├── reth.rs
│ │ ├── rpc.rs
│ │ ├── trace.rs
│ │ ├── txpool.rs
│ │ └── web3.rs
├── stages
│ ├── api
│ │ ├── Cargo.toml
│ │ ├── docs
│ │ │ └── mermaid
│ │ │ │ └── pipeline.mmd
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics
│ │ │ ├── listener.rs
│ │ │ ├── mod.rs
│ │ │ └── sync_metrics.rs
│ │ │ ├── pipeline
│ │ │ ├── builder.rs
│ │ │ ├── ctrl.rs
│ │ │ ├── event.rs
│ │ │ ├── mod.rs
│ │ │ ├── progress.rs
│ │ │ └── set.rs
│ │ │ ├── stage.rs
│ │ │ ├── test_utils.rs
│ │ │ └── util.rs
│ ├── stages
│ │ ├── Cargo.toml
│ │ ├── benches
│ │ │ ├── README.md
│ │ │ ├── criterion.rs
│ │ │ └── setup
│ │ │ │ ├── account_hashing.rs
│ │ │ │ ├── constants.rs
│ │ │ │ └── mod.rs
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── prelude.rs
│ │ │ ├── sets.rs
│ │ │ ├── stages
│ │ │ ├── bodies.rs
│ │ │ ├── execution.rs
│ │ │ ├── finish.rs
│ │ │ ├── hashing_account.rs
│ │ │ ├── hashing_storage.rs
│ │ │ ├── headers.rs
│ │ │ ├── index_account_history.rs
│ │ │ ├── index_storage_history.rs
│ │ │ ├── merkle.rs
│ │ │ ├── mod.rs
│ │ │ ├── prune.rs
│ │ │ ├── sender_recovery.rs
│ │ │ ├── tx_lookup.rs
│ │ │ └── utils.rs
│ │ │ └── test_utils
│ │ │ ├── macros.rs
│ │ │ ├── mod.rs
│ │ │ ├── runner.rs
│ │ │ ├── set.rs
│ │ │ └── test_db.rs
│ └── types
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── checkpoints.rs
│ │ ├── execution.rs
│ │ ├── id.rs
│ │ └── lib.rs
├── static-file
│ ├── static-file
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src
│ │ │ ├── event.rs
│ │ │ ├── lib.rs
│ │ │ ├── segments
│ │ │ ├── headers.rs
│ │ │ ├── mod.rs
│ │ │ ├── receipts.rs
│ │ │ └── transactions.rs
│ │ │ └── static_file_producer.rs
│ └── types
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── compression.rs
│ │ ├── filters.rs
│ │ ├── lib.rs
│ │ └── segment.rs
├── storage
│ ├── codecs
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── derive
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── arbitrary.rs
│ │ │ │ ├── compact
│ │ │ │ ├── enums.rs
│ │ │ │ ├── flags.rs
│ │ │ │ ├── generator.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── structs.rs
│ │ │ │ └── lib.rs
│ │ ├── src
│ │ │ ├── alloy
│ │ │ │ ├── access_list.rs
│ │ │ │ ├── authorization_list.rs
│ │ │ │ ├── genesis_account.rs
│ │ │ │ ├── log.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── request.rs
│ │ │ │ ├── trie.rs
│ │ │ │ ├── txkind.rs
│ │ │ │ └── withdrawal.rs
│ │ │ └── lib.rs
│ │ └── testdata
│ │ │ ├── access_list_compact.json
│ │ │ └── log_compact.json
│ ├── db-api
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── common.rs
│ │ │ ├── cursor.rs
│ │ │ ├── database.rs
│ │ │ ├── database_metrics.rs
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── models
│ │ │ ├── accounts.rs
│ │ │ ├── blocks.rs
│ │ │ ├── client_version.rs
│ │ │ ├── integer_list.rs
│ │ │ ├── mod.rs
│ │ │ ├── sharded_key.rs
│ │ │ └── storage_sharded_key.rs
│ │ │ ├── scale.rs
│ │ │ ├── table.rs
│ │ │ ├── transaction.rs
│ │ │ └── utils.rs
│ ├── db-common
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── db_tool
│ │ │ └── mod.rs
│ │ │ ├── init.rs
│ │ │ └── lib.rs
│ ├── db-models
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── accounts.rs
│ │ │ ├── blocks.rs
│ │ │ └── lib.rs
│ ├── db
│ │ ├── Cargo.toml
│ │ ├── benches
│ │ │ ├── README.md
│ │ │ ├── criterion.rs
│ │ │ ├── hash_keys.rs
│ │ │ ├── iai.rs
│ │ │ └── utils.rs
│ │ └── src
│ │ │ ├── implementation
│ │ │ ├── mdbx
│ │ │ │ ├── cursor.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── tx.rs
│ │ │ └── mod.rs
│ │ │ ├── lib.rs
│ │ │ ├── lockfile.rs
│ │ │ ├── mdbx.rs
│ │ │ ├── metrics.rs
│ │ │ ├── static_file
│ │ │ ├── cursor.rs
│ │ │ ├── mask.rs
│ │ │ ├── masks.rs
│ │ │ └── mod.rs
│ │ │ ├── tables
│ │ │ ├── codecs
│ │ │ │ ├── fuzz
│ │ │ │ │ ├── inputs.rs
│ │ │ │ │ └── mod.rs
│ │ │ │ └── mod.rs
│ │ │ ├── mod.rs
│ │ │ ├── raw.rs
│ │ │ └── utils.rs
│ │ │ ├── utils.rs
│ │ │ └── version.rs
│ ├── errors
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── db.rs
│ │ │ ├── lib.rs
│ │ │ ├── lockfile.rs
│ │ │ ├── provider.rs
│ │ │ └── writer.rs
│ ├── libmdbx-rs
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── benches
│ │ │ ├── cursor.rs
│ │ │ ├── transaction.rs
│ │ │ └── utils.rs
│ │ ├── mdbx-sys
│ │ │ ├── Cargo.toml
│ │ │ ├── build.rs
│ │ │ ├── libmdbx
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── GNUmakefile
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── VERSION.txt
│ │ │ │ ├── cmake
│ │ │ │ │ ├── compiler.cmake
│ │ │ │ │ ├── profile.cmake
│ │ │ │ │ └── utils.cmake
│ │ │ │ ├── config.h.in
│ │ │ │ ├── man1
│ │ │ │ │ ├── mdbx_chk.1
│ │ │ │ │ ├── mdbx_copy.1
│ │ │ │ │ ├── mdbx_drop.1
│ │ │ │ │ ├── mdbx_dump.1
│ │ │ │ │ ├── mdbx_load.1
│ │ │ │ │ └── mdbx_stat.1
│ │ │ │ ├── mdbx.c
│ │ │ │ ├── mdbx.c++
│ │ │ │ ├── mdbx.h
│ │ │ │ ├── mdbx.h++
│ │ │ │ ├── mdbx_chk.c
│ │ │ │ ├── mdbx_copy.c
│ │ │ │ ├── mdbx_drop.c
│ │ │ │ ├── mdbx_dump.c
│ │ │ │ ├── mdbx_load.c
│ │ │ │ ├── mdbx_stat.c
│ │ │ │ └── ntdll.def
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ ├── src
│ │ │ ├── codec.rs
│ │ │ ├── cursor.rs
│ │ │ ├── database.rs
│ │ │ ├── environment.rs
│ │ │ ├── error.rs
│ │ │ ├── flags.rs
│ │ │ ├── lib.rs
│ │ │ ├── transaction.rs
│ │ │ └── txn_manager.rs
│ │ └── tests
│ │ │ ├── cursor.rs
│ │ │ ├── environment.rs
│ │ │ └── transaction.rs
│ ├── nippy-jar
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── compression
│ │ │ ├── lz4.rs
│ │ │ ├── mod.rs
│ │ │ └── zstd.rs
│ │ │ ├── cursor.rs
│ │ │ ├── error.rs
│ │ │ ├── filter
│ │ │ ├── cuckoo.rs
│ │ │ └── mod.rs
│ │ │ ├── lib.rs
│ │ │ ├── phf
│ │ │ ├── fmph.rs
│ │ │ ├── go_fmph.rs
│ │ │ └── mod.rs
│ │ │ └── writer.rs
│ ├── provider
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── bundle_state
│ │ │ ├── mod.rs
│ │ │ └── state_reverts.rs
│ │ │ ├── lib.rs
│ │ │ ├── providers
│ │ │ ├── blockchain_provider.rs
│ │ │ ├── bundle_state_provider.rs
│ │ │ ├── consistent_view.rs
│ │ │ ├── database
│ │ │ │ ├── metrics.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── provider.rs
│ │ │ ├── mod.rs
│ │ │ ├── state
│ │ │ │ ├── historical.rs
│ │ │ │ ├── latest.rs
│ │ │ │ ├── macros.rs
│ │ │ │ └── mod.rs
│ │ │ └── static_file
│ │ │ │ ├── jar.rs
│ │ │ │ ├── manager.rs
│ │ │ │ ├── metrics.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── writer.rs
│ │ │ ├── test_utils
│ │ │ ├── blocks.rs
│ │ │ ├── mock.rs
│ │ │ ├── mod.rs
│ │ │ └── noop.rs
│ │ │ ├── traits
│ │ │ ├── block.rs
│ │ │ ├── chain_info.rs
│ │ │ ├── database_provider.rs
│ │ │ ├── finalized_block.rs
│ │ │ ├── full.rs
│ │ │ ├── hashing.rs
│ │ │ ├── header_sync_gap.rs
│ │ │ ├── history.rs
│ │ │ ├── mod.rs
│ │ │ ├── state.rs
│ │ │ ├── static_file_provider.rs
│ │ │ ├── stats.rs
│ │ │ ├── tree_viewer.rs
│ │ │ └── trie.rs
│ │ │ └── writer
│ │ │ ├── database.rs
│ │ │ ├── mod.rs
│ │ │ └── static_file.rs
│ └── storage-api
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── account.rs
│ │ ├── block.rs
│ │ ├── block_hash.rs
│ │ ├── block_id.rs
│ │ ├── header.rs
│ │ ├── lib.rs
│ │ ├── noop.rs
│ │ ├── prune_checkpoint.rs
│ │ ├── receipts.rs
│ │ ├── requests.rs
│ │ ├── stage_checkpoint.rs
│ │ ├── state.rs
│ │ ├── storage.rs
│ │ ├── transactions.rs
│ │ ├── trie.rs
│ │ └── withdrawals.rs
├── tasks
│ ├── Cargo.toml
│ └── src
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── pool.rs
│ │ └── shutdown.rs
├── tokio-util
│ ├── Cargo.toml
│ └── src
│ │ ├── event_sender.rs
│ │ ├── event_stream.rs
│ │ ├── lib.rs
│ │ └── ratelimit.rs
├── tracing
│ ├── Cargo.toml
│ └── src
│ │ ├── formatter.rs
│ │ ├── layers.rs
│ │ ├── lib.rs
│ │ └── test_tracer.rs
├── transaction-pool
│ ├── Cargo.toml
│ ├── benches
│ │ ├── priority.rs
│ │ ├── reorder.rs
│ │ └── truncate.rs
│ ├── docs
│ │ └── mermaid
│ │ │ └── txpool.mmd
│ ├── src
│ │ ├── blobstore
│ │ │ ├── disk.rs
│ │ │ ├── mem.rs
│ │ │ ├── mod.rs
│ │ │ ├── noop.rs
│ │ │ └── tracker.rs
│ │ ├── config.rs
│ │ ├── error.rs
│ │ ├── identifier.rs
│ │ ├── lib.rs
│ │ ├── maintain.rs
│ │ ├── metrics.rs
│ │ ├── noop.rs
│ │ ├── ordering.rs
│ │ ├── pool
│ │ │ ├── best.rs
│ │ │ ├── blob.rs
│ │ │ ├── events.rs
│ │ │ ├── listener.rs
│ │ │ ├── mod.rs
│ │ │ ├── parked.rs
│ │ │ ├── pending.rs
│ │ │ ├── size.rs
│ │ │ ├── state.rs
│ │ │ ├── txpool.rs
│ │ │ └── update.rs
│ │ ├── test_utils
│ │ │ ├── gen.rs
│ │ │ ├── mock.rs
│ │ │ ├── mod.rs
│ │ │ └── pool.rs
│ │ ├── traits.rs
│ │ └── validate
│ │ │ ├── constants.rs
│ │ │ ├── eth.rs
│ │ │ ├── mod.rs
│ │ │ └── task.rs
│ ├── test_data
│ │ └── blob1.json
│ └── tests
│ │ └── it
│ │ ├── blobs.rs
│ │ ├── evict.rs
│ │ ├── listeners.rs
│ │ ├── main.rs
│ │ └── pending.rs
└── trie
│ ├── common
│ ├── Cargo.toml
│ └── src
│ │ ├── account.rs
│ │ ├── hash_builder
│ │ ├── mod.rs
│ │ └── state.rs
│ │ ├── lib.rs
│ │ ├── nibbles.rs
│ │ ├── proofs.rs
│ │ ├── root.rs
│ │ ├── storage.rs
│ │ └── subnode.rs
│ ├── db
│ ├── Cargo.toml
│ ├── src
│ │ ├── hashed_cursor.rs
│ │ ├── lib.rs
│ │ ├── prefix_set.rs
│ │ ├── proof.rs
│ │ ├── state.rs
│ │ ├── storage.rs
│ │ ├── trie_cursor.rs
│ │ └── witness.rs
│ └── tests
│ │ ├── fuzz_in_memory_nodes.rs
│ │ ├── post_state.rs
│ │ ├── proof.rs
│ │ ├── trie.rs
│ │ └── walker.rs
│ ├── parallel
│ ├── Cargo.toml
│ ├── benches
│ │ └── root.rs
│ └── src
│ │ ├── async_root.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── parallel_root.rs
│ │ ├── stats.rs
│ │ └── storage_root_targets.rs
│ └── trie
│ ├── Cargo.toml
│ ├── benches
│ ├── hash_post_state.rs
│ ├── prefix_set.rs
│ └── trie_root.rs
│ ├── src
│ ├── forward_cursor.rs
│ ├── hashed_cursor
│ │ ├── mod.rs
│ │ └── post_state.rs
│ ├── lib.rs
│ ├── metrics.rs
│ ├── node_iter.rs
│ ├── prefix_set.rs
│ ├── progress.rs
│ ├── proof.rs
│ ├── state.rs
│ ├── stats.rs
│ ├── test_utils.rs
│ ├── trie.rs
│ ├── trie_cursor
│ │ ├── in_memory.rs
│ │ ├── mod.rs
│ │ ├── noop.rs
│ │ └── subnode.rs
│ ├── updates.rs
│ ├── walker.rs
│ └── witness.rs
│ └── testdata
│ └── proof-genesis.json
├── deny.toml
├── docs
├── README.md
├── crates
│ ├── README.md
│ ├── db.md
│ ├── discv4.md
│ ├── eth-wire.md
│ ├── network.md
│ └── stages.md
├── design
│ ├── README.md
│ ├── codecs.md
│ ├── database.md
│ ├── goals.md
│ ├── headers-downloader.md
│ ├── metrics.md
│ ├── p2p.md
│ └── review.md
├── release.md
├── repo
│ ├── README.md
│ ├── ci.md
│ ├── labels.md
│ └── layout.md
└── workflow.md
├── etc
├── .gitignore
├── README.md
├── assertoor
│ └── assertoor-template.yaml
├── docker-compose.yml
├── ethereum-metrics-exporter
│ └── config.yaml
├── generate-jwt.sh
├── grafana
│ ├── dashboards
│ │ ├── dashboard.yml
│ │ ├── metrics-exporter.json
│ │ ├── overview.json
│ │ ├── reth-discovery.json
│ │ ├── reth-mempool.json
│ │ └── reth-state-growth.json
│ └── datasources
│ │ └── prometheus.yml
├── lighthouse.yml
└── prometheus
│ └── prometheus.yml
├── examples
├── README.md
├── beacon-api-sidecar-fetcher
│ ├── Cargo.toml
│ └── src
│ │ ├── main.rs
│ │ └── mined_sidecar.rs
├── beacon-api-sse
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── bsc-p2p
│ ├── Cargo.toml
│ └── src
│ │ ├── chainspec.rs
│ │ ├── genesis.json
│ │ └── main.rs
├── custom-dev-node
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── custom-engine-types
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── custom-evm
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── custom-inspector
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── custom-node-components
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── custom-payload-builder
│ ├── Cargo.toml
│ └── src
│ │ ├── generator.rs
│ │ ├── job.rs
│ │ └── main.rs
├── custom-rlpx-subprotocol
│ ├── Cargo.toml
│ └── src
│ │ ├── main.rs
│ │ └── subprotocol
│ │ ├── connection
│ │ ├── handler.rs
│ │ └── mod.rs
│ │ ├── mod.rs
│ │ └── protocol
│ │ ├── event.rs
│ │ ├── handler.rs
│ │ ├── mod.rs
│ │ └── proto.rs
├── db-access
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── manual-p2p
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── network-txpool
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── network
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── node-custom-rpc
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── node-event-hooks
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
├── polygon-p2p
│ ├── Cargo.toml
│ └── src
│ │ ├── chain_cfg.rs
│ │ ├── genesis.json
│ │ └── main.rs
├── rpc-db
│ ├── Cargo.toml
│ └── src
│ │ ├── main.rs
│ │ └── myrpc_ext.rs
├── stateful-precompile
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
└── txpool-tracing
│ ├── Cargo.toml
│ └── src
│ └── main.rs
├── rustfmt.toml
└── testing
├── ef-tests
├── .gitignore
├── Cargo.toml
├── src
│ ├── assert.rs
│ ├── case.rs
│ ├── cases
│ │ ├── blockchain_test.rs
│ │ └── mod.rs
│ ├── lib.rs
│ ├── models.rs
│ ├── result.rs
│ └── suite.rs
└── tests
│ └── tests.rs
└── testing-utils
├── Cargo.toml
└── src
├── generators.rs
├── genesis_allocator.rs
└── lib.rs
/.cargo/config.toml:
--------------------------------------------------------------------------------
1 | [alias]
2 | docs = "doc --workspace --all-features --no-deps"
3 |
4 | [target.x86_64-pc-windows-msvc]
5 | rustflags = [
6 | # Increases the stack size to 10MB, which is
7 | # in line with Linux (whereas default for Windows is 1MB)
8 | "-Clink-arg=/STACK:10000000",
9 | ]
10 |
11 | [target.i686-pc-windows-msvc]
12 | rustflags = [
13 | # Increases the stack size to 10MB, which is
14 | # in line with Linux (whereas default for Windows is 1MB)
15 | "-Clink-arg=/STACK:10000000",
16 | ]
17 |
--------------------------------------------------------------------------------
/.codespellrc:
--------------------------------------------------------------------------------
1 | [codespell]
2 | skip = .git,target,./crates/storage/libmdbx-rs/mdbx-sys/libmdbx,Cargo.toml,Cargo.lock
3 | ignore-words-list = crate,ser,ratatui
4 |
--------------------------------------------------------------------------------
/.config/nextest.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | retries = { backoff = "exponential", count = 2, delay = "2s", jitter = true }
3 | slow-timeout = { period = "30s", terminate-after = 4 }
4 |
5 | [[profile.default.overrides]]
6 | filter = "test(general_state_tests)"
7 | slow-timeout = { period = "1m", terminate-after = 10 }
8 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | # exclude everything
2 | *
3 |
4 | # include source files
5 | !/bin
6 | !/crates
7 | !/testing
8 | !book.toml
9 | !Cargo.lock
10 | !Cargo.toml
11 | !Cross.toml
12 | !deny.toml
13 | !Makefile
14 |
15 | # include for vergen constants
16 | !/.git
17 |
18 | # include dist directory, where the reth binary is located after compilation
19 | !/dist
20 |
21 | # include licenses
22 | !LICENSE-*
23 |
24 | # include example files
25 | !/examples
26 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 | end_of_line = lf
9 | charset = utf-8
10 | trim_trailing_whitespace = true
11 | insert_final_newline = true
12 | indent_style = space
13 | indent_size = 4
14 |
15 | [*.rs]
16 | max_line_length = 100
17 |
18 | [*.{yml,yaml}]
19 | indent_size = 2
20 |
21 | [*.md]
22 | # double whitespace at end of line
23 | # denotes a line break in Markdown
24 | trim_trailing_whitespace = false
25 |
26 | [Makefile]
27 | indent_style = tab
28 |
29 | []
30 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | book/cli/**/*.md linguist-vendored
2 | book/cli/cli.md -linguist-vendored
3 |
4 | crates/storage/libmdbx-rs/mdbx-sys/** linguist-vendored
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: GitHub Discussions
4 | url: https://github.com/paradigmxyz/reth/discussions
5 | about: Please ask and answer questions here to keep the issue tracker clean.
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/docs.yml:
--------------------------------------------------------------------------------
1 | name: Documentation
2 | description: Suggest a change to our documentation
3 | labels: ["C-docs", "S-needs-triage"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | If you are unsure if the docs are relevant or needed, please open up a discussion first.
9 | - type: textarea
10 | attributes:
11 | label: Describe the change
12 | description: |
13 | Please describe the documentation you want to change or add, and if it is for end-users or contributors.
14 | validations:
15 | required: true
16 | - type: textarea
17 | attributes:
18 | label: Additional context
19 | description: Add any other context to the feature (like screenshots, resources)
20 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature.yml:
--------------------------------------------------------------------------------
1 | name: Feature request
2 | description: Suggest a feature
3 | labels: ["C-enhancement", "S-needs-triage"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Please ensure that the feature has not already been requested in the issue tracker.
9 | - type: textarea
10 | attributes:
11 | label: Describe the feature
12 | description: |
13 | Please describe the feature and what it is aiming to solve, if relevant.
14 |
15 | If the feature is for a crate, please include a proposed API surface.
16 | validations:
17 | required: true
18 | - type: textarea
19 | attributes:
20 | label: Additional context
21 | description: Add any other context to the feature (like screenshots, resources)
22 |
--------------------------------------------------------------------------------
/.github/assets/hive/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu
2 |
3 | COPY dist/reth /usr/local/bin
4 |
5 | COPY LICENSE-* ./
6 |
7 | EXPOSE 30303 30303/udp 9001 8545 8546
8 | ENTRYPOINT ["/usr/local/bin/reth"]
--------------------------------------------------------------------------------
/.github/assets/hive/load_images.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -eo pipefail
3 |
4 | # List of tar files to load
5 | IMAGES=(
6 | "/tmp/hiveproxy.tar"
7 | "/tmp/devp2p.tar"
8 | "/tmp/engine.tar"
9 | "/tmp/rpc_compat.tar"
10 | "/tmp/pyspec.tar"
11 | "/tmp/smoke_genesis.tar"
12 | "/tmp/smoke_network.tar"
13 | "/tmp/ethereum_sync.tar"
14 | "/tmp/reth_image.tar"
15 | )
16 |
17 | # Loop through the images and load them
18 | for IMAGE_TAR in "${IMAGES[@]}"; do
19 | echo "Loading image $IMAGE_TAR..."
20 | docker load -i "$IMAGE_TAR" &
21 | done
22 |
23 | wait
24 |
25 | docker image ls -a
--------------------------------------------------------------------------------
/.github/assets/hive/run_simulator.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # set -x
3 |
4 | cd hivetests/
5 |
6 | sim="${1}"
7 | limit="${2}"
8 |
9 | run_hive() {
10 | hive --sim "${sim}" --sim.limit "${limit}" --sim.parallelism 4 --client reth 2>&1 | tee /tmp/log || true
11 | }
12 |
13 | check_log() {
14 | tail -n 1 /tmp/log | sed -r 's/\x1B\[[0-9;]*[mK]//g'
15 | }
16 |
17 | attempt=0
18 | max_attempts=5
19 |
20 | while [ $attempt -lt $max_attempts ]; do
21 | run_hive
22 |
23 | # Check if no tests were run. sed removes ansi colors
24 | if check_log | grep -q "suites=0"; then
25 | echo "no tests were run, retrying in 10 seconds"
26 | sleep 10
27 | attempt=$((attempt + 1))
28 | continue
29 | fi
30 |
31 | # Check the last line of the log for "finished", "tests failed", or "test failed"
32 | if check_log | grep -Eq "(finished|tests? failed)"; then
33 | exit 0
34 | else
35 | exit 1
36 | fi
37 | done
38 | exit 1
39 |
--------------------------------------------------------------------------------
/.github/assets/install_geth.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Installs Geth (https://geth.ethereum.org) in $HOME/bin for x86_64 Linux.
4 |
5 | set -eo pipefail
6 |
7 | GETH_BUILD=${GETH_BUILD:-"1.13.4-3f907d6a"}
8 |
9 | name="geth-linux-amd64-$GETH_BUILD"
10 |
11 | mkdir -p "$HOME/bin"
12 | wget "https://gethstore.blob.core.windows.net/builds/$name.tar.gz"
13 | tar -xvf "$name.tar.gz"
14 | rm "$name.tar.gz"
15 | mv "$name/geth" "$HOME/bin/geth"
16 | rm -rf "$name"
17 | chmod +x "$HOME/bin/geth"
18 |
19 | # Add $HOME/bin to $PATH
20 | [[ "$PATH" != *$HOME/bin* ]] && export PATH=$HOME/bin:$PATH
21 | [ -n "$CI" ] && echo "$HOME/bin" >> "$GITHUB_PATH"
22 |
23 | geth version
24 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "weekly"
7 |
--------------------------------------------------------------------------------
/.github/workflows/deny.yml:
--------------------------------------------------------------------------------
1 | # Runs `cargo-deny` when modifying `Cargo.lock`.
2 |
3 | name: deny
4 |
5 | on:
6 | push:
7 | branches: [main]
8 | paths: [Cargo.lock]
9 | pull_request:
10 | branches: [main]
11 | paths: [Cargo.lock]
12 | merge_group:
13 |
14 | env:
15 | CARGO_TERM_COLOR: always
16 |
17 | concurrency: deny-${{ github.head_ref || github.run_id }}
18 |
19 | jobs:
20 | deny:
21 | name: deny
22 | runs-on: ubuntu-latest
23 | steps:
24 | - uses: actions/checkout@v4
25 | - uses: EmbarkStudios/cargo-deny-action@v2
26 | with:
27 | command: check all
28 |
--------------------------------------------------------------------------------
/.github/workflows/label-pr.yml:
--------------------------------------------------------------------------------
1 | name: Label PRs
2 |
3 | on:
4 | pull_request:
5 | types: [opened]
6 |
7 | jobs:
8 | label_prs:
9 | runs-on: ubuntu-latest
10 | permissions:
11 | issues: write
12 | pull-requests: write
13 | steps:
14 | - uses: actions/checkout@v4
15 | with:
16 | fetch-depth: 0
17 |
18 | - name: Label PRs
19 | uses: actions/github-script@v7
20 | with:
21 | script: |
22 | const label_pr = require('./.github/assets/label_pr.js')
23 | await label_pr({github, context})
24 |
--------------------------------------------------------------------------------
/.github/workflows/lint-actions.yml:
--------------------------------------------------------------------------------
1 | name: Lint GitHub Actions workflows
2 | on:
3 | pull_request:
4 | paths:
5 | - '.github/**'
6 | merge_group:
7 | push:
8 | paths:
9 | - '.github/**'
10 |
11 | jobs:
12 | actionlint:
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v4
16 | - name: Download actionlint
17 | id: get_actionlint
18 | run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
19 | shell: bash
20 | - name: Check workflow files
21 | run: SHELLCHECK_OPTS="-S error" ${{ steps.get_actionlint.outputs.executable }} -color
22 | shell: bash
23 |
--------------------------------------------------------------------------------
/.github/workflows/release-dist.yml:
--------------------------------------------------------------------------------
1 | # This workflow auto-publishes Reth to external package managers such as
2 | # Homebrew when a release is published.
3 |
4 | name: release externally
5 |
6 | on:
7 | release:
8 | types: [published]
9 |
10 | jobs:
11 | release-homebrew:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Update Homebrew formula
15 | uses: dawidd6/action-homebrew-bump-formula@v3
16 | with:
17 | token: ${{ secrets.HOMEBREW }}
18 | no_fork: true
19 | tap: paradigmxyz/brew
20 | formula: reth
21 |
--------------------------------------------------------------------------------
/.github/workflows/stale.yml:
--------------------------------------------------------------------------------
1 | # Marks issues as stale.
2 |
3 | name: stale issues
4 |
5 | on:
6 | workflow_dispatch: {}
7 | schedule:
8 | - cron: "30 1 * * *"
9 |
10 | jobs:
11 | close-issues:
12 | runs-on: ubuntu-latest
13 | permissions:
14 | issues: write
15 | pull-requests: write
16 | steps:
17 | - uses: actions/stale@v9
18 | with:
19 | days-before-stale: 21
20 | days-before-close: 7
21 | stale-issue-label: "S-stale"
22 | stale-pr-label: "S-stale"
23 | exempt-issue-labels: "M-prevent-stale"
24 | exempt-pr-labels: "M-prevent-stale"
25 | stale-issue-message: "This issue is stale because it has been open for 21 days with no activity."
26 | close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
27 | exempt-all-milestones: true
28 | exempt-all-assignees: true
29 | repo-token: ${{ secrets.GITHUB_TOKEN }}
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated by Cargo
2 | # will have compiled files and executables
3 | ./debug/
4 | target/
5 |
6 | # These are backup files generated by rustfmt
7 | **/*.rs.bk
8 |
9 | # MSVC Windows builds of rustc generate these, which store debugging information
10 | *.pdb
11 |
12 | # Generated by Intellij-based IDEs.
13 | .idea
14 |
15 | # Generated by MacOS
16 | .DS_Store
17 |
18 | # Generated test-vectors for DB
19 | testdata/micro/db
20 |
21 | # Generated data for stage benchmarks
22 | crates/stages/testdata
23 |
24 | # Prometheus data dir
25 | data/
26 |
27 | # Proptest data
28 | proptest-regressions/
29 |
30 | # Release artifacts
31 | dist/
32 |
33 | # Database debugging tools
34 | db-tools/
35 |
36 | # VSCode
37 | .vscode
38 |
39 | # Coverage report
40 | lcov.info
41 |
42 | # Generated by ./etc/generate-jwt.sh
43 | jwttoken/
44 |
45 | # Cache directory for CCLS, if using it with MDBX sources
46 | .ccls-cache/
47 |
48 | # Generated by CMake due to MDBX sources
49 | crates/storage/libmdbx-rs/mdbx-sys/libmdbx/cmake-build-debug
50 |
51 | # Rust bug report
52 | rustc-ice-*
--------------------------------------------------------------------------------
/Cross.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | pre-build = [
3 | # rust-bindgen dependencies: llvm-dev libclang-dev (>= 5.0) clang (>= 5.0)
4 | "apt-get update && apt-get install --assume-yes --no-install-recommends llvm-dev libclang-6.0-dev clang-6.0"
5 | ]
6 |
7 | [build.env]
8 | passthrough = [
9 | "JEMALLOC_SYS_WITH_LG_PAGE",
10 | ]
--------------------------------------------------------------------------------
/Dockerfile.cross:
--------------------------------------------------------------------------------
1 | # This image is meant to enable cross-architecture builds.
2 | # It assumes the reth binary has already been compiled for `$TARGETPLATFORM` and is
3 | # locatable in `./dist/bin/$TARGETARCH`
4 | FROM --platform=$TARGETPLATFORM ubuntu:22.04
5 |
6 | LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth
7 | LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0"
8 |
9 | # Filled by docker buildx
10 | ARG TARGETARCH
11 |
12 | COPY ./dist/bin/$TARGETARCH/reth /usr/local/bin/reth
13 |
14 | EXPOSE 30303 30303/udp 9001 8545 8546
15 | ENTRYPOINT ["/usr/local/bin/reth"]
16 |
--------------------------------------------------------------------------------
/DockerfileOp.cross:
--------------------------------------------------------------------------------
1 | # This image is meant to enable cross-architecture builds.
2 | # It assumes the reth binary has already been compiled for `$TARGETPLATFORM` and is
3 | # locatable in `./dist/bin/$TARGETARCH`
4 | FROM --platform=$TARGETPLATFORM ubuntu:22.04
5 |
6 | LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth
7 | LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0"
8 |
9 | # Filled by docker buildx
10 | ARG TARGETARCH
11 |
12 | COPY ./dist/bin/$TARGETARCH/op-reth /usr/local/bin/op-reth
13 |
14 | EXPOSE 30303 30303/udp 9001 8545 8546
15 | ENTRYPOINT ["/usr/local/bin/op-reth"]
16 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Reporting a Vulnerability
4 |
5 | Contact georgios at paradigm.xyz.
6 |
--------------------------------------------------------------------------------
/assets/reth-alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/megaeth-labs/reth/29058ad7ee64d993de6c301a9d688002cb698f03/assets/reth-alpha.png
--------------------------------------------------------------------------------
/assets/reth-beta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/megaeth-labs/reth/29058ad7ee64d993de6c301a9d688002cb698f03/assets/reth-beta.png
--------------------------------------------------------------------------------
/assets/reth-docs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/megaeth-labs/reth/29058ad7ee64d993de6c301a9d688002cb698f03/assets/reth-docs.png
--------------------------------------------------------------------------------
/assets/reth-prod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/megaeth-labs/reth/29058ad7ee64d993de6c301a9d688002cb698f03/assets/reth-prod.png
--------------------------------------------------------------------------------
/assets/reth.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/megaeth-labs/reth/29058ad7ee64d993de6c301a9d688002cb698f03/assets/reth.jpg
--------------------------------------------------------------------------------
/audit/sigma_prime_audit_v2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/megaeth-labs/reth/29058ad7ee64d993de6c301a9d688002cb698f03/audit/sigma_prime_audit_v2.pdf
--------------------------------------------------------------------------------
/bin/reth/src/commands/mod.rs:
--------------------------------------------------------------------------------
1 | //! This contains all of the `reth` commands
2 |
3 | pub mod debug_cmd;
4 |
--------------------------------------------------------------------------------
/bin/reth/src/macros.rs:
--------------------------------------------------------------------------------
1 | //! Helper macros
2 |
3 | /// Creates the block executor type based on the configured feature.
4 | ///
5 | /// Note(mattsse): This is incredibly horrible and will be replaced
6 | #[cfg(not(feature = "optimism"))]
7 | macro_rules! block_executor {
8 | ($chain_spec:expr) => {
9 | reth_node_ethereum::EthExecutorProvider::ethereum($chain_spec)
10 | };
11 | }
12 |
13 | #[cfg(feature = "optimism")]
14 | macro_rules! block_executor {
15 | ($chain_spec:expr) => {
16 | reth_node_optimism::OpExecutorProvider::optimism($chain_spec)
17 | };
18 | }
19 |
20 | pub(crate) use block_executor;
21 |
--------------------------------------------------------------------------------
/book.toml:
--------------------------------------------------------------------------------
1 | [book]
2 | authors = ["reth Core Contributors"]
3 | language = "en"
4 | multilingual = false
5 | src = "book"
6 | title = "reth Book"
7 | description = "A book on all things Reth"
8 |
9 | [output.html]
10 | theme = "book/theme"
11 | git-repository-url = "https://github.com/paradigmxyz/reth"
12 | default-theme = "ayu"
13 | no-section-label = true
14 |
15 | [output.html.fold]
16 | enable = true
17 | level = 1
18 |
19 | [build]
20 | build-dir = "target/book"
21 |
22 | [preprocessor.template]
23 | before = ["links"]
24 |
25 | [preprocessor.index]
26 |
27 | [preprocessor.links]
28 |
--------------------------------------------------------------------------------
/book/cli/cli.md:
--------------------------------------------------------------------------------
1 | # CLI Reference
2 |
3 | The Reth node is operated via the CLI by running the `reth node` command. To stop it, press `ctrl-c`. You may need to wait a bit as Reth tears down existing p2p connections or other cleanup tasks.
4 |
5 | However, Reth has more commands:
6 |
7 | {{#include ./SUMMARY.md}}
8 |
--------------------------------------------------------------------------------
/book/cli/update.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -eo pipefail
3 |
4 | BOOK_ROOT="$(dirname "$(dirname "$0")")"
5 | RETH=${1:-"$(dirname "$BOOK_ROOT")/target/debug/reth"}
6 |
7 | cmd=(
8 | "$(dirname "$0")/help.py"
9 | --root-dir "$BOOK_ROOT/"
10 | --root-indentation 2
11 | --root-summary
12 | --out-dir "$BOOK_ROOT/cli/"
13 | "$RETH"
14 | )
15 | echo "Running: $" "${cmd[*]}"
16 | "${cmd[@]}"
17 |
--------------------------------------------------------------------------------
/book/developers/contribute.md:
--------------------------------------------------------------------------------
1 | # Contribute
2 |
3 |
4 |
5 | Reth has docs specifically geared for developers and contributors, including documentation on the structure and architecture of reth, the general workflow we employ, and other useful tips.
6 |
7 | You can find these docs [here](https://github.com/paradigmxyz/reth/tree/main/docs).
8 |
9 | Check out our contributing guidelines [here](https://github.com/paradigmxyz/reth/blob/main/CONTRIBUTING.md).
10 |
--------------------------------------------------------------------------------
/book/developers/developers.md:
--------------------------------------------------------------------------------
1 | # Developers
2 |
3 | Reth is composed of several crates that can be used in standalone projects. If you are interested in using one or more of the crates, you can get an overview of them in the [developer docs](https://github.com/paradigmxyz/reth/tree/main/docs), or take a look at the [crate docs](https://paradigmxyz.github.io/reth/docs).
4 |
--------------------------------------------------------------------------------
/book/developers/exex/assets/remote_exex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/megaeth-labs/reth/29058ad7ee64d993de6c301a9d688002cb698f03/book/developers/exex/assets/remote_exex.png
--------------------------------------------------------------------------------
/book/installation/priorities.md:
--------------------------------------------------------------------------------
1 | # Update Priorities
2 |
3 | When publishing releases, reth will include an "Update Priority" section in the release notes, in the same manner Lighthouse does.
4 |
5 | The "Update Priority" section will include a table which may appear like so:
6 |
7 | | User Class | Priority |
8 | |----------------------|-----------------|
9 | | Payload Builders | Medium Priority |
10 | | Non-Payload Builders | Low Priority |
11 |
12 | To understand this table, the following terms are important:
13 |
14 | - *Payload builders* are those who use reth to build and validate payloads.
15 | - *Non-payload builders* are those who run reth for other purposes (e.g., data analysis, RPC or applications).
16 | - *High priority* updates should be completed as soon as possible (e.g., hours or days).
17 | - *Medium priority* updates should be completed at the next convenience (e.g., days or a week).
18 | - *Low priority* updates should be completed in the next routine update cycle (e.g., two weeks).
19 |
--------------------------------------------------------------------------------
/book/jsonrpc/eth.md:
--------------------------------------------------------------------------------
1 | # `eth` Namespace
2 |
3 | Documentation for the API methods in the `eth` namespace can be found on [ethereum.org](https://ethereum.org/en/developers/docs/apis/json-rpc/).
4 |
--------------------------------------------------------------------------------
/book/jsonrpc/web3.md:
--------------------------------------------------------------------------------
1 | # `web3` Namespace
2 |
3 | The `web3` API provides utility functions for the web3 client.
4 |
5 | ## `web3_clientVersion`
6 |
7 | Get the web3 client version.
8 |
9 |
10 | | Client | Method invocation |
11 | |--------|------------------------------------|
12 | | RPC | `{"method": "web3_clientVersion"}` |
13 |
14 | ### Example
15 |
16 | ```js
17 | // > {"jsonrpc":"2.0","id":1,"method":"web3_clientVersion","params":[]}
18 | {"jsonrpc":"2.0","id":1,"result":"reth/v0.0.1/x86_64-unknown-linux-gnu"}
19 | ```
20 |
21 | ## `web3_sha3`
22 |
23 | Get the Keccak-256 hash of the given data.
24 |
25 | | Client | Method invocation |
26 | |--------|----------------------------------------------|
27 | | RPC | `{"method": "web3_sha3", "params": [bytes]}` |
28 |
29 | ### Example
30 |
31 | ```js
32 | // > {"jsonrpc":"2.0","id":1,"method":"web3_sha3","params":["rust is awesome"]}
33 | {"jsonrpc":"2.0","id":1,"result":"0xe421b3428564a5c509ac118bad93a3b84485ec3f927e214b0c4c23076d4bc4e0"}
34 | ```
--------------------------------------------------------------------------------
/book/run/run-a-node.md:
--------------------------------------------------------------------------------
1 | # Run a Node
2 |
3 | Congratulations, now that you have installed Reth, it's time to run it!
4 |
5 | In this chapter we'll go through a few different topics you'll encounter when running Reth, including:
6 | 1. [Running on mainnet or official testnets](./mainnet.md)
7 | 1. [Running on OP Stack chains](./optimism.md)
8 | 1. [Logs and Observability](./observability.md)
9 | 1. [Configuring reth.toml](./config.md)
10 | 1. [Transaction types](./transactions.md)
11 | 1. [Pruning & Full Node](./pruning.md)
12 | 1. [Ports](./ports.md)
13 | 1. [Troubleshooting](./troubleshooting.md)
14 |
15 | In the future, we also intend to support the [OP Stack](https://stack.optimism.io/docs/understand/explainer/), which will allow you to run Reth as a Layer 2 client. More there soon!
16 |
--------------------------------------------------------------------------------
/book/templates/source_and_github.md:
--------------------------------------------------------------------------------
1 | [File: [[ #path ]]](https://github.com/paradigmxyz/reth/blob/main/[[ #path ]])
2 | ```rust,no_run,noplayground
3 | {{#include [[ #path_to_root ]][[ #path ]]:[[ #anchor ]]}}
4 | ```
--------------------------------------------------------------------------------
/book/theme/head.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/clippy.toml:
--------------------------------------------------------------------------------
1 | msrv = "1.80"
2 | too-large-for-stack = 128
3 |
--------------------------------------------------------------------------------
/crates/blockchain-tree-api/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-blockchain-tree-api"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | reth-consensus.workspace = true
15 | reth-execution-errors.workspace = true
16 | reth-primitives.workspace = true
17 | reth-storage-errors.workspace = true
18 |
19 | # misc
20 | thiserror.workspace = true
21 |
--------------------------------------------------------------------------------
/crates/blockchain-tree/docs/mermaid/tree.mmd:
--------------------------------------------------------------------------------
1 | flowchart BT
2 | subgraph canonical chain
3 | CanonState:::state
4 | block0canon:::canon -->block1canon:::canon -->block2canon:::canon -->block3canon:::canon -->
5 | block4canon:::canon --> block5canon:::canon
6 | end
7 | block5canon --> block6pending1:::pending
8 | block5canon --> block6pending2:::pending
9 | subgraph sidechain2
10 | S2State:::state
11 | block3canon --> block4s2:::sidechain --> block5s2:::sidechain
12 | end
13 | subgraph sidechain1
14 | S1State:::state
15 | block2canon --> block3s1:::sidechain --> block4s1:::sidechain --> block5s1:::sidechain -->
16 | block6s1:::sidechain
17 | end
18 | classDef state fill:#1882C4
19 | classDef canon fill:#8AC926
20 | classDef pending fill:#FFCA3A
21 | classDef sidechain fill:#FF595E
22 |
--------------------------------------------------------------------------------
/crates/chain-state/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Reth state related types and functionality.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | mod in_memory;
12 | pub use in_memory::*;
13 |
14 | mod chain_info;
15 | pub use chain_info::ChainInfoTracker;
16 |
17 | mod notifications;
18 | pub use notifications::{
19 | CanonStateNotification, CanonStateNotificationSender, CanonStateNotificationStream,
20 | CanonStateNotifications, CanonStateSubscriptions, ForkChoiceNotifications, ForkChoiceStream,
21 | ForkChoiceSubscriptions,
22 | };
23 |
24 | mod memory_overlay;
25 | pub use memory_overlay::MemoryOverlayStateProvider;
26 |
27 | #[cfg(any(test, feature = "test-utils"))]
28 | /// Common test helpers
29 | pub mod test_utils;
30 |
--------------------------------------------------------------------------------
/crates/chainspec/res/genesis/optimism.json:
--------------------------------------------------------------------------------
1 | {"config":{"ChainName":"optimism-mainnet","chainId":10,"homesteadBlock":0,"eip150Block":0,"eip155Block":0,"eip158Block":0,"byzantiumBlock":0,"constantinopleBlock":0,"petersburgBlock":0,"istanbulBlock":0,"muirGlacierBlock":0,"berlinBlock":3950000,"londonBlock":105235063,"arrowGlacierBlock":105235063,"grayGlacierBlock":105235063,"mergeNetsplitBlock":105235063,"bedrockBlock":105235063,"terminalTotalDifficulty":0,"terminalTotalDifficultyPassed":true,"optimism":{"eip1559Elasticity":6,"eip1559Denominator":50},"regolithTime":0},"difficulty":"1","gasLimit":"15000000","extradata":"0x000000000000000000000000000000000000000000000000000000000000000000000398232e2064f896018496b4b44b3d62751f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0xeddb4c1786789419153a27c4c80ff44a2226b6eda04f7e22ce5bae892ea568eb","alloc":{}}
--------------------------------------------------------------------------------
/crates/chainspec/src/api.rs:
--------------------------------------------------------------------------------
1 | use crate::ChainSpec;
2 | use alloy_chains::Chain;
3 |
4 | /// Trait representing type configuring a chain spec.
5 | pub trait EthChainSpec: Send + Sync + Unpin + 'static {
6 | // todo: make chain spec type generic over hardfork
7 | //type Hardfork: Clone + Copy + 'static;
8 |
9 | /// Chain id.
10 | fn chain(&self) -> Chain;
11 | }
12 |
13 | impl EthChainSpec for ChainSpec {
14 | fn chain(&self) -> Chain {
15 | self.chain
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/crates/chainspec/src/constants.rs:
--------------------------------------------------------------------------------
1 | use crate::spec::DepositContract;
2 | use alloy_primitives::{address, b256};
3 |
4 | /// Deposit contract address: `0x00000000219ab540356cbb839cbe05303d7705fa`
5 | pub(crate) const MAINNET_DEPOSIT_CONTRACT: DepositContract = DepositContract::new(
6 | address!("00000000219ab540356cbb839cbe05303d7705fa"),
7 | 11052984,
8 | b256!("649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"),
9 | );
10 |
11 | /// Max gas limit on Base Sepolia:
12 | #[cfg(feature = "optimism")]
13 | pub(crate) const BASE_SEPOLIA_MAX_GAS_LIMIT: u64 = 45_000_000;
14 |
15 | /// Max gas limit on Base:
16 | #[cfg(feature = "optimism")]
17 | pub(crate) const BASE_MAINNET_MAX_GAS_LIMIT: u64 = 105_000_000;
18 |
--------------------------------------------------------------------------------
/crates/chainspec/src/info.rs:
--------------------------------------------------------------------------------
1 | use alloy_eips::BlockNumHash;
2 | use alloy_primitives::{BlockNumber, B256};
3 |
4 | /// Current status of the blockchain's head.
5 | #[derive(Default, Copy, Clone, Debug, Eq, PartialEq)]
6 | pub struct ChainInfo {
7 | /// The block hash of the highest fully synced block.
8 | pub best_hash: B256,
9 | /// The block number of the highest fully synced block.
10 | pub best_number: BlockNumber,
11 | }
12 |
13 | impl From for BlockNumHash {
14 | fn from(value: ChainInfo) -> Self {
15 | Self { number: value.best_number, hash: value.best_hash }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/crates/cli/cli/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-cli"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 |
14 | [dependencies]
15 | # reth
16 | reth-cli-runner.workspace = true
17 | reth-chainspec.workspace = true
18 |
19 | # misc
20 | clap.workspace = true
21 | eyre.workspace = true
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/crates/cli/cli/src/chainspec.rs:
--------------------------------------------------------------------------------
1 | use clap::builder::TypedValueParser;
2 | use reth_chainspec::ChainSpec;
3 | use std::sync::Arc;
4 |
5 | /// Trait for parsing chain specifications.
6 | ///
7 | /// This trait extends [`clap::builder::TypedValueParser`] to provide a parser for chain
8 | /// specifications. Implementers of this trait must provide a list of supported chains and a
9 | /// function to parse a given string into a [`ChainSpec`].
10 | pub trait ChainSpecParser: TypedValueParser> + Default {
11 | /// List of supported chains.
12 | const SUPPORTED_CHAINS: &'static [&'static str];
13 |
14 | /// Parses the given string into a [`ChainSpec`].
15 | ///
16 | /// # Arguments
17 | ///
18 | /// * `s` - A string slice that holds the chain spec to be parsed.
19 | ///
20 | /// # Errors
21 | ///
22 | /// This function will return an error if the input string cannot be parsed into a valid
23 | /// [`ChainSpec`].
24 | fn parse(s: &str) -> eyre::Result>;
25 | }
26 |
--------------------------------------------------------------------------------
/crates/cli/commands/src/init_cmd.rs:
--------------------------------------------------------------------------------
1 | //! Command that initializes the node from a genesis file.
2 |
3 | use crate::common::{AccessRights, Environment, EnvironmentArgs};
4 | use clap::Parser;
5 | use reth_provider::BlockHashReader;
6 | use tracing::info;
7 |
8 | /// Initializes the database with the genesis block.
9 | #[derive(Debug, Parser)]
10 | pub struct InitCommand {
11 | #[command(flatten)]
12 | env: EnvironmentArgs,
13 | }
14 |
15 | impl InitCommand {
16 | /// Execute the `init` command
17 | pub async fn execute(self) -> eyre::Result<()> {
18 | info!(target: "reth::cli", "reth init starting");
19 |
20 | let Environment { provider_factory, .. } = self.env.init(AccessRights::RW)?;
21 |
22 | let hash = provider_factory
23 | .block_hash(0)?
24 | .ok_or_else(|| eyre::eyre!("Genesis hash not found."))?;
25 |
26 | info!(target: "reth::cli", hash = ?hash, "Genesis block written");
27 | Ok(())
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/crates/cli/commands/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Commonly used reth CLI commands.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | pub mod common;
12 | pub mod config_cmd;
13 | pub mod db;
14 | pub mod dump_genesis;
15 | pub mod import;
16 | pub mod init_cmd;
17 | pub mod init_state;
18 | pub mod node;
19 | pub mod p2p;
20 | pub mod prune;
21 | pub mod recover;
22 | pub mod stage;
23 | #[cfg(feature = "dev")]
24 | pub mod test_vectors;
25 |
--------------------------------------------------------------------------------
/crates/cli/commands/src/recover/mod.rs:
--------------------------------------------------------------------------------
1 | //! `reth recover` command.
2 |
3 | use clap::{Parser, Subcommand};
4 | use reth_cli_runner::CliContext;
5 |
6 | mod storage_tries;
7 |
8 | /// `reth recover` command
9 | #[derive(Debug, Parser)]
10 | pub struct Command {
11 | #[command(subcommand)]
12 | command: Subcommands,
13 | }
14 |
15 | /// `reth recover` subcommands
16 | #[derive(Subcommand, Debug)]
17 | pub enum Subcommands {
18 | /// Recover the node by deleting dangling storage tries.
19 | StorageTries(storage_tries::Command),
20 | }
21 |
22 | impl Command {
23 | /// Execute `recover` command
24 | pub async fn execute(self, ctx: CliContext) -> eyre::Result<()> {
25 | match self.command {
26 | Subcommands::StorageTries(command) => command.execute(ctx).await,
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/crates/cli/commands/src/test_vectors/mod.rs:
--------------------------------------------------------------------------------
1 | //! Command for generating test vectors.
2 |
3 | use clap::{Parser, Subcommand};
4 |
5 | mod tables;
6 |
7 | /// Generate test-vectors for different data types.
8 | #[derive(Debug, Parser)]
9 | pub struct Command {
10 | #[command(subcommand)]
11 | command: Subcommands,
12 | }
13 |
14 | #[derive(Subcommand, Debug)]
15 | /// `reth test-vectors` subcommands
16 | pub enum Subcommands {
17 | /// Generates test vectors for specified tables. If no table is specified, generate for all.
18 | Tables {
19 | /// List of table names. Case-sensitive.
20 | names: Vec,
21 | },
22 | }
23 |
24 | impl Command {
25 | /// Execute the command
26 | pub async fn execute(self) -> eyre::Result<()> {
27 | match self.command {
28 | Subcommands::Tables { names } => {
29 | tables::generate_vectors(names)?;
30 | }
31 | }
32 | Ok(())
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/crates/cli/runner/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-cli-runner"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-tasks.workspace = true
16 |
17 | # async
18 | tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal"] }
19 |
20 | # misc
21 | tracing.workspace = true
22 |
--------------------------------------------------------------------------------
/crates/cli/util/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-cli-util"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-fs-util.workspace = true
16 |
17 | # eth
18 | alloy-primitives.workspace = true
19 | alloy-eips.workspace = true
20 |
21 | secp256k1 = { workspace = true, features = ["rand"] }
22 | rand.workspace = true
23 |
24 | # misc
25 | thiserror.workspace = true
26 | eyre.workspace = true
27 |
28 | [target.'cfg(unix)'.dependencies]
29 | libc = "0.2"
30 |
--------------------------------------------------------------------------------
/crates/config/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-config"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-network-types = { workspace = true, features = ["serde"] }
16 | reth-prune-types.workspace = true
17 | reth-stages-types.workspace = true
18 |
19 | # serde
20 | serde.workspace = true
21 | humantime-serde.workspace = true
22 |
23 | # toml
24 | toml.workspace = true
25 | eyre.workspace = true
26 |
27 | [dev-dependencies]
28 | tempfile.workspace = true
29 | reth-network-peers.workspace = true
30 |
--------------------------------------------------------------------------------
/crates/config/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Standalone crate for Reth configuration types.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | pub mod config;
12 | pub use config::{BodiesConfig, Config, PruneConfig};
13 |
--------------------------------------------------------------------------------
/crates/consensus/beacon/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Beacon consensus implementation.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | pub use reth_ethereum_consensus::EthBeaconConsensus;
12 |
13 | mod engine;
14 | pub use engine::*;
15 |
--------------------------------------------------------------------------------
/crates/consensus/common/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-consensus-common"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-chainspec.workspace = true
16 | reth-primitives.workspace = true
17 | reth-consensus.workspace = true
18 |
19 | [dev-dependencies]
20 | reth-storage-api.workspace = true
21 | rand.workspace = true
22 | mockall = "0.12"
23 |
--------------------------------------------------------------------------------
/crates/consensus/common/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Commonly used consensus methods.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | /// Collection of consensus validation methods.
12 | pub mod validation;
13 |
14 | /// Various calculation methods (e.g. block rewards)
15 | pub mod calc;
16 |
--------------------------------------------------------------------------------
/crates/consensus/consensus/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-consensus"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-primitives.workspace = true
16 |
17 | # misc
18 | auto_impl.workspace = true
19 | derive_more.workspace = true
20 |
21 | [features]
22 | default = ["std"]
23 | std = []
24 | test-utils = []
25 |
--------------------------------------------------------------------------------
/crates/consensus/debug-client/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-consensus-debug-client"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-node-api.workspace = true
16 | reth-node-core.workspace = true
17 | reth-rpc-api.workspace = true
18 | reth-rpc-types.workspace = true
19 | reth-rpc-builder.workspace = true
20 | reth-tracing.workspace = true
21 |
22 | # ethereum
23 | alloy-consensus = { workspace = true, features = ["serde"] }
24 | alloy-eips.workspace = true
25 | alloy-provider = { workspace = true, features = ["ws"] }
26 |
27 | auto_impl.workspace = true
28 | futures.workspace = true
29 | eyre.workspace = true
30 | reqwest = { workspace = true, features = ["rustls-tls", "json"] }
31 | serde = { workspace = true, features = ["derive"] }
32 | tokio = { workspace = true, features = ["time"] }
33 |
34 | ringbuffer = "0.15.0"
35 |
--------------------------------------------------------------------------------
/crates/consensus/debug-client/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Debug consensus client.
2 | //!
3 | //! This is a worker that sends FCUs and new payloads by fetching recent blocks from an external
4 | //! provider like Etherscan or an RPC endpoint. This allows to quickly test the execution client
5 | //! without running a consensus node.
6 |
7 | #![doc(
8 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
9 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
10 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
11 | )]
12 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
13 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
14 |
15 | mod client;
16 | mod providers;
17 |
18 | pub use client::{rich_block_to_execution_payload_v3, BlockProvider, DebugConsensusClient};
19 | pub use providers::{EtherscanBlockProvider, RpcBlockProvider};
20 |
--------------------------------------------------------------------------------
/crates/consensus/debug-client/src/providers/mod.rs:
--------------------------------------------------------------------------------
1 | mod etherscan;
2 | mod rpc;
3 |
4 | pub use etherscan::EtherscanBlockProvider;
5 | pub use rpc::RpcBlockProvider;
6 |
--------------------------------------------------------------------------------
/crates/e2e-test-utils/src/traits.rs:
--------------------------------------------------------------------------------
1 | use reth::rpc::types::{
2 | engine::{ExecutionPayloadEnvelopeV3, OptimismExecutionPayloadEnvelopeV3},
3 | ExecutionPayloadV3,
4 | };
5 |
6 | /// The execution payload envelope type.
7 | pub trait PayloadEnvelopeExt: Send + Sync + std::fmt::Debug {
8 | /// Returns the execution payload V3 from the payload
9 | fn execution_payload(&self) -> ExecutionPayloadV3;
10 | }
11 |
12 | impl PayloadEnvelopeExt for OptimismExecutionPayloadEnvelopeV3 {
13 | fn execution_payload(&self) -> ExecutionPayloadV3 {
14 | self.execution_payload.clone()
15 | }
16 | }
17 |
18 | impl PayloadEnvelopeExt for ExecutionPayloadEnvelopeV3 {
19 | fn execution_payload(&self) -> ExecutionPayloadV3 {
20 | self.execution_payload.clone()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/crates/engine/primitives/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-engine-primitives"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-chainspec.workspace = true
16 | reth-payload-primitives.workspace = true
17 |
18 | # misc
19 | serde.workspace = true
--------------------------------------------------------------------------------
/crates/engine/service/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Engine service implementation.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
9 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
10 |
11 | /// Engine Service
12 | pub mod service;
13 |
--------------------------------------------------------------------------------
/crates/engine/tree/src/metrics.rs:
--------------------------------------------------------------------------------
1 | use reth_metrics::{
2 | metrics::{Gauge, Histogram},
3 | Metrics,
4 | };
5 |
6 | /// Metrics for the `BasicBlockDownloader`.
7 | #[derive(Metrics)]
8 | #[metrics(scope = "consensus.engine.beacon")]
9 | pub(crate) struct BlockDownloaderMetrics {
10 | /// How many blocks are currently being downloaded.
11 | pub(crate) active_block_downloads: Gauge,
12 | }
13 |
14 | /// Metrics for the `PersistenceService`
15 | #[derive(Metrics)]
16 | #[metrics(scope = "consensus.engine.persistence")]
17 | pub(crate) struct PersistenceMetrics {
18 | /// How long it took for blocks to be removed
19 | pub(crate) remove_blocks_above_duration_seconds: Histogram,
20 | /// How long it took for blocks to be saved
21 | pub(crate) save_blocks_duration_seconds: Histogram,
22 | /// How long it took for blocks to be pruned
23 | pub(crate) prune_before_duration_seconds: Histogram,
24 | }
25 |
--------------------------------------------------------------------------------
/crates/engine/tree/src/tree/metrics.rs:
--------------------------------------------------------------------------------
1 | use reth_metrics::{
2 | metrics::{Counter, Gauge, Histogram},
3 | Metrics,
4 | };
5 |
6 | /// Metrics for the `EngineApi`.
7 | #[derive(Metrics)]
8 | #[metrics(scope = "consensus.engine.beacon")]
9 | pub(crate) struct EngineApiMetrics {
10 | /// How many executed blocks are currently stored.
11 | pub(crate) executed_blocks: Gauge,
12 | /// The number of times the pipeline was run.
13 | pub(crate) pipeline_runs: Counter,
14 | /// The total count of forkchoice updated messages received.
15 | pub(crate) forkchoice_updated_messages: Counter,
16 | /// The total count of new payload messages received.
17 | pub(crate) new_payload_messages: Counter,
18 | /// Histogram of persistence operation durations (in seconds)
19 | pub(crate) persistence_duration: Histogram,
20 | // TODO add latency metrics
21 | }
22 |
--------------------------------------------------------------------------------
/crates/engine/tree/test-data/holesky/1.rlp:
--------------------------------------------------------------------------------
1 | f90218f90213a0b5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a069d8c9d72f6fa4ad42d4702b433707212f90db395eb54dc20bc85de253788783a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800184017dd79d808465156ad899d883010d02846765746888676f312e32312e31856c696e7578a0b5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde488000000000000000084342770c0c0c0
--------------------------------------------------------------------------------
/crates/engine/tree/test-data/holesky/2.rlp:
--------------------------------------------------------------------------------
1 | f90218f90213a0e9011e6d15a0d0c16f65a38f84375bf1a6b88201b0ad75a2660df0bb8d1ac381a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794c6e2459991bfe27cca6d86722f35da23a1e4cb97a069d8c9d72f6fa4ad42d4702b433707212f90db395eb54dc20bc85de253788783a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800284017e3711808465156af099d883010d02846765746888676f312e32312e31856c696e7578a0b212724aac0df10d75b1b6d795fd4cd17e4ca4f9ee1bfe97871a16a3af64eed1880000000000000000842da282a8c0c0
--------------------------------------------------------------------------------
/crates/errors/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-errors"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | reth-blockchain-tree-api.workspace = true
15 | reth-consensus.workspace = true
16 | reth-execution-errors.workspace = true
17 | reth-fs-util.workspace = true
18 | reth-storage-errors.workspace = true
19 |
20 | # misc
21 | thiserror.workspace = true
22 |
--------------------------------------------------------------------------------
/crates/errors/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! High level error types for the reth in general.
2 | //!
3 | //! ## Feature Flags
4 | //!
5 | //! - `test-utils`: Export utilities for testing
6 |
7 | #![doc(
8 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
9 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
10 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
11 | )]
12 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
13 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
14 |
15 | mod error;
16 | pub use error::{RethError, RethResult};
17 |
18 | pub use reth_blockchain_tree_api::error::{BlockchainTreeError, CanonicalError};
19 | pub use reth_consensus::ConsensusError;
20 | pub use reth_execution_errors::{BlockExecutionError, BlockValidationError};
21 | pub use reth_storage_errors::{
22 | db::DatabaseError,
23 | provider::{ProviderError, ProviderResult},
24 | };
25 |
--------------------------------------------------------------------------------
/crates/ethereum-forks/src/hardforks/optimism.rs:
--------------------------------------------------------------------------------
1 | use crate::{ChainHardforks, EthereumHardforks, OptimismHardfork};
2 |
3 | /// Extends [`crate::EthereumHardforks`] with optimism helper methods.
4 | pub trait OptimismHardforks: EthereumHardforks {
5 | /// Convenience method to check if [`OptimismHardfork::Bedrock`] is active at a given block
6 | /// number.
7 | fn is_bedrock_active_at_block(&self, block_number: u64) -> bool {
8 | self.fork(OptimismHardfork::Bedrock).active_at_block(block_number)
9 | }
10 | }
11 |
12 | impl OptimismHardforks for ChainHardforks {}
13 |
--------------------------------------------------------------------------------
/crates/ethereum/cli/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-ethereum-cli"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | reth-cli.workspace = true
15 | reth-chainspec.workspace = true
16 |
17 | alloy-genesis.workspace = true
18 |
19 | eyre.workspace = true
20 |
21 | shellexpand.workspace = true
22 | serde_json.workspace = true
23 | clap = { workspace = true, features = ["derive", "env"] }
--------------------------------------------------------------------------------
/crates/ethereum/cli/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Reth CLI implementation.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | /// Chain specification parser.
12 | pub mod chainspec;
13 |
--------------------------------------------------------------------------------
/crates/ethereum/consensus/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-ethereum-consensus"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-chainspec.workspace = true
16 | reth-consensus-common.workspace = true
17 | reth-primitives.workspace = true
18 | reth-consensus.workspace = true
19 |
20 | tracing.workspace = true
21 |
--------------------------------------------------------------------------------
/crates/ethereum/engine-primitives/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-ethereum-engine-primitives"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-chainspec.workspace = true
16 | reth-evm-ethereum.workspace = true
17 | reth-primitives.workspace = true
18 | reth-engine-primitives.workspace = true
19 | reth-payload-primitives.workspace = true
20 | reth-rpc-types.workspace = true
21 | reth-rpc-types-compat.workspace = true
22 | revm-primitives.workspace = true
23 | alloy-rlp.workspace = true
24 |
25 | # misc
26 | serde.workspace = true
27 | sha2.workspace = true
28 |
29 | [dev-dependencies]
30 | serde_json.workspace = true
31 |
--------------------------------------------------------------------------------
/crates/ethereum/node/src/evm.rs:
--------------------------------------------------------------------------------
1 | //! Ethereum EVM support
2 |
3 | #[doc(inline)]
4 | pub use reth_evm_ethereum::execute::EthExecutorProvider;
5 | #[doc(inline)]
6 | pub use reth_evm_ethereum::EthEvmConfig;
7 |
--------------------------------------------------------------------------------
/crates/ethereum/node/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Standalone crate for ethereum-specific Reth configuration and builder types.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | pub use reth_ethereum_engine_primitives::EthEngineTypes;
12 |
13 | pub mod evm;
14 | pub use evm::{EthEvmConfig, EthExecutorProvider};
15 |
16 | pub mod node;
17 | pub use node::EthereumNode;
18 |
--------------------------------------------------------------------------------
/crates/ethereum/node/tests/e2e/main.rs:
--------------------------------------------------------------------------------
1 | mod blobs;
2 | mod dev;
3 | mod eth;
4 | mod p2p;
5 | mod utils;
6 |
7 | const fn main() {}
8 |
--------------------------------------------------------------------------------
/crates/ethereum/node/tests/e2e/utils.rs:
--------------------------------------------------------------------------------
1 | use alloy_primitives::{Address, B256};
2 | use reth::rpc::types::engine::PayloadAttributes;
3 | use reth_e2e_test_utils::NodeHelperType;
4 | use reth_node_ethereum::{node::EthereumAddOns, EthereumNode};
5 | use reth_payload_builder::EthPayloadBuilderAttributes;
6 |
7 | /// Ethereum Node Helper type
8 | pub(crate) type EthNode = NodeHelperType;
9 |
10 | /// Helper function to create a new eth payload attributes
11 | pub(crate) fn eth_payload_attributes(timestamp: u64) -> EthPayloadBuilderAttributes {
12 | let attributes = PayloadAttributes {
13 | timestamp,
14 | prev_randao: B256::ZERO,
15 | suggested_fee_recipient: Address::ZERO,
16 | withdrawals: Some(vec![]),
17 | parent_beacon_block_root: Some(B256::ZERO),
18 | };
19 | EthPayloadBuilderAttributes::new(B256::ZERO, attributes)
20 | }
21 |
--------------------------------------------------------------------------------
/crates/ethereum/node/tests/it/main.rs:
--------------------------------------------------------------------------------
1 | mod builder;
2 | mod exex;
3 |
4 | const fn main() {}
5 |
--------------------------------------------------------------------------------
/crates/ethereum/payload/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-ethereum-payload-builder"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 | description = "A basic ethereum payload builder for reth that uses the txpool API to build payloads."
10 |
11 | [lints]
12 | workspace = true
13 |
14 | [dependencies]
15 | # reth
16 | reth-primitives.workspace = true
17 | reth-revm.workspace = true
18 | reth-transaction-pool.workspace = true
19 | reth-provider.workspace = true
20 | reth-payload-builder.workspace = true
21 | reth-execution-types.workspace = true
22 | reth-basic-payload-builder.workspace = true
23 | reth-evm.workspace = true
24 | reth-evm-ethereum.workspace = true
25 | reth-errors.workspace = true
26 |
27 | # ethereum
28 | revm.workspace = true
29 |
30 | # misc
31 | tracing.workspace = true
32 |
--------------------------------------------------------------------------------
/crates/etl/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-etl"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | tempfile.workspace = true
15 | reth-db-api.workspace = true
16 | rayon.workspace = true
17 |
18 | [dev-dependencies]
19 | alloy-primitives.workspace = true
20 |
--------------------------------------------------------------------------------
/crates/evm/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-evm"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-chainspec.workspace = true
16 | reth-execution-errors.workspace = true
17 | reth-primitives.workspace = true
18 | revm-primitives.workspace = true
19 | reth-prune-types.workspace = true
20 | reth-storage-errors.workspace = true
21 | reth-execution-types.workspace = true
22 |
23 | revm.workspace = true
24 | alloy-eips.workspace = true
25 | auto_impl.workspace = true
26 | futures-util.workspace = true
27 | parking_lot = { workspace = true, optional = true }
28 |
29 | [dev-dependencies]
30 | parking_lot.workspace = true
31 |
32 | [features]
33 | default = ["std"]
34 | std = []
35 | test-utils = ["dep:parking_lot"]
36 |
--------------------------------------------------------------------------------
/crates/evm/execution-errors/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-execution-errors"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | # reth
15 | reth-consensus.workspace = true
16 | reth-storage-errors.workspace = true
17 | reth-prune-types.workspace = true
18 |
19 | alloy-primitives.workspace = true
20 | alloy-rlp.workspace = true
21 | alloy-eips.workspace = true
22 | revm-primitives.workspace = true
23 | nybbles.workspace = true
24 |
25 | derive_more.workspace = true
26 |
27 | [features]
28 | default = ["std"]
29 | std = ["reth-consensus/std"]
30 |
--------------------------------------------------------------------------------
/crates/evm/execution-types/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-execution-types"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [dependencies]
14 | reth-primitives.workspace = true
15 | reth-chainspec = { workspace = true, optional = true }
16 | reth-execution-errors.workspace = true
17 | reth-trie.workspace = true
18 |
19 | revm.workspace = true
20 |
21 | serde = { workspace = true, optional = true }
22 |
23 | [dev-dependencies]
24 | reth-primitives = { workspace = true, features = ["test-utils"] }
25 | alloy-primitives.workspace = true
26 | alloy-eips.workspace = true
27 |
28 | [features]
29 | default = ["std"]
30 | optimism = ["dep:reth-chainspec"]
31 | serde = ["dep:serde", "reth-trie/serde", "revm/serde"]
32 | std = []
33 |
--------------------------------------------------------------------------------
/crates/evm/execution-types/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Commonly used types for (EVM) block execution.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | #[cfg(not(feature = "std"))]
12 | extern crate alloc;
13 |
14 | mod chain;
15 | pub use chain::*;
16 |
17 | mod execute;
18 | pub use execute::*;
19 |
20 | mod execution_outcome;
21 | pub use execution_outcome::*;
22 |
--------------------------------------------------------------------------------
/crates/exex/exex/src/backfill/mod.rs:
--------------------------------------------------------------------------------
1 | mod factory;
2 | mod job;
3 | mod stream;
4 | #[cfg(test)]
5 | mod test_utils;
6 |
7 | pub use factory::BackfillJobFactory;
8 | pub use job::{BackfillJob, SingleBlockBackfillJob};
9 | pub use stream::StreamBackfillJob;
10 |
--------------------------------------------------------------------------------
/crates/exex/exex/src/event.rs:
--------------------------------------------------------------------------------
1 | use reth_primitives::BlockNumber;
2 |
3 | /// Events emitted by an `ExEx`.
4 | #[derive(Debug, Clone, Copy, PartialEq, Eq)]
5 | pub enum ExExEvent {
6 | /// Highest block processed by the `ExEx`.
7 | ///
8 | /// The `ExEx` must guarantee that it will not require all earlier blocks in the future,
9 | /// meaning that Reth is allowed to prune them.
10 | ///
11 | /// On reorgs, it's possible for the height to go down.
12 | FinishedHeight(BlockNumber),
13 | }
14 |
--------------------------------------------------------------------------------
/crates/exex/types/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-exex-types"
3 | version.workspace = true
4 | edition.workspace = true
5 | homepage.workspace = true
6 | license.workspace = true
7 | repository.workspace = true
8 | rust-version.workspace = true
9 | description = "Commonly used types for exex usage in reth."
10 |
11 | [lints]
12 | workspace = true
13 |
14 | [dependencies]
15 | # reth
16 | reth-provider.workspace = true
17 |
18 | # reth
19 | alloy-primitives.workspace = true
20 |
21 | # misc
22 | serde = { workspace = true, optional = true }
23 |
24 | [features]
25 | default = []
26 | serde = ["dep:serde", "reth-provider/serde"]
27 |
--------------------------------------------------------------------------------
/crates/exex/types/src/finished_height.rs:
--------------------------------------------------------------------------------
1 | use alloy_primitives::BlockNumber;
2 |
3 | /// The finished height of all `ExEx`'s.
4 | #[derive(Debug, Clone, Copy, PartialEq, Eq)]
5 | pub enum FinishedExExHeight {
6 | /// No `ExEx`'s are installed, so there is no finished height.
7 | NoExExs,
8 | /// Not all `ExExs` have emitted a `FinishedHeight` event yet.
9 | NotReady,
10 | /// The finished height of all `ExEx`'s.
11 | ///
12 | /// This is the lowest common denominator between all `ExEx`'s.
13 | ///
14 | /// This block is used to (amongst other things) determine what blocks are safe to prune.
15 | ///
16 | /// The number is inclusive, i.e. all blocks `<= finished_height` are safe to prune.
17 | Height(BlockNumber),
18 | }
19 |
20 | impl FinishedExExHeight {
21 | /// Returns `true` if not all `ExExs` have emitted a `FinishedHeight` event yet.
22 | pub const fn is_not_ready(&self) -> bool {
23 | matches!(self, Self::NotReady)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/crates/exex/types/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Commonly used types for exex usage.
2 |
3 | #![doc(
4 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7 | )]
8 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
9 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10 |
11 | mod finished_height;
12 | mod notification;
13 |
14 | pub use finished_height::FinishedExExHeight;
15 | pub use notification::ExExNotification;
16 |
--------------------------------------------------------------------------------
/crates/fs-util/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-fs-util"
3 | version.workspace = true
4 | edition.workspace = true
5 | homepage.workspace = true
6 | license.workspace = true
7 | repository.workspace = true
8 | rust-version.workspace = true
9 | description = "Commonly used fs utils in reth."
10 |
11 | [lints]
12 | workspace = true
13 |
14 | [dependencies]
15 |
16 | # misc
17 | serde_json.workspace = true
18 | serde.workspace = true
19 | thiserror.workspace = true
20 |
--------------------------------------------------------------------------------
/crates/metrics/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-metrics"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 | description = "reth metrics utilities"
10 |
11 | [lints]
12 | workspace = true
13 |
14 | [dependencies]
15 | # reth
16 | reth-metrics-derive.workspace = true
17 |
18 | # metrics
19 | metrics.workspace = true
20 |
21 | # async
22 | tokio = { workspace = true, features = ["full"], optional = true }
23 | futures = { workspace = true, optional = true }
24 | tokio-util = { workspace = true, optional = true }
25 |
26 | [features]
27 | common = ["tokio", "futures", "tokio-util"]
28 |
--------------------------------------------------------------------------------
/crates/metrics/metrics-derive/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-metrics-derive"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 |
10 | [lints]
11 | workspace = true
12 |
13 | [lib]
14 | proc-macro = true
15 |
16 | [dependencies]
17 | proc-macro2.workspace = true
18 | syn = { workspace = true, features = ["extra-traits"] }
19 | quote.workspace = true
20 | regex = "1.6.0"
21 |
22 | [dev-dependencies]
23 | metrics.workspace = true
24 | serial_test.workspace = true
25 | trybuild = "1.0"
26 |
--------------------------------------------------------------------------------
/crates/metrics/metrics-derive/src/with_attrs.rs:
--------------------------------------------------------------------------------
1 | use syn::{Attribute, DeriveInput, Field};
2 |
3 | pub(crate) trait WithAttrs {
4 | fn attrs(&self) -> &[Attribute];
5 | }
6 |
7 | impl WithAttrs for DeriveInput {
8 | fn attrs(&self) -> &[Attribute] {
9 | &self.attrs
10 | }
11 | }
12 |
13 | impl WithAttrs for Field {
14 | fn attrs(&self) -> &[Attribute] {
15 | &self.attrs
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/crates/metrics/metrics-derive/tests/trybuild.rs:
--------------------------------------------------------------------------------
1 | #[test]
2 | fn compile_test() {
3 | let t = trybuild::TestCases::new();
4 | t.compile_fail("tests/compile-fail/*.rs");
5 | }
6 |
--------------------------------------------------------------------------------
/crates/metrics/src/common/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod mpsc;
2 |
--------------------------------------------------------------------------------
/crates/metrics/src/lib.rs:
--------------------------------------------------------------------------------
1 | //! Collection of metrics utilities.
2 | //!
3 | //! ## Feature Flags
4 | //!
5 | //! - `common`: Common metrics utilities, such as wrappers around tokio senders and receivers. Pulls
6 | //! in `tokio`.
7 |
8 | #![doc(
9 | html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
10 | html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
11 | issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
12 | )]
13 | #![cfg_attr(not(test), warn(unused_crate_dependencies))]
14 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
15 |
16 | /// Metrics derive macro.
17 | pub use reth_metrics_derive::Metrics;
18 |
19 | /// Implementation of common metric utilities.
20 | #[cfg(feature = "common")]
21 | pub mod common;
22 |
23 | /// Re-export core metrics crate.
24 | pub use metrics;
25 |
--------------------------------------------------------------------------------
/crates/net/banlist/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "reth-net-banlist"
3 | version.workspace = true
4 | edition.workspace = true
5 | rust-version.workspace = true
6 | license.workspace = true
7 | homepage.workspace = true
8 | repository.workspace = true
9 | description = "Banlist for peers and IPs"
10 |
11 | [lints]
12 | workspace = true
13 |
14 | [dependencies]
15 | # ethereum
16 | alloy-primitives.workspace = true
--------------------------------------------------------------------------------
/crates/net/discv4/src/node.rs:
--------------------------------------------------------------------------------
1 | use alloy_primitives::keccak256;
2 | use generic_array::GenericArray;
3 | use reth_network_peers::{NodeRecord, PeerId};
4 |
5 | /// The key type for the table.
6 | #[derive(Debug, Copy, Clone, Eq, PartialEq)]
7 | pub(crate) struct NodeKey(pub(crate) PeerId);
8 |
9 | impl From for NodeKey {
10 | fn from(value: PeerId) -> Self {
11 | Self(value)
12 | }
13 | }
14 |
15 | impl From for discv5::Key {
16 | fn from(value: NodeKey) -> Self {
17 | let hash = keccak256(value.0.as_slice());
18 | let hash = *GenericArray::from_slice(hash.as_slice());
19 | Self::new_raw(value, hash)
20 | }
21 | }
22 |
23 | impl From<&NodeRecord> for NodeKey {
24 | fn from(node: &NodeRecord) -> Self {
25 | Self(node.id)
26 | }
27 | }
28 |
29 | /// Converts a `PeerId` into the required `Key` type for the table
30 | #[inline]
31 | pub(crate) fn kad_key(node: PeerId) -> discv5::Key {
32 | discv5::kbucket::Key::from(NodeKey::from(node))
33 | }
34 |
--------------------------------------------------------------------------------
/crates/net/discv5/README.md:
--------------------------------------------------------------------------------
1 | # Discv5
2 |
3 | Thin wrapper around sigp/discv5.
--------------------------------------------------------------------------------
/crates/net/downloaders/src/bodies/mod.rs:
--------------------------------------------------------------------------------
1 | /// A naive concurrent downloader.
2 | #[allow(clippy::module_inception)]
3 | pub mod bodies;
4 |
5 | /// A body downloader that does nothing. Useful to build unwind-only pipelines.
6 | pub mod noop;
7 |
8 | /// A downloader implementation that spawns a downloader to a task
9 | pub mod task;
10 |
11 | mod queue;
12 | mod request;
13 |
14 | #[cfg(any(test, feature = "test-utils"))]
15 | pub mod test_utils;
16 |
--------------------------------------------------------------------------------
/crates/net/downloaders/src/bodies/noop.rs:
--------------------------------------------------------------------------------
1 | use futures::Stream;
2 | use reth_network_p2p::{
3 | bodies::{downloader::BodyDownloader, response::BlockResponse},
4 | error::{DownloadError, DownloadResult},
5 | };
6 | use reth_primitives::BlockNumber;
7 | use std::ops::RangeInclusive;
8 |
9 | /// A [`BodyDownloader`] implementation that does nothing.
10 | #[derive(Debug, Default)]
11 | #[non_exhaustive]
12 | pub struct NoopBodiesDownloader;
13 |
14 | impl BodyDownloader for NoopBodiesDownloader {
15 | fn set_download_range(&mut self, _: RangeInclusive) -> DownloadResult<()> {
16 | Ok(())
17 | }
18 | }
19 |
20 | impl Stream for NoopBodiesDownloader {
21 | type Item = Result, DownloadError>;
22 |
23 | fn poll_next(
24 | self: std::pin::Pin<&mut Self>,
25 | _: &mut std::task::Context<'_>,
26 | ) -> std::task::Poll