-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Summary
Polygon PoS (Bor) uses devp2p and serves receipts over P2P via eth/68 and eth/69 — making it compatible with SHiNode's architecture. This issue tracks the work needed to support Polygon as a second chain.
What works already
--chain-idCLI flag exists (defaults to 1)- Storage layer validates chain ID in
meta.json— data isolation between chains works out of the box
What needs to change
1. Pluggable chain configuration
The P2P layer (p2p/mod.rs) is hardcoded to Ethereum mainnet:
MAINNETgenesis hash for peer validationmainnet_boot_nodes()for bootstrap discoveryMAINNETchainspec passed tobuild_with_noop_provider()
Need a --chain flag (or similar) that selects the right genesis, bootnodes, and fork schedule.
2. Polygon fork ID schedule
Polygon uses its own hardfork schedule (Jaipur, Delhi, Madhugiri, Dandeli, etc.) instead of Ethereum's. The devp2p handshake fork hash must match, otherwise peers reject the connection.
3. Handle StateSyncTxType (0x7f) receipts
Polygon has a custom transaction type 0x7f for Heimdall-to-Bor state sync (bridge transfers, validator set updates). Reth's TxType doesn't include it, so deserialization would fail when a peer sends these receipts.
We don't need to index these — just parse-and-discard or skip gracefully so we don't choke on them.
4. Pre-Madhugiri receipt hash caveat (historical only)
Before the Madhugiri hardfork (block 80,084,800, Dec 2025), state-sync receipts were excluded from the block's receiptsRoot. Post-Madhugiri they're canonical. If we ever validate receipt roots for historical Polygon blocks, this would need special handling. For current/recent blocks this is a non-issue.
References
- Polygon Bor repo (Geth fork, supports eth/68 + eth/69)
- Polygon bootnodes
- PIP-74: Canonical StateSync transactions
- Madhugiri hardfork announcement