Skip to content

nmc(pe-2e #251): won-block reconstruct seam (forced-won-share, captured-template) - #276

Merged
frstrtr merged 1 commit into
masterfrom
nmc/pe-2e-won-block-seam
Jun 20, 2026
Merged

nmc(pe-2e #251): won-block reconstruct seam (forced-won-share, captured-template)#276
frstrtr merged 1 commit into
masterfrom
nmc/pe-2e-won-block-seam

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Implements the integrator PE-2e won-block-seam decision (forced-won-share seam, test-only; NO BTC --regtest CLI). Mirrors dgb #271 captured-template reconstruct.

What

  • coin/block_assembly.hppassemble_won_block SSOT: reconstruct_block_header recomputes the parent merkle_root via the aux_merkle_root branch walk (SmallBlockHeader omits it); tx order [gentx] ++ other_txs; BlockType TX_WITH_WITNESS codec == live submit_block path so the block round-trips and the daemon accepts.
  • coin/reconstruct_won_block.hppreconstruct_won_block_from_template: the correct, version-agnostic broadcast source (captured GBT current_work transactions[], not a share ref-walk).
  • test/reconstruct_won_block_test.cpp — the forced-won-share seam (synthetic share == parent block) drives on_block_found; 4 KATs: seam fires a faithful parent block / template is the tx source in order / empty template => valid coinbase-only / non-empty branch recomputes root via SSOT. bytes round-trip, hex==HexStr.
  • build.yml — new target into BOTH allowlists (ci: build test_dgb_subsidy in both Linux test jobs (fix master-red NOT_BUILT) #143 NOT_BUILT trap).

Verify

Local: build green, 4/4 KATs pass.

Per-coin isolation: src/impl/nmc/ only. p2pool-merged-v36 surface: NONE. Unblocks #251 soak harness won-block leg.

…ed-template)

Implements the integrator-decided PE-2e won-block seam: a test-only
forced-won-share trigger + captured-GBT-template reconstruct, mirroring
dgb #271. No BTC --regtest CLI / production surface added.

- coin/block_assembly.hpp: assemble_won_block SSOT (reconstruct_block_header
  recomputes merkle_root via the aux_merkle_root branch walk; [gentx]++others;
  BlockType TX_WITH_WITNESS codec == live submitblock path).
- coin/reconstruct_won_block.hpp: reconstruct_won_block_from_template, the
  version-agnostic broadcast source (current_work transactions[], not a share
  ref-walk).
- test/reconstruct_won_block_test.cpp: forced-won-share seam drives the
  reconstruct; 4 KATs (seam fires faithful parent block / template is tx source
  in order / empty template => coinbase-only / non-empty branch recomputes root
  via SSOT). bytes round-trip, hex==HexStr.
- build.yml: new target into BOTH allowlists (#143 NOT_BUILT trap).

Per-coin isolation: src/impl/nmc/ only. p2pool-merged-v36 surface: NONE.
@frstrtr
frstrtr merged commit 009ac59 into master Jun 20, 2026
19 checks passed
frstrtr added a commit that referenced this pull request Jun 20, 2026
Won-block correctness now lives in the test-only KAT seam
reconstruct_won_block_from_template (#276 @c525949b7, master 009ac59),
per integrators forced-won-share decision (no --regtest CLI). Drop the
now-stale "next slice: stand up embedded regtest process" framing; this
soak stands as the P2P substrate validator + external-daemon deployment
soak path. Comment-only, scripts-only, NMC-fenced.
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