Skip to content

Embed the mainnet chain spec: --chain mainnet - #695

Merged
n13 merged 1 commit into
mainfrom
n13/mainnet-chainspec
Sep 9, 2026
Merged

Embed the mainnet chain spec: --chain mainnet#695
n13 merged 1 commit into
mainfrom
n13/mainnet-chainspec

Conversation

@n13

@n13 n13 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds node/src/chain-specs/mainnet.json: the mainnet.json asset of release v1.0.0-gm with the seven a{1..7}-p2p-mainnet.quantus.com bootnodes filled in. bootNodes sits outside genesis, so the genesis object is byte-identical to the released file and the genesis hash is unchanged: 0xfb5487c0be6ae4ade2d41d16e50465129861636c2b8d61fa94d7a19631626fba.
  • Adds the "mainnet" arm to load_spec in node/src/command.rs, so operators run --chain mainnet instead of passing the file (docs/CHAINSPEC_CREATION.md step 3).
  • No runtime change. The genesis runtime stays the v1.0.0-gm srtool wasm (a308b485…f80ded, spec_version 152). The chain id is unchanged, so nodes started on v0.11.1 with --chain ./mainnet.json keep their database when they switch.

Intended to ship as the node-only v1.0.0 release.

Test plan

  • jq -cS .genesis sha256 identical between the release asset and the new file; bootNodes length 7.
  • cargo build --release -p quantus-node, then build-spec --chain mainnet --raw round-trips with the same genesis object and seven bootnodes.
  • quantus-node --chain mainnet --tmp against the live network: logs Initialized genesis block 0xfb5487c0…626fba, chain_getBlockHash(0) returns the same, system_health shows 7 peers within a minute, and the node was syncing (best block 4904 at the time).

node/src/chain-specs/mainnet.json is the mainnet.json asset of release
v1.0.0-gm (genesis runtime = srtool wasm sha256 a308b485..., genesis hash
0xfb5487c0be6ae4ade2d41d16e50465129861636c2b8d61fa94d7a19631626fba) with
the seven a{1..7}-p2p-mainnet.quantus.com bootnodes filled in. bootNodes
sits outside genesis, so the genesis object is byte-identical to the
released file and the hash is unchanged.

Operators can now run --chain mainnet instead of passing the file. The
chain id is the same, so nodes started on v0.11.1 with --chain ./mainnet.json
keep their database.
@n13 n13 added the bot-review label Sep 9, 2026

@n13 n13 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer model: GPT 5.6 Sol

Verdict (advisory): Approve

No blocking findings. The mainnet loader arm follows the repository's documented chain-spec workflow, and the embedded spec preserves the released chain identity.

Validation:

  • Reviewed the complete f5828f0b...b8682608 diff and the surrounding load_spec/chain-spec generation paths.
  • Downloaded the v1.0.0-gm mainnet.json release asset and confirmed every field except the intentionally populated bootNodes array is identical. The genesis object is identical, the embedded runtime hashes to the published a308b485...f80ded, and an existing v0.11.1 node parsed and round-tripped the file unchanged.
  • Started that node from the PR's spec: it reproduced genesis 0xfb5487c0be6ae4ade2d41d16e50465129861636c2b8d61fa94d7a19631626fba, bootstrapped, synchronized to the live tip, and retained chain id mainnet.
  • git diff --check, the pinned scripts/fmt.sh --all -- --check, and Taplo passed. Exact-head CI formatting, strict Clippy, rustdoc, dependency cooldown, and feature-gate checks are green; the Linux/macOS test matrix was still running when reviewed.

Non-blocking operational note: six advertised bootnode identities connected during the smoke test; a4-p2p-mainnet.quantus.com:30333 timed out in the point-in-time check, while the redundant set still reached seven peers and fully synchronized.

@n13 n13 removed the bot-review label Sep 9, 2026
@n13
n13 merged commit 1e94c95 into main Sep 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants