test(dash-s8): stratum job-notify round-trip KAT — merkle_branch folds to header root#631
Merged
Merged
Conversation
…ader root) Pins the mining.notify half of the get_work() stratum contract, complementing #630 (extranonce2 coinbase-slot geometry). Proves the merkle_branch our server ships in mining.notify, folded (leaf index 0) over an extranonce2-substituted coinbase, reproduces the exact header merkle_root -- so #630 slot binding propagates all the way into the block-header field. Binds the REAL landed producer dash::coinbase::merkle_branches_raw(); the miner-side fold and full-tree root are mirrored locally and cross-checked three ways (real branch folds to recomputed full root; both equal independent Python sha256d golden anchors; round-trip exercised across distinct extranonce2 -> the folded roots are injective). 7/7 non-hollow. Fenced: test/ + build.yml allowlist only. Non-consensus, socket-free, node-free. Oracle frstrtr/p2pool-dash @9a0a609: work.py:474/493, dash/data.py:180/189/216.
This was referenced Jul 4, 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.
Next fenced/merge-gated warm-lane leaf of the DASH S8 stratum-binding suite, after #630 (extranonce2 coinbase-slot geometry) and #627/#629 (target arithmetic + binding contract).
What it pins
The mining.notify half of the get_work() stratum contract. #630 proved the extranonce2 (nonce64) coinbase-slot split/reassembly; this leaf proves the merkle_branch the server ships in mining.notify, folded over an extranonce2-substituted coinbase at leaf index 0, reproduces the exact header merkle_root — closing the loop get_work() -> notify -> miner -> block header. #630s slot binding demonstrably propagates into the header field.
Non-circular guard (3 ways)
Binds the real landed producer
dash::coinbase::merkle_branches_raw()(src/impl/dash/coinbase_builder.hpp). The miner-side fold + full-tree root are mirrored locally (the miner is cpuminer, not our code) and cross-checked: (a) real branch folds to the locally-recomputed full root; (b) both equal independent Python sha256d golden anchors (hashlib, not the oracle code); (c) round-trip run across distinct extranonce2 -> folded roots are injective.Oracle
frstrtr/p2pool-dash @9a0a609 —
work.py:474(header root == check_merkle_link(hash256(gentx), link)),:493(calculate_merkle_link),dash/data.py:180/189/216.Fencing
test/ + build.yml allowlist only. Non-consensus, socket-free, node-free — pure synthetic CoinbaseLayout. 7/7 non-hollow locally (ctest #925–931). No self-merge; merge-gated on FULL green + operator tap.