node, cmd: stop wiring Polygon services and drop the bor CLI flags - #23491
Closed
awskii wants to merge 6 commits into
Closed
node, cmd: stop wiring Polygon services and drop the bor CLI flags#23491awskii wants to merge 6 commits into
awskii wants to merge 6 commits into
Conversation
awskii
requested review from
AskAlexSharov,
anacrolix,
bloxster,
lupin012,
lystopad,
mh0lt,
mriccobene,
taratorio and
yperbasis
as code owners
August 22, 2026 04:20
# Conflicts: # cmd/downloader/main.go # cmd/integration/commands/stages.go # node/eth/backend.go
# Conflicts: # cmd/integration/commands/stages.go
Member
Author
pull Bot
pushed a commit
to Dustin4444/erigon
that referenced
this pull request
Aug 22, 2026
…gontech#23492) The standalone binaries were still building Bor readers, a read-only Bor engine and Bor snapshot stores that nothing consumes now that the `bor` RPC namespace and the node-side services are gone. This removes that, which leaves `cmd/` and `node/` free of any `polygon/` import. Fourth in the Polygon removal series, branched off erigontech#23491 — review the last commit only. ## Changes - `cmd/rpcdaemon/cli`: drop the `BridgeReader` and `HeimdallReader` interfaces, the Bor snapshot and bridge/Heimdall store setup, the `bor.NewRo` arms in both the local and remote engine paths, and the two Bor version-compatibility checks; `RemoteServices` returns 9 values instead of 11 - `cmd/utils/app`: drop the Bor snapshot open/close in `snapshots` and `seg`, the Bor stores in `openSnaps`, the `FrozenBorBlocks` retire clamp and `CheckBorChain` - `cmd/integration`: drop the Bor snapshot and store singletons, the `--bor.heimdall` flag, the Heimdall/polygon-bridge DB migration paths and their migratable labels, and the bor line in `print_stages` - `db/integrity`: remove the `BorEvents`, `BorSpans` and `BorCheckpoints` checks - drop the remaining `_ "polygon/heimdall"` blank imports from `cmd/downloader`, `cmd/integration` and `cmd/rpcdaemon` - `erigon init` now rejects a genesis carrying a `bor` config instead of decoding it ## Notes `erigon init` used to rehydrate `Genesis.Config.Bor` from the `bor` JSON key. Simply dropping that would have let a Polygon genesis initialise with `Bor == nil` and run under the wrong consensus rules, so it fails with a pointer to `0xPolygon/erigon` instead. The two remaining rehydration sites, in `db/rawdb` and `txnprovider/txpool`, get the same treatment when `chain.Config.Bor` itself is removed. `cmd/rpcdaemon/rpcservices` still implements `BorSnapshots()` and `FrozenBorBlocks()` because they are still on the `FullBlockReader` interface. That interface, the Bor snapshot machinery in `db/snapshotsync` and the 15 `kv.Bor*` tables are the next PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing constructs a Bor consensus engine, a Heimdall service or a Polygon bridge any more. This removes that wiring from the embedded node and the flags that fed it, so the only Polygon code still reachable is the tree under
polygon/itself. Third in the Polygon removal series, branched off #23489 — review the last commit only.Changes
node/rulesconfig: drop the*borcfg.BorConfigengine case;CreateRulesEngineloses itswithoutHeimdall,polygonBridgeandheimdallServiceparametersnode/eth: remove the Heimdall/bridge client and service construction, thepolygonsync.Servicestartup and its snapshot range extractors, thepolygonBridge/heimdallService/polygonSyncServicefields, and the Bor arm of the sync-mode selectSetUpBlockReaderno longer builds or returns Bor snapshots and the bridge/Heimdall storesnode/privateapi: drop theBorTxnLookupandBorEventshandlers and theBridgeBackend/HeimdallBackendgRPC registrationsnode/components/storage,node/paths: drop the Bor snapshot/store fields and the Bor legacy datadir names--bor.heimdall,--bor.withoutheimdall,--bor.period,--bor.minblocksize,--polygon.pos.ssfand--polygon.pos.ssf.block, along withsetBorConfigand the Bor devp2p peer-count override--polygon.wit-protocolto--wit-protocol, keeping the old name as an aliasnode/ethconfig: dropHeimdallURLandWithoutHeimdall, regenerategen_config.gocmd/integration'sinitRulesEngineNotes
--bor.periodand--bor.minblocksizewere registered in the default flag set but never read, so they did nothing.The WIT protocol in
p2p/protocols/withas no Polygon references — it is a generic stateless-witness side-protocol that only ever carried a Polygon-prefixed flag name. Hence the rename rather than a removal;--polygon.wit-protocolstill works as an alias.ethconfig.PolygonPosSingleSlotFinalityand its block field stay for now:polygon/syncis their only reader, and both go when that tree is deleted at the end of the series. The flags that set them are removed here, so they are inert.cmd/rpcdaemon/clistill builds a read-only Bor engine and the bridge/Heimdall readers for the standalone rpcdaemon, andcmd/utils/appstill runs Bor snapshot integrity checks. Those are the next PR, together with the remainingcmd/tooling.