feat(genesis): carry testnet identities and points into mainnet block 0 #1129
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.45) × (1 − Review Confidence (0.27)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 408 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 40% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1129"
general
weight: 0.35
claude[bot]
Mainnet starts from a fresh block 0 that carries testnet users' identities, points and referrals, with every balance at 0. Validators come from the launch list in the genesis.
Refs kynesyslabs/mainnet-launch#26
What changes
identityCarryover(off by default, scheduled at 0 in the mainnet genesis). Under it block 0 restoresgcr_main.jsonl(identities, points,referralInfo, balances 0), copies storage programs and identity commitments byte for byte, and replacesvalidators.jsonlwith the genesis launch validators.balance_sumother than"0", a missing or mismatchedvalidators.jsonl, an unstake in flight, orosDenominationnot recorded as applied. A genesis that schedules the fork at 0 without a pinned snapshot manifest is refused too.genesis_imported_identitiesrecords every imported identity key. Under the fork, linking one of them again does not pay the first-link award a second time, to any account. Wallet keys are lowercased so a case-flipped relink can't miss the table. The table is derived from the snapshot that the genesis hash binds, so it is not in the state hash; on restart the node rebuilds it from the boundgcr_main.jsonland refuses to boot on a mismatch.userId), so an imported link whose username changed since testnet can still be removed.bun run snapshot:carryover --in data/snapshot --validators <file> --out <dir>builds the zeroed snapshot and a reproducible manifest.docs/mainnet/genesis-import.md.Evidence
scripts/test-consensus.sh: 136 files, 0 failed (after merging currentstabilisation).identityCarryoverFork.test.ts5/5. Type check clean.testing/genesis-acceptance/run.sh): 12/12 scenarios matched (fresh boot with pins, one-byte genesis change, missing and malformed pins, changed snapshot, restart with changed pin, moved and far fork schedules, unknown fork, wrong block-0 pin).The SDK side (optional
userIdon the Web2/TLSN unlink builders) is a separate sdks PR; this node change accepts both forms.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
- Added support for carrying identity data into a mainnet genesis snapshot while resetting account balances and applying the launch validator list.
- Added snapshot validation and integrity checks, including requirements for matching validators, compatible fork settings, and a bound manifest hash.
- Under the carryover fork, Web2 and TLSN unlink requests can identify accounts by user ID; imported identities do not receive a first-link award.
- Added guidance for building and reproducing carryover snapshots, and updated mainnet launch configuration and readiness requirements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->