nmc: PD-prep golden fixture — pin dual-target MM-commitment byte layout - #409
Merged
Conversation
…yout Pin PD acceptance target ahead of the build code (#408 build_mm_commitment): hand-compute the 44-byte merged-mining marker from the Namecoin/Bitcoin auxpow.cpp reference layout (magic | reversed root | LE size | LE nonce) and assert it as an explicit byte literal. Does NOT import or invoke build_mm_commitment, so it is an independent oracle rather than a mirror of the build side. Binds to the already-merged verify SSOT via scan_mm_commitment (MATCH on the live single-slot posture and a height-2 multi-slot case, plus a wrong-slot MISMATCH negative) and cross-checks aux_expected_index. Fenced to the nmc test target (additive, +3 KATs 77->80), rides the already-allowlisted nmc_auxpow_merkle_test exe; no build.yml or consensus-value change.
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.
What
Golden-fixture KATs that pin PD acceptance target ahead of the build code. They hand-compute the 44-byte merged-mining marker from the Namecoin/Bitcoin
auxpow.cppreference layout and assert it as an explicit byte literal:#408-independent by construction
Does NOT import or invoke
build_mm_commitment(PR #408 PD surface). The literal is an independent oracle PD output must reproduce byte-for-byte — not a mirror of the build side. Zero stack-rot risk; cut off master, not stacked on #408.Binds to the already-merged verify SSOT:
scan_mm_commitmentreturnsMATCHon the live single-slot posture (h=0) and a height-2 multi-slot case, both bare and after scriptSig framing;MISMATCH(slot field is load-bearing);aux_expected_indexcross-checks the deterministic slot;Fence / CI
nmc_auxpow_merkle_test— nobuild.ymlchange, no NOT_BUILT trap, no consensus-value change.