How bnb-chain/reth-bsc works
Reth @ BSC is a Reth-based BSC execution client. Its main workflow is to start a node for a selected chain, synchronize and import blocks, validate them with BSC-specific execution and Parlia consensus rules, persist node state, and optionally serve RPC and MEV services. The map preserves documented sync, RPC, EVN, and bid-block capabilities. Several subsystem paths are supported by the tree and README, but their internal wiring was not sampled, so those connections are omitted.
Main entry points: node/mod.rs BSC Node Setup · registry.rs BSC Networking · chainspec/mod.rs Chain Specification · main.rs Node CLI
Components 19
Chain Rules
- Chain Specification
src/chainspec/mod.rs - BSC Hardforks
src/hardforks/bsc.rs - System Contracts
src/system_contracts/mod.rs
Node Runtime
- Node CLI
src/main.rs - BSC Node Setup
src/node/mod.rs - EVM Execution
src/node/evm/config.rs - Block Import
src/node/network/block_import/service.rs - BSC Networking
src/node/network/bsc_protocol/registry.rs - Node Storage
src/node/storage.rs
Consensus and Mining
- Parlia Consensus
src/consensus/parlia/consensus.rs - Validator Snapshots
src/consensus/parlia/snapshot.rs - Vote Pool
src/consensus/parlia/vote_pool.rs - Payload Mining
src/node/miner/bid_block.rs
Client Interfaces
- RPC APIs
src/rpc/eth_ext.rs - MEV RPC
src/rpc/mev.rs - MEV gRPC
src/grpc/mev.rs - EVN Handshake
src/node/network/evn.rs - Metrics
src/metrics.rs
Other components
- Node Operator
Connections 16
- Node Operator → Node CLI: starts node
README.md - Node CLI → Chain Specification: selects chain
README.md - BSC Node Setup → EVM Execution: configures
src/node/mod.rs - BSC Node Setup → Block Import: configures
- Block Import → Parlia Consensus: uses consensus
src/node/network/block_import/service.rs - BSC Networking → Vote Pool: dispatches votes
src/node/network/bsc_protocol/registry.rs - Vote Pool → Validator Snapshots: checks origins
src/consensus/parlia/vote_pool.rs - Chain Specification → BSC Hardforks: defines activations
src/chainspec/mod.rs - System Contracts → BSC Hardforks: selects fork code
src/system_contracts/mod.rs - BSC Node Setup → Node Storage: configures storage
src/node/mod.rs - Node Operator → RPC APIs: queries node
README.md - Node Operator → MEV RPC: submits bids
- MEV RPC → Payload Mining: accesses bid tools
src/rpc/mev.rs - MEV gRPC → Payload Mining: uses bid blocks
src/grpc/mev.rs - BSC Networking → EVN Handshake: signals EVN
src/node/network/bsc_protocol/registry.rs - Node Operator → Metrics: monitors node
README.md