Repository navigation
[performance] Migrate bloatnet to perf-devnet-3 and fix genesis hash collisions - #19741
Merged
Merged
Conversation
…net-3 perf-devnet-2 is down (checkpoint sync returns 404/500). Update all CL and EL parameters to target perf-devnet-3: - CL bootstrap ENRs: replace 3 devnet-2 with 8 devnet-3 ENRs - Checkpoint sync URL: perf-devnet-2 -> perf-devnet-3 - Fork versions: 0x..802764 -> 0x..364469 - MinGenesisTime: 1751967000 -> 1771423200 - EL bootnodes: replace 5 devnet-2 enodes with 7 devnet-3 enodes - Genesis state SSZ: replace with devnet-3 genesis - Decode genesis state as ElectraVersion (devnet-3 has Electra at epoch 0)
…sis hash collisions Mainnet and bloatnet share the same genesis hash, but registeredChainsByGenesisHash can only hold one entry per hash. The non-deterministic Go map iteration in init() made the collision winner random, causing bloatnet to sometimes load mainnet's snapshot hashes. Remove registeredChainsByGenesisHash and ChainSpecByGenesisHash entirely. All callers now use ChainSpecByName (via chainName parameter) instead. Add ChainSpecsByGenesisHash (returning []Spec) for error messages only. Thread chainName through CommitGenesisBlock/WriteGenesisBlock/configOrDefault. Pass chain-specific bootnodes/dnsNetwork directly to sentry GrpcServer instead of looking them up by genesis hash at P2P server start time.
wmitsuda
requested review from
AskAlexSharov,
Giulio2002,
anacrolix,
domiwei,
mh0lt,
taratorio and
yperbasis
as code owners
March 9, 2026 07:14
Contributor
Author
|
I'd appreciate some rigorous review in this one @AskAlexSharov @taratorio @yperbasis I got rid of but in order to do that I had to retrofit chainname into places that used genesis hash, including very old code and some important tests. I'd appreciate fresh eyes to make sure I didn't mock anything by accident just to make tests pass. |
AskAlexSharov
approved these changes
Mar 9, 2026
wmitsuda
added a commit
that referenced
this pull request
Mar 9, 2026
…collisions (#19741) ## Summary - Migrate bloatnet config to perf-devnet-3: updated CL bootstrap ENRs, checkpoint sync URL, fork versions, MinGenesisTime, EL bootnodes, and genesis state SSZ - Remove `registeredChainsByGenesisHash` map and `ChainSpecByGenesisHash()` which can only hold one entry per genesis hash, breaking when mainnet and bloatnet share the same hash (`0xd4e56740...`) - Thread `chainName string` through `CommitGenesisBlock`/`WriteGenesisBlock`/`configOrDefault` so all lookups use `ChainSpecByName` instead of genesis hash - Pass chain-specific bootnodes/DNS directly to sentry `GrpcServer` instead of looking them up by genesis hash at P2P server start time ## Context The non-deterministic Go map iteration in `init()` made the genesis hash collision winner random — bloatnet would sometimes load mainnet's snapshot hashes (306 files instead of 278), causing "webseed infohash mismatch" warnings and incorrect sync behavior. ## Test plan - [x] Bloatnet: `erigon init --chain=bloatnet --datadir=<DIR> <genesis.json>` + `erigon --chain=bloatnet --datadir=<DIR> --caplin.checkpoint-sync.disable` — 278 header-chain files (not mainnet's 306), no "webseed infohash mismatch", deterministic across 3 runs ## Post-merge - [ ] Cherry-pick the merge commit to `main`
Merged
3 of 4 tasks
wmitsuda
added a commit
that referenced
this pull request
Mar 9, 2026
…collisions (#19741) ## Summary - Migrate bloatnet config to perf-devnet-3: updated CL bootstrap ENRs, checkpoint sync URL, fork versions, MinGenesisTime, EL bootnodes, and genesis state SSZ - Remove `registeredChainsByGenesisHash` map and `ChainSpecByGenesisHash()` which can only hold one entry per genesis hash, breaking when mainnet and bloatnet share the same hash (`0xd4e56740...`) - Thread `chainName string` through `CommitGenesisBlock`/`WriteGenesisBlock`/`configOrDefault` so all lookups use `ChainSpecByName` instead of genesis hash - Pass chain-specific bootnodes/DNS directly to sentry `GrpcServer` instead of looking them up by genesis hash at P2P server start time ## Context The non-deterministic Go map iteration in `init()` made the genesis hash collision winner random — bloatnet would sometimes load mainnet's snapshot hashes (306 files instead of 278), causing "webseed infohash mismatch" warnings and incorrect sync behavior. ## Test plan - [x] Bloatnet: `erigon init --chain=bloatnet --datadir=<DIR> <genesis.json>` + `erigon --chain=bloatnet --datadir=<DIR> --caplin.checkpoint-sync.disable` — 278 header-chain files (not mainnet's 306), no "webseed infohash mismatch", deterministic across 3 runs ## Post-merge - [ ] Cherry-pick the merge commit to `main`
3 of 4 tasks
wmitsuda
added a commit
that referenced
this pull request
Mar 9, 2026
…collisions (#19741) ## Summary - Migrate bloatnet config to perf-devnet-3: updated CL bootstrap ENRs, checkpoint sync URL, fork versions, MinGenesisTime, EL bootnodes, and genesis state SSZ - Remove `registeredChainsByGenesisHash` map and `ChainSpecByGenesisHash()` which can only hold one entry per genesis hash, breaking when mainnet and bloatnet share the same hash (`0xd4e56740...`) - Thread `chainName string` through `CommitGenesisBlock`/`WriteGenesisBlock`/`configOrDefault` so all lookups use `ChainSpecByName` instead of genesis hash - Pass chain-specific bootnodes/DNS directly to sentry `GrpcServer` instead of looking them up by genesis hash at P2P server start time ## Context The non-deterministic Go map iteration in `init()` made the genesis hash collision winner random — bloatnet would sometimes load mainnet's snapshot hashes (306 files instead of 278), causing "webseed infohash mismatch" warnings and incorrect sync behavior. ## Test plan - [x] Bloatnet: `erigon init --chain=bloatnet --datadir=<DIR> <genesis.json>` + `erigon --chain=bloatnet --datadir=<DIR> --caplin.checkpoint-sync.disable` — 278 header-chain files (not mainnet's 306), no "webseed infohash mismatch", deterministic across 3 runs ## Post-merge - [ ] Cherry-pick the merge commit to `main`
wmitsuda
added a commit
that referenced
this pull request
Mar 10, 2026
…s hash collisions (#19741) (#19753) ## Summary Cherry-pick of #19741 from `performance` to `release/3.4`. - Migrate bloatnet configuration from perf-devnet-2 (which is down) to perf-devnet-3 - Fix genesis hash collisions in `registeredChainsByGenesisHash` caused by multiple chains sharing the same genesis hash - Replace the genesis-hash-based chain lookup with explicit `chainName` parameter threading ## Changes - **`execution/chain/spec/config.go`** — Remove `registeredChainsByGenesisHash` map - **`execution/state/genesiswrite/genesis_write.go`** — Add `chainName` parameter to `WriteGenesisState` - **`p2p/sentry/sentry_grpc_server.go`** — Accept `bootnodes`/`dnsNetwork` as explicit params instead of looking them up from genesis hash - **`node/eth/backend.go`** — Resolve and pass chain-specific bootnodes/DNS params - **`cl/clparams/config.go`** — Update bloatnet ENR and fork configuration for perf-devnet-3 ## Test plan - [x] Cherry-pick applies cleanly (no conflicts) - [x] `make lint` passes - [x] `make erigon integration` builds successfully - [ ] CI passes
wmitsuda
added a commit
that referenced
this pull request
Mar 10, 2026
…collisions (#19741) ## Summary - Migrate bloatnet config to perf-devnet-3: updated CL bootstrap ENRs, checkpoint sync URL, fork versions, MinGenesisTime, EL bootnodes, and genesis state SSZ - Remove `registeredChainsByGenesisHash` map and `ChainSpecByGenesisHash()` which can only hold one entry per genesis hash, breaking when mainnet and bloatnet share the same hash (`0xd4e56740...`) - Thread `chainName string` through `CommitGenesisBlock`/`WriteGenesisBlock`/`configOrDefault` so all lookups use `ChainSpecByName` instead of genesis hash - Pass chain-specific bootnodes/DNS directly to sentry `GrpcServer` instead of looking them up by genesis hash at P2P server start time ## Context The non-deterministic Go map iteration in `init()` made the genesis hash collision winner random — bloatnet would sometimes load mainnet's snapshot hashes (306 files instead of 278), causing "webseed infohash mismatch" warnings and incorrect sync behavior. ## Test plan - [x] Bloatnet: `erigon init --chain=bloatnet --datadir=<DIR> <genesis.json>` + `erigon --chain=bloatnet --datadir=<DIR> --caplin.checkpoint-sync.disable` — 278 header-chain files (not mainnet's 306), no "webseed infohash mismatch", deterministic across 3 runs ## Post-merge - [ ] Cherry-pick the merge commit to `main`
wmitsuda
added a commit
that referenced
this pull request
Mar 11, 2026
…collisions (#19741) (#19751) ## Summary Cherry-pick of #19741 from `performance` to `main`. - Migrate bloatnet configuration from perf-devnet-2 (which is down) to perf-devnet-3 - Fix genesis hash collisions in `registeredChainsByGenesisHash` caused by multiple chains sharing the same genesis hash - Replace the genesis-hash-based chain lookup with explicit `chainName` parameter threading ## Changes - **`execution/chain/spec/config.go`** — Remove `registeredChainsByGenesisHash` map - **`execution/state/genesiswrite/genesis_write.go`** — Add `chainName` parameter to `WriteGenesisState` - **`p2p/sentry/sentry_grpc_server.go`** — Accept `bootnodes`/`dnsNetwork` as explicit params instead of looking them up from genesis hash - **`node/eth/backend.go`** — Resolve and pass chain-specific bootnodes/DNS params - **`cl/clparams/config.go`** — Update bloatnet ENR and fork configuration for perf-devnet-3 ## Test plan - [x] Cherry-pick applies cleanly (no conflicts) - [x] `make lint` passes - [x] `make erigon integration` builds successfully - [ ] CI passes
wmitsuda
added a commit
that referenced
this pull request
May 13, 2026
The merge of performance into wmitsuda/performance-tested produced two adjacent BloatnetBootstrapNodes declarations. The dedup picked the 3-node pre-migration (perf-devnet-2) set instead of the 8-node post-migration (perf-devnet-3) set from #19741. Restore the perf-devnet-3 list to match the performance branch.
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.
Summary
registeredChainsByGenesisHashmap andChainSpecByGenesisHash()which can only hold one entry per genesis hash, breaking when mainnet and bloatnet share the same hash (0xd4e56740...)chainName stringthroughCommitGenesisBlock/WriteGenesisBlock/configOrDefaultso all lookups useChainSpecByNameinstead of genesis hashGrpcServerinstead of looking them up by genesis hash at P2P server start timeContext
The non-deterministic Go map iteration in
init()made the genesis hash collision winner random — bloatnet would sometimes load mainnet's snapshot hashes (306 files instead of 278), causing "webseed infohash mismatch" warnings and incorrect sync behavior.Test plan
erigon init --chain=bloatnet --datadir=<DIR> <genesis.json>+erigon --chain=bloatnet --datadir=<DIR> --caplin.checkpoint-sync.disable— 278 header-chain files (not mainnet's 306), no "webseed infohash mismatch", deterministic across 3 runsPost-merge
main— [cherry-pick] Migrate bloatnet to perf-devnet-3 and fix genesis hash collisions (#19741) #19751release/3.4— [r3.4] [cherry-pick] Migrate bloatnet to perf-devnet-3 and fix genesis hash collisions (#19741) #19753