A BSC-compatible Reth client implementation. This project is not a fork of Reth, but rather an extension that leverages Reth's powerful NodeBuilder API to provide BSC compatibility.
This project aims to bring Reth's high-performance Ethereum client capabilities to the BSC network. By utilizing Reth's modular architecture and NodeBuilder API, we're building a BSC-compatible client that maintains compatibility with Reth's ecosystem while adding BSC-specific features.
- Historical Sync ✅
- BSC Pectra Support ✅
- Live Sync ✅
- Run as validator ❌ (soon)
- BSC Mainnet: Synced to the tip ✅ (10.6T disk required)
- BSC Testnet: Synced to the tip ✅ (800GB disk usage)
# Clone the repository
git clone https://github.com/bnb-chain/reth-bsc.git
cd reth-bsc
# use cargo
cargo build # debug mode
cargo build --release # release mode
# use makefile
# release mode default.
# cargo build --bin reth-bsc --features "jemalloc,asm-keccak" --profile "release"
make build
# build in max perf profile
# RUSTFLAGS="-C target-cpu=native" cargo build --bin reth-bsc --profile maxperf --features jemalloc,asm-keccak
make maxperf A full node stores recent state and can serve RPC requests efficiently:
./target/${profile}/reth-bsc node --full --chain bsc --datadir ./data_dirAn archive node stores the complete blockchain history and state:
./target/${profile}/reth-bsc node --chain bsc --datadir ./data_dirTo run on BSC Testnet instead of Mainnet, simply replace --chain bsc with --chain bsc-testnet in any of the above commands:
# Example: Full node on BSC Testnet
./target/${profile}/reth-bsc node --full --chain bsc-testnet --datadir ./data_dirTo enable RPC services, add these parameters to your node command:
# Full node with HTTP and WebSocket RPC enabled
./target/${profile}/reth-bsc node --full \
--chain bsc \
--datadir ./data_dir \
--http \
--http.addr 0.0.0.0 \
--http.port 8545 \
--http.api eth,net,web3,txpool,debug \
--ws \
--ws.addr 0.0.0.0 \
--ws.port 8546 \
--ws.api eth,net,web3,txpooleth: Ethereum JSON-RPC API (block info, transactions, etc.)net: Network information (peer count, network ID)web3: Web3 standard APIs (client version, sha3)txpool: Transaction pool informationdebug: Debug APIs for development (tracing, profiling)trace: Transaction tracing (requires archive node)admin: Administrative APIs (peer management)
Sync from block 0 (will take weeks):
./target/release/reth-bsc node --chain bsc --datadir=./data_dirRefer to the SNAPSHOT.md for snapshot information
# Check current block
curl -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
http://localhost:8545
# Check sync status
curl -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' \
http://localhost:8545Enable metrics endpoint for monitoring:
--metrics 0.0.0.0:6060Then access metrics at http://localhost:6060/metrics
Enable detailed logging:
--log.file.verbosity debug \
--log.file.directory ./logsWe welcome community contributions! Whether you're interested in helping with historical sync implementation, BSC Pectra support, or live sync functionality, your help is valuable. Please feel free to open issues or submit pull requests. You can reach out to me on Telegram.
This project is experimental and under active development. Use at your own risk. Always backup your data and test on testnet first.
This project is inspired by and builds upon the work of:
- BNB Chain Reth - The original BSC implementation of Reth
- The Reth team, especially @mattsse for their invaluable contributions to the Reth ecosystem
This project based on the excellent community versions as foundation, We extend our sincere appreciation to the teams below: