Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d789c85
chain, polygon, docs: stop registering Polygon chains, drop Polygon d…
awskii Aug 18, 2026
0d8dd15
rpc, ethapi: remove the bor RPC namespace and Bor state-sync transact…
awskii Aug 18, 2026
2c326a2
node, cmd: stop wiring Polygon services and drop the bor CLI flags
awskii Aug 18, 2026
abe5c92
cmd, db/integrity: drop Polygon wiring from the standalone tools
awskii Aug 18, 2026
42d42ed
db, execution: drop Bor snapshots and the Bor block-reader interface …
awskii Aug 18, 2026
b21ada2
execution, txnprovider: remove Polygon fork tiers from the EVM and co…
awskii Aug 18, 2026
89374ad
polygon: delete the Polygon tree, tables, protos and chain-config hooks
awskii Aug 22, 2026
6c59c61
node, execution: drop the last dead Polygon config, stubs and stale c…
awskii Aug 22, 2026
d616963
cmd, db/rawdb: reject stored bor configs at the source, drop dead cod…
awskii Aug 22, 2026
dc9f796
Merge branch 'awskii/polygon-removal-cmd-tools' into awskii/polygon-r…
awskii Aug 22, 2026
de77f7f
Merge branch 'awskii/polygon-removal-db-storage' into awskii/polygon-…
awskii Aug 22, 2026
ecb0e06
Merge branch 'awskii/polygon-removal-chain-config' into awskii/polygo…
awskii Aug 22, 2026
b6aec22
Merge remote-tracking branch 'origin/main' into HEAD
AskAlexSharov Aug 22, 2026
2bbaffe
Merge tag 'trial-cutover' into HEAD
AskAlexSharov Aug 22, 2026
2f04622
Merge tag 'trial-rpc' into HEAD
AskAlexSharov Aug 22, 2026
62a4a05
Merge remote-tracking branch 'origin/awskii/polygon-removal-node-wiri…
AskAlexSharov Aug 22, 2026
a99acd2
Merge tag 'v2-db-storage' into HEAD
AskAlexSharov Aug 22, 2026
3bf0a57
Merge tag 'v2-chain-config' into HEAD
AskAlexSharov Aug 22, 2026
a161860
docs, lint: drop the last Bor references from the rpcdaemon and uploa…
awskii Aug 22, 2026
1a24a57
db, execution: align the bor config guard with its callers and drop l…
awskii Aug 22, 2026
581dace
Merge branch 'awskii/polygon-removal-db-storage' into awskii/polygon-…
awskii Aug 22, 2026
83bd923
Merge branch 'awskii/polygon-removal-chain-config' into awskii/polygo…
awskii Aug 22, 2026
83800ba
db/kv, db/migrations: add db_schema_version8 for the renamed witness …
awskii Aug 22, 2026
f126efc
execution/chain: reject a stored bor section in GetConfig too
awskii Aug 22, 2026
6c15533
Merge remote-tracking branch 'origin/awskii/polygon-removal-db-storag…
awskii Aug 22, 2026
ecc21d8
Merge remote-tracking branch 'origin/awskii/polygon-removal-chain-con…
awskii Aug 22, 2026
e792340
Merge branch 'awskii/polygon-removal-db-storage' into awskii/polygon-…
awskii Aug 22, 2026
cd49f07
Merge remote-tracking branch 'origin/awskii/polygon-removal-delete-tr…
awskii Aug 22, 2026
a81a212
Merge branch 'awskii/polygon-removal-chain-config' into awskii/polygo…
awskii Aug 22, 2026
a51ad9c
db/kv, db/migrations: drop the BorWitnesses tables instead of orphani…
awskii Aug 22, 2026
4a3cc4e
Merge remote-tracking branch 'origin/awskii/polygon-removal-delete-tr…
awskii Aug 22, 2026
ecea740
Merge branch 'main' into awskii/polygon-removal-delete-tree
AskAlexSharov Aug 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ linters:
|p2p/sentry\
|p2p/sentry/libsentry\
|plugins/auth\
|polygon/bor\
|polygon/tests\
|rpc\
|rpc/jsonrpc\
|rpc/rpchelper\
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,6 @@ grpc: protoc-all $(PROTO_PATH)
--go-grpc_opt=Mremote/kv.proto=./remoteproto \
--go_opt=Mremote/ethbackend.proto=./remoteproto \
--go-grpc_opt=Mremote/ethbackend.proto=./remoteproto \
--go_opt=Mremote/bor.proto=./remoteproto \
--go-grpc_opt=Mremote/bor.proto=./remoteproto \
--go_opt=Mdownloader/downloader.proto=./downloaderproto \
--go-grpc_opt=Mdownloader/downloader.proto=./downloaderproto \
--go_opt=Mexecution/execution.proto=./executionproto \
Expand All @@ -612,7 +610,7 @@ grpc: protoc-all $(PROTO_PATH)
--go_opt=Mtxpool/mining.proto=./txpoolproto \
--go-grpc_opt=Mtxpool/mining.proto=./txpoolproto \
p2psentry/sentry.proto p2psentinel/sentinel.proto \
remote/bor.proto remote/kv.proto remote/ethbackend.proto \
remote/kv.proto remote/ethbackend.proto \
downloader/downloader.proto execution/execution.proto \
txpool/txpool.proto txpool/mining.proto

Expand Down
2 changes: 1 addition & 1 deletion cmd/downloader/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
incentives). StageSenders results are included into blocks snaps - means new node can skip it.

- How network benefit? - Serve immutable snapshots can use cheaper infrastructure: Bittorrent/S3/R2/etc... - because
there is no incentive. Polygon mainnet is 12Tb now. Also Beacon network is very bad in serving old data.
there is no incentive. Also Beacon network is very bad in serving old data.

- How does it benefit current nodes? - Erigon's db is 1-file (multiple TB of NVME) - which is not friendly for
maintenance. Can't mount `hot` data to 1 type of disk and `cold` to another. Erigon2 moving only Blocks to snaps
Expand Down
12 changes: 0 additions & 12 deletions cmd/rpcdaemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,18 +416,6 @@ The following table shows the current implementation status of Erigon's RPC daem
| erigon_nodeInfo | Yes | Erigon only |
| erigon_cacheCheck | Yes | Erigon only |
| | | |
| bor_getSnapshot | Yes | Bor only |
| bor_getAuthor | Yes | Bor only |
| bor_getSnapshotAtHash | Yes | Bor only |
| bor_getSigners | Yes | Bor only |
| bor_getSignersAtHash | Yes | Bor only |
| bor_getCurrentProposer | Yes | Bor only |
| bor_getCurrentValidators | Yes | Bor only |
| bor_getSnapshotProposer | Yes | Bor only |
| bor_getSnapshotProposerSequence | Yes | Bor only |
| bor_getRootHash | Yes | Bor only |
| bor_getVoteOnHash | Yes | Bor only |
| | | |
| ots_getApiLevel | Yes | Otterscan |
| ots_getInternalOperations | Yes | Otterscan |
| ots_searchTransactionsBefore | Yes | Otterscan |
Expand Down
12 changes: 6 additions & 6 deletions cmd/utils/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ The `snapshots uploader` command starts a version of erigon customized for uploa
a remote location.

It breaks the stage execution process after the senders stage and then uses the snapshot stage to send
uploaded headers, bodies and (in the case of polygon) bor spans and events to snapshot files. Because
this process avoids execution in run signifigantly faster than a standard erigon configuration.
uploaded headers and bodies to snapshot files. Because this process avoids execution in run
signifigantly faster than a standard erigon configuration.

The uploader uses rclone to send seedable (100K or 500K blocks) to a remote storage location specified
in the rclone config file.
Expand All @@ -58,15 +58,15 @@ The following configuration can be used to upload blocks from genesis where:
| | |
|----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| sync.loop.prune.limit=500000 | Sets the records to be pruned to the database to 500,000 per iteration (as opposed to 100) |
| upload.location=r2:erigon-v2-snapshots-bor-mainnet | Specified the rclone location to upload snapshot to |
| upload.location=r2:erigon-v2-snapshots-mainnet | Specified the rclone location to upload snapshot to |
| upload.from=earliest | Sets the upload start location to be the earliest available block, which will be 0 in the case of a fresh installation, or specified by the last block in the chaindata db |
| upload.snapshot.limit=1500000 | Tells the uploader to keep a maximum 1,500,000 blocks in the `snapshots` before deleting the aged snapshot |
| snapshot.version=2 | Indivates the version to be appended to snapshot file names when they are creatated |

```shell
erigon/build/bin/erigon snapshots uploader --datadir=~/snapshots/bor-mainnet --chain=bor-mainnet \
--bor.heimdall=https://heimdall-api.polygon.technology --sync.loop.prune.limit=500000 \
--upload.location=r2:erigon-v2-snapshots-bor-mainnet --upload.from=earliest --snapshot.version=2 \
erigon/build/bin/erigon snapshots uploader --datadir=~/snapshots/mainnet --chain=mainnet \
--sync.loop.prune.limit=500000 --upload.from=earliest --snapshot.version=2 \
--upload.location=r2:erigon-v2-snapshots-mainnet \
--upload.snapshot.limit=1500000
```

Expand Down
17 changes: 15 additions & 2 deletions cmd/utils/app/init_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"encoding/json"
"fmt"
"io"
"os"

"github.com/urfave/cli/v3"
Expand Down Expand Up @@ -74,14 +75,26 @@ func initGenesis(ctx context.Context, cliCtx *cli.Command) error {
}
defer file.Close()

raw, err := io.ReadAll(file)
if err != nil {
utils.Fatalf("Failed to read genesis file: %v", err)
}
genesis := new(types.Genesis)
if err := json.NewDecoder(file).Decode(genesis); err != nil {
if err := json.Unmarshal(raw, genesis); err != nil {
return fmt.Errorf("invalid genesis file %s: %w", genesisPath, err)
}
if genesis.Config == nil {
return fmt.Errorf("invalid genesis file %s: missing 'config'", genesisPath)
}
if genesis.Config.BorJSON != nil {

// chain.Config has no 'bor' field, so a Polygon genesis would otherwise
// initialise with its consensus settings silently dropped.
var probe struct {
Config struct {
Bor json.RawMessage `json:"bor"`
} `json:"config"`
}
if err := json.Unmarshal(raw, &probe); err == nil && len(probe.Config.Bor) > 0 && string(probe.Config.Bor) != "null" {
return fmt.Errorf("%s carries a 'bor' config: Polygon is not supported, see https://github.com/0xPolygon/erigon", genesisPath)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ func setEtherbase(ctx *cli.Command, cfg *ethconfig.Config) {
}
}

if chainName := ctx.String(ChainFlag.Name); chainName == networkname.Dev || chainName == networkname.BorDevnet {
if chainName := ctx.String(ChainFlag.Name); chainName == networkname.Dev {
if etherbase == "" {
cfg.Builder.Etherbase = devnetEtherbase
}
Expand Down
3 changes: 1 addition & 2 deletions common/dbg/experiments.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ var (
FilesBlockingAsyncIO = EnvBool("FILES_BLOCKING_ASYNC_IO", false)
FilesBlockingAsyncIOMultiPage = EnvBool("FILES_BLOCKING_ASYNC_IO_MULTI_PAGE", true)

BorValidateHeaderTime = EnvBool("BOR_VALIDATE_HEADER_TIME", true)
TraceDeletion = EnvBool("TRACE_DELETION", false)
TraceDeletion = EnvBool("TRACE_DELETION", false)

RpcDropResponse = EnvBool("RPC_DROP_RESPONSE", false)
TipTrieWarmupers = EnvInt("TIP_TRIE_WARMUPERS", estimate.HalfCPUs())
Expand Down
14 changes: 7 additions & 7 deletions common/log/v3/redact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
func TestRedactArgsPreservesFlagsAndRedactsValues(t *testing.T) {
in := []string{
"./build/bin/erigon",
"--chain=bor",
"--datadir=~/erigon-data/bor-archive",
"--chain=gnosis",
"--datadir=~/erigon-data/gnosis-archive",
"--log.dir.verbosity", "debug",
"--torrent.conns.perfile", "100",
"--torrent.maxpeers", "1000",
"--torrent.download.slots", "10",
"--torrent.download.rate", "1G",
"--http.addr", "0.0.0.0",
"--http.port", "8545",
"--bor.heimdall", "https://polygon-heimdall-rest.publicnode.com",
"--externalcl", "https://cl.example.com",
"--prune.mode=archive",
}

Expand All @@ -30,9 +30,9 @@ func TestRedactArgsPreservesFlagsAndRedactsValues(t *testing.T) {
mustContain(t, out, "erigon")

// Flags must be preserved
mustContain(t, out, "--chain=bor")
mustContain(t, out, "--chain=gnosis")
// datadir should be redacted
if strings.Contains(out, "~/erigon-data/bor-archive") {
if strings.Contains(out, "~/erigon-data/gnosis-archive") {
t.Fatalf("expected datadir path to be redacted, got: %s", out)
}
mustContain(t, out, "--datadir=<redacted-dir>")
Expand All @@ -41,7 +41,7 @@ func TestRedactArgsPreservesFlagsAndRedactsValues(t *testing.T) {
mustContain(t, out, "--torrent.maxpeers")
mustContain(t, out, "--torrent.download.slots")
mustContain(t, out, "--torrent.download.rate")
mustContain(t, out, "--bor.heimdall")
mustContain(t, out, "--externalcl")
mustContain(t, out, "--prune.mode=archive")

// Values that are not sensitive should remain
Expand All @@ -52,7 +52,7 @@ func TestRedactArgsPreservesFlagsAndRedactsValues(t *testing.T) {
mustContain(t, out, "1G")

// Sensitive URL must be redacted
if strings.Contains(out, "polygon-heimdall-rest.publicnode.com") {
if strings.Contains(out, "cl.example.com") {
t.Fatalf("expected url to be redacted, got: %s", out)
}
mustContain(t, out, "https://<redacted>")
Expand Down
3 changes: 1 addition & 2 deletions db/datadir/dirs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package datadir
import (
"errors"
"fmt"
"github.com/erigontech/erigon/db/kv/dbcfg"
"io/fs"
"os"
"path/filepath"
Expand Down Expand Up @@ -416,7 +415,7 @@ func (d *Dirs) RenameNewVersions() error {

// Left over from Polygon support: remove the aux DB dirs if an old datadir still has them.
if d.DataDir != "" {
for _, legacy := range []string{dbcfg.PolygonBridgeDB, dbcfg.HeimdallDB} {
for _, legacy := range []string{"polygon-bridge", "heimdall"} {
if err := dir.RemoveAll(filepath.Join(d.DataDir, legacy)); err != nil && !os.IsNotExist(err) {
return err
}
Expand Down
5 changes: 2 additions & 3 deletions db/datadir/dirs_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package datadir

import (
"github.com/erigontech/erigon/db/kv/dbcfg"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -54,8 +53,8 @@ func touch(t *testing.T, p string) {
func Test_RenameNewVersions(t *testing.T) {
base := t.TempDir()
d := New(base)
bridgeDir := filepath.Join(d.DataDir, dbcfg.PolygonBridgeDB)
heimdallDir := filepath.Join(d.DataDir, dbcfg.HeimdallDB)
bridgeDir := filepath.Join(d.DataDir, "polygon-bridge")
heimdallDir := filepath.Join(d.DataDir, "heimdall")
touch(t, bridgeDir)
touch(t, heimdallDir)

Expand Down
4 changes: 2 additions & 2 deletions db/datadir/reset/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func (reset *Reset) Run() (err error) {
if reset.RemoveLocal {
// Left over from Polygon support; harmless on chains that never had them.
for _, extraDir := range []slashName{
dbcfg.HeimdallDB,
dbcfg.PolygonBridgeDB,
"heimdall",
"polygon-bridge",
} {
// Probably shouldn't log these unless they existed, it would confuse the user for
// unrelated chains.
Expand Down
2 changes: 1 addition & 1 deletion db/integrity/integrity_action_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (

// HistoryNoSystemTxs verifies system transactions don't appear at block start.
// Samples history data to ensure the first transaction in each block's history
// is not a system transaction (except genesis). Used in Polygon chain validation.
// is not a system transaction (except genesis).
HistoryNoSystemTxs Check = "HistoryNoSystemTxs"

// ReceiptsNoDups validates receipt data monotonicity. Checks that cumulative gas used
Expand Down
20 changes: 9 additions & 11 deletions db/kv/dbcfg/db_constants.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package dbcfg

const (
ChainDB = "chaindata"
TxPoolDB = "txpool"
SentryDB = "sentry"
ConsensusDB = "consensus"
DownloaderDB = "downloader"
HeimdallDB = "heimdall"
DiagnosticsDB = "diagnostics"
PolygonBridgeDB = "polygon-bridge"
CaplinDB = "caplin"
TemporaryDB = "temporary"
MigrationsDB = "migrations"
ChainDB = "chaindata"
TxPoolDB = "txpool"
SentryDB = "sentry"
ConsensusDB = "consensus"
DownloaderDB = "downloader"
DiagnosticsDB = "diagnostics"
CaplinDB = "caplin"
TemporaryDB = "temporary"
MigrationsDB = "migrations"
)
Loading
Loading