fix(chains/atlantic-2): replace embedded genesis to match live chain#21
fix(chains/atlantic-2): replace embedded genesis to match live chain#21bdchatham wants to merge 2 commits into
Conversation
sei-config's embedded atlantic-2 genesis didn't match the actual
running atlantic-2 chain. The mismatch was structural — different
validator set entirely:
sei-config (before) live atlantic-2
top-level .validators 5 17
app_state.bank.balances 1606 1043
app_state.auth.accounts 1606 1043
app_state.genutil.gen_txs 5 17
The 5 validator addresses in the old sei-config copy (3B9452..,
6606707.., 8071266.., C3AEA3.., DB22F3..) are completely different
from the 17 in the live chain (04AD1DF.., 1C64B5.., 1E633E.., ...).
Cross-checked against an independent operator's /genesis_chunked
(sei-testnet-rpc.polkachu.com at atlantic-2 height ~249722485);
polkachu agrees byte-for-byte with sei-protocol/chain-configs for
the validator set, accounts, and balances. sei-config was the
outlier.
Block-sync-from-genesis on atlantic-2 with the old sei-config would
have failed at the launch-genesis hash check; nodes today work only
because they state-sync (which bypasses the launch-genesis hash and
trusts a snapshot at a recent height). atlantic-2 archive bring-up
would have failed twice — once on this wrong genesis, then again on
the binary-version mismatch from #20 follow-ups.
This commit replaces the file with:
- chain-configs/atlantic-2/genesis.json (the launch genesis the
live chain actually instantiated with — 17 validators), plus
- the populated app_state.params block (cosmosGasParams +
feesParams.globalMinimumGasPrices) needed to avoid v6.4.1+
cold-start panic on fresh nodes. Values pulled from on-chain
via `seid query params {feesparams,cosmosgasparams}` against
a running wave-0 RPC; matches what pacific-1 and arctic-1 in
sei-config already have.
File size: 763 KiB → 521 KiB.
Cross-check parity:
- pacific-1: sei-config already matches live chain (validated
against polkachu/sei-rpc.polkachu.com).
- arctic-1: sei-config already matches live chain (validated
against rpc-arctic-1.sei-apis.com).
- Neither needs touching.
Out of scope:
- The arctic-1 archive-bootstrap panic on `whitelisted_codehashes_bank_send`
is a separate binary-version mismatch, not a sei-config drift.
Refs: #20
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Companion to the previous commit replacing chains/atlantic-2/genesis.json with the live-chain-matching version. The genesis_time in the new file is 2023-02-24T01:00:00Z; the ChainInfo hardcoded entry was still pointing at 2023-02-22T23:45:12.575885043Z, which was the genesis_time of the old (structurally wrong) sei-config copy. TestGenesisForChain_KnownChains now passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR SummaryMedium Risk Overview pacific-1 and arctic-1 are unchanged. Reviewed by Cursor Bugbot for commit d7bdbf6. Bugbot is set up for automated code reviews on this repo. Configure here. |
Summary
sei-config's embedded
chains/atlantic-2/genesis.jsondidn't match the genesis that the live atlantic-2 chain actually instantiated with. The mismatch was structural — different validator set entirely. This PR replaces the file with the correct content fromsei-protocol/chain-configs, plus the populatedapp_state.paramsblock (cosmosGasParams+feesParams.globalMinimumGasPrices) that the binary requires at cold-start. ChainInfo's hardcodedGenesisTimeis updated to match the new file.Evidence
Cross-checked sei-config's atlantic-2 against the live atlantic-2 chain via an independent operator (
sei-testnet-rpc.polkachu.com, at height ~249722485). Polkachu's/genesis_chunkedmatcheschain-configsbyte-for-byte on validators, accounts, and balances; sei-config was the outlier..validators.app_state.bank.balances.app_state.auth.accounts.app_state.genutil.gen_txsValidator sets are fundamentally different.
validators[0]in array order:3B9452E7C69E99BB0232E5C17A5C861541D4B766C6208FF552C519044DFCA169E88F4EA1A2BE7BABC6208FF552C519044DFCA169E88F4EA1A2BE7BAB✓All 17 sorted addresses in chain-configs match all 17 sorted addresses in polkachu (sample of first three:
04AD1DF0...,1C64B578...,1E633EC2...). None of sei-config's 5 addresses appear in either set. This isn't drift — it's the wrong genesis entirely.Why this hasn't been observed in prod
Existing atlantic-2 nodes bootstrap via state-sync, which validates against a recent trusted snapshot and bypasses launch-genesis hash verification. So a node with the wrong embedded genesis can still successfully sync into the right chain. The error mode where this would have surfaced is block-sync-from-genesis (archive bootstrap), where the launch-genesis hash mismatch causes immediate failure. atlantic-2 archives are currently disabled in our prod kustomization for separate reasons, so this drift sat dormant.
Cross-check parity for the other chains (no change needed)
sei-rpc.polkachu.com). 25 validators, identical addresses across all three sources (sei-config, chain-configs, polkachu live).rpc-arctic-1.sei-apis.com). 30 validators, identical addresses across all three sources.Neither pacific-1 nor arctic-1 is touched by this PR.
Changes
chains/atlantic-2/genesis.jsonreplaced withchain-configs/atlantic-2/genesis.json(the launch genesis the live chain instantiated with) + the populatedapp_state.paramsblock. The params block is identical to what pacific-1 and arctic-1 already have in sei-config (added inbe978d9to prevent v6.4.1+ cold-start panics); values pulled from on-chain viaseid query params {feesparams,cosmosgasparams}on a running wave-0 RPC. All three chains operationally use0.020000000000000000 useiand a 1/1 cosmos gas multiplier.chains.go— atlantic-2'sChainInfo.GenesisTimeupdated from2023-02-22T23:45:12.575885043Z(the genesis_time of the old wrong copy) to2023-02-24T01:00:00.000000000Z(the genesis_time the live chain actually has).TestGenesisForChain_KnownChainsnow passes again.File-size change:
763 KiB → 521 KiB(the old copy had ~243 KiB of accounts and balances that don't exist in the actual atlantic-2 chain).What this PR does NOT address
whitelisted_codehashes_bank_sendis a separate binary-version mismatch (v6.5.0 doesn't know that field; the chain runs a newer binary). That field is byte-identical between sei-config and chain-configs for arctic-1, matches what the live chain has, and isn't a genesis drift issue.make sync-genesis+ CI drift check) proposed in Sync embedded chain genesis files from sei-protocol/chain-configs #20. The cross-check work for this PR found that 2/3 chains already match upstream; the remaining sync-mechanism need is much smaller than the issue originally framed. Worth a separate refresher comment on Sync embedded chain genesis files from sei-protocol/chain-configs #20.Follow-ups worth tracking (raised in review, non-blocking)
consensus_paramsvs liveconsensus_paramsdrift exists on all three chains (missingmin_txs_in_block/max_gas_wanted;vote_extensions_enable_heightas number vs string). This is the pattern inherited from upstreamchain-configs. Only matters for block-sync-from-genesis (state-sync masks it). Worth a follow-up issue documenting the policy: embedded genesis is for state-sync bootstrap only, not replay-from-genesis. Un-defer if anyone proposes a replay flow.GenesisTimeformat normalization: live polkachu reports2023-02-24T01:00:00Z; embedded file andChainInfouse2023-02-24T01:00:00.000000000Z. Future regen scripts would need to normalize. One-line helper as a follow-up.Refs
seid query params feesparamsagainst in-cluster wave-0 RPCs +/genesis_chunkedagainst independent operators (polkachu, sei-apis, seinetwork.io).