Skip to content

feat: wire up Reth node builder with Bor PoA consensus#83

Merged
VAIBHAVJINDAL3012 merged 2 commits intomainfrom
feature/reth-node-sync
Mar 11, 2026
Merged

feat: wire up Reth node builder with Bor PoA consensus#83
VAIBHAVJINDAL3012 merged 2 commits intomainfrom
feature/reth-node-sync

Conversation

@VAIBHAVJINDAL3012
Copy link
Copy Markdown
Contributor

Summary

  • Integrate Boreth with Reth's CLI and node builder so the binary launches a full syncing node (P2P, RPC, database, sync pipeline, consensus engine)
  • Add BorChainSpecParser for "amoy" and "polygon" chain resolution via --chain flag
  • Implement BorConsensus adapter replacing EthBeaconConsensus with Bor PoA consensus rules (zero nonce, no ommers/withdrawals/blobs, extra data validation, gas used checks)
  • Add Amoy testnet bootnodes and DNS discovery constants
  • Use ComponentsBuilder to swap only the consensus while keeping standard EVM, pool, network, RPC

Test plan

  • All 256+ existing tests pass
  • Node launches with cargo run --bin boreth -- node --chain amoy
  • Consensus engine initializes with BorConsensus
  • RPC, P2P, database, pruner all start correctly
  • P2P peer connectivity (blocked on fork ID matching — follow-up PR)

🤖 Generated with Claude Code

Integrate Boreth with Reth's CLI and node builder infrastructure so the
binary actually starts a full syncing node (P2P, RPC, database, sync
pipeline, consensus engine).

- Add BorChainSpecParser for "amoy" and "polygon" chain resolution
- Rewrite main.rs to use Reth's Cli with EthereumNode
- Add Amoy testnet bootnodes and DNS discovery constants
- Add BorChainSpec::into_inner() for ChainSpec extraction
- Add reth-ethereum-cli, reth-node-builder, reth-cli-runner deps
Implement BorConsensus adapter that wraps Bor's PoA consensus rules
into Reth's Consensus/HeaderValidator/FullConsensus traits, replacing
the Ethereum Beacon consensus engine.

BorConsensus enforces:
- Zero nonce (PoA, not PoW)
- Empty ommers (single-signer PoA)
- No withdrawals, blob gas, beacon block root, requests hash
- Extra data >= 97 bytes (32 vanity + 65 seal)
- Strictly increasing timestamps
- Gas used validation post-execution

Uses ComponentsBuilder to swap only the consensus builder while
keeping all other EthereumNode components (EVM, pool, network, RPC).
@VAIBHAVJINDAL3012 VAIBHAVJINDAL3012 merged commit 328b972 into main Mar 11, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant