nmc(pe-2e #251): won-block reconstruct seam (forced-won-share, captured-template) - #276
Merged
Conversation
…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
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.
This was referenced Jun 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.hpp—assemble_won_blockSSOT:reconstruct_block_headerrecomputes the parent merkle_root via theaux_merkle_rootbranch walk (SmallBlockHeader omits it); tx order[gentx] ++ other_txs; BlockTypeTX_WITH_WITNESScodec == livesubmit_blockpath so the block round-trips and the daemon accepts.coin/reconstruct_won_block.hpp—reconstruct_won_block_from_template: the correct, version-agnostic broadcast source (captured GBTcurrent_worktransactions[], not a share ref-walk).test/reconstruct_won_block_test.cpp— the forced-won-share seam (synthetic share == parent block) driveson_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.