Skip to content

test(dash-s8): stratum job-notify round-trip KAT — merkle_branch folds to header root#631

Merged
frstrtr merged 1 commit into
masterfrom
dash/s8-stratum-notify-roundtrip
Jul 4, 2026
Merged

test(dash-s8): stratum job-notify round-trip KAT — merkle_branch folds to header root#631
frstrtr merged 1 commit into
masterfrom
dash/s8-stratum-notify-roundtrip

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 4, 2026

Copy link
Copy Markdown
Owner

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.

…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.
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