Skip to content

nmc(P1 PE 2b-0): pin testnet genesis + chain_id=1 in NMCChainParams - #233

Merged
frstrtr merged 1 commit into
masterfrom
nmc/p1pe-2b0-pin-testnet-genesis
Jun 19, 2026
Merged

nmc(P1 PE 2b-0): pin testnet genesis + chain_id=1 in NMCChainParams#233
frstrtr merged 1 commit into
masterfrom
nmc/p1pe-2b0-pin-testnet-genesis

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 19, 2026

Copy link
Copy Markdown
Owner

NMC P1 PE — slice 2b-0 (genesis pin, prerequisite to the cid=1 registration block)

Replaces the TO-CONFIRM placeholders in NMCChainParams::testnet() with the real Namecoin testnet genesis, pinned against a live namecoind on .140 (getblockhash 0 / getblockheader, 2026-06-19) and re-derived locally:

field value
version 1
time 1296688602
bits 0x1d07fff8
nonce 384568319
merkleroot 4a5e1e4b…deda33b
genesis hash 00000007199508e34a9ff81e6ec0c477a4cccff2a4767a8eee39c11db367b008

Also adds NMCChainParams::testnet_genesis_header() (the 80-byte parent the embedded HeaderChain will seed at height 0) and pins aux_chain_id = 1 (Namecoin nAuxpowChainId = 0x0001, both nets) — the cid the registration block (2b) keys on.

Test

New NmcP1Genesis.TestnetHeaderRederivesPinnedHash KAT re-derives the pinned hash via block_hash() — the expected hash is external daemon truth, not self-derived from the header. Rides the allowlisted nmc_auxpow_wire_test exe → no build.yml change. nmc_auxpow_wire_test: 3/3 PASS.

Fence / isolation

  • Diff confined to src/impl/nmc/ (git diff --name-only: coin/header_chain.hpp, test/auxpow_wire_test.cpp). No shared seam, no other coin tree, no CI change.
  • chain_id is an isolation primitive (bucket-1) — pinned per-coin, never unified.

Known limitation (carried to 2b)

Mainnet genesis stays TO-CONFIRM: pinning needs a namecoin MAINNET node. .140 is currently on testnet, height 0 (card237 recorded it as a synced mainnet node — it has since been repointed). The 2e won-block proof for the mainnet path needs a mainnet namecoind back online.

Signed, zero-attribution. NMC-tree-only → auto-merge-eligible; I do not self-merge.

Replace the TO-CONFIRM placeholders in NMCChainParams::testnet() with the
real Namecoin testnet genesis, pinned against a live namecoind on .140
(getblockhash 0 / getblockheader, 2026-06-19):
  version=1 time=1296688602 bits=0x1d07fff8 nonce=384568319
  merkleroot=4a5e1e4b..deda33b  ->  hash=00000007..367b008

Add NMCChainParams::testnet_genesis_header() (the 80-byte parent the
embedded HeaderChain seeds at height 0) and pin aux_chain_id=1
(Namecoin nAuxpowChainId=0x0001, both nets). New GenesisTestnet KAT
re-derives the pinned hash via block_hash() (external daemon truth, not
self-derived). Rides the allowlisted nmc_auxpow_wire_test exe -> no
build.yml change. Mainnet genesis stays TO-CONFIRM: pinning needs a
namecoin MAINNET node (.140 is currently on testnet, height 0).

Fence: src/impl/nmc/ only.
@frstrtr
frstrtr merged commit b7ebc45 into master Jun 19, 2026
18 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.

1 participant