test(dash): S8 job-notify round-trip KAT — merkle branch binds coinbase to canonical root#632
Merged
Merged
Conversation
4596a0e to
2d403f2
Compare
…mbled coinbase to canonical root Final leaf of the S8 stratum-binding suite. Pins the notify->submit seam: the mining.notify merkle_branch (sent once per job) must fold the miners reassembled coinb1||extranonce2||coinb2 back to the SAME canonical merkle root the pool computes over the full tx list, for every extranonce2. That equality is why a miner iterates the slot locally without re-fetching. Oracle: p2pool-dash @9a0a609 dash/stratum.py (LE merkle-branch packing) + work.py:421,436-437 (coinb1/coinb2 split). All goldens from an independent Python sha256d walk; leaf0 anchors match test_dash_stratum_binding. Pure / socket-free / node-free synthetic layout; DASH-tree-fenced (test/ + CMakeLists + build.yml allowlist only), non-consensus.
2d403f2 to
dfc1000
Compare
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.
DASH S8 stratum-binding suite — job-notify round-trip KAT (final leaf)
Closes the S8 stratum-binding contract suite. The two prior leaves pin the
get_work()->jobhalf:test_dash_stratum_binding, test(dash-s8): stratum-binding contract harness — job target -> wire difficulty #629/test(dash): S8 stratum-binding contract KAT (extranonce2 nonce64-slot) #630)test_dash_work_job_targets, on master)This leaf pins the remaining notify->submit seam: the
mining.notifymerkle branch — computed once per job — must fold the miner's reassembled
coinb1 || extranonce2 || coinb2back to the same canonical merkle rootthe pool derives over the full tx list, for every extranonce2. That
equality is the whole reason a miner iterates the slot locally without
re-fetching the job; if the branch did not bind, every submit would carry a
root the pool rejects.
What it pins
Non-circular guard
Every expected value is derived from an independent Python sha256d merkle
walk, not from the SUT. The
leaf0anchors matchtest_dash_stratum_bindingexactly, confirming a shared coinbase layout. The pool-side canonical root is
computed in-test with a standard merkle reduction, separate from
merkle_branches_raw, so the round-trip equality is a real cross-check ratherthan a tautology.
Oracle
frstrtr/p2pool-dash @9a0a609 —
dash/stratum.py(LE merkle-branch packing) +p2pool/work.py:421,436-437(coinb1/coinb2 split).Scope / safety
Pure, socket-free, node-free synthetic layout — no dashd, no live sharechain,
no template build. DASH-tree-fenced: adds
test/test_dash_job_notify_roundtrip.cppplus its
test/CMakeLists.txtregistration and the twobuild.ymlallowlistentries only. Non-consensus, additive, GO-independent. Merge-gated on full
green — no self-merge.