Skip to content

test(dash): S8 stratum-binding contract KAT (extranonce2 nonce64-slot)#630

Merged
frstrtr merged 2 commits into
masterfrom
dash/s8-stratum-binding-kat
Jul 4, 2026
Merged

test(dash): S8 stratum-binding contract KAT (extranonce2 nonce64-slot)#630
frstrtr merged 2 commits into
masterfrom
dash/s8-stratum-binding-kat

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Fenced, test-only, non-consensus warm-lane slice (integrator-authorized on the [s=g1-vardiff-kat-pushed] thread as the next slice after #627).

What

Pins the get_work() -> stratum job binding contract — the coinbase nonce64 / extranonce2 slot geometry and the coinb1/coinb2 split+reassembly that partitions the miner search space. Complements #627/test_dash_work_job_targets (which pin the job target arithmetic) — this is the coinbase nonce-binding half of the same get_work() path.

Oracle

frstrtr/p2pool-dash @9a0a609 p2pool/work.py:21,421,436-438 (COINBASE_NONCE_LENGTH=8; coinb1 = gentx[:-payload-8-4]; zero-nonce reassembly == gentx). Non-circular: every expected value derived from the oracle contract or an independent Python sha256d, not from the SUT.

Coverage (6 KATs, all green locally)

  • Extranonce2WidthOraclePin — EXTRANONCE2_SIZE == COINBASE_NONCE_LENGTH == 8
  • SplitBoundaryGeometry — coinb1=bytes[:off], coinb2=bytes[off+8:]
  • ZeroNonceIsIdentity — zero nonce reassembles gentx byte-for-byte (work.py:437)
  • SlotIsolation — only the 8 slot bytes move across extranonce2 values
  • BindingInjectivity — distinct extranonce2 -> distinct coinbase leaf (search-space partition)
  • GoldenLeafHashes — independent sha256d byte-parity anchors

Fencing / classification

Touches only test/test_dash_stratum_binding.cpp, test/CMakeLists.txt, and the build.yml test allowlist (x2). No prod/consensus code; pure/socket-free/node-free (synthetic CoinbaseLayout, no dashd, no sharechain). IDENTIFIER/PREFIX-neutral — a bucket-1 regression guard, not oracle-conformance mutation. Independently landable ahead of the migration GO. No self-merge — integrator verifies FULL gh CI rollup.

@frstrtr frstrtr force-pushed the dash/s8-stratum-binding-kat branch from c82bf56 to 9c20d38 Compare July 4, 2026 00:39
frstrtr added a commit that referenced this pull request Jul 4, 2026
Rebase-clean union of the #628-vs-#630 add_executable collision left
target_link_libraries(test_dash_share_messages) opened but unterminated
with add_executable(test_dash_stratum_binding) interleaved into it,
producing CMake parse error at test/CMakeLists.txt:322 (missing ending
) and breaking configure on all platforms (macOS/Windows failed fast;
Linux would follow). Split into two complete, separate target blocks.
Configure clean; test_dash_stratum_binding builds; ctest 6/6.
frstrtr added 2 commits July 4, 2026 17:55
Fenced test-only slice: pins the get_work() -> stratum job BINDING contract
(coinbase nonce64 / extranonce2 slot geometry + coinb1/coinb2 split and
reassembly that partitions the miner search space) against oracle
frstrtr/p2pool-dash @9a0a609 work.py:21,421,436-438.

6 KATs, all derived independently of the SUT (oracle contract + Python
sha256d goldens):
  Extranonce2WidthOraclePin  EXTRANONCE2_SIZE == COINBASE_NONCE_LENGTH == 8
  SplitBoundaryGeometry      coinb1=bytes[:off], coinb2=bytes[off+8:]
  ZeroNonceIsIdentity        zero nonce reassembles gentx byte-for-byte (:437)
  SlotIsolation              only the 8 slot bytes move across extranonce2
  BindingInjectivity         distinct extranonce2 -> distinct coinbase leaf
  GoldenLeafHashes           independent sha256d byte-parity anchors

Pure/socket-free/node-free (synthetic CoinbaseLayout, no dashd, no
sharechain). Touches only test/ + build.yml allowlist -> IDENTIFIER-neutral,
non-consensus, independently landable ahead of the migration GO. No
self-merge.
Rebase-clean union of the #628-vs-#630 add_executable collision left
target_link_libraries(test_dash_share_messages) opened but unterminated
with add_executable(test_dash_stratum_binding) interleaved into it,
producing CMake parse error at test/CMakeLists.txt:322 (missing ending
) and breaking configure on all platforms (macOS/Windows failed fast;
Linux would follow). Split into two complete, separate target blocks.
Configure clean; test_dash_stratum_binding builds; ctest 6/6.
@frstrtr frstrtr force-pushed the dash/s8-stratum-binding-kat branch from 361d5d9 to 1e6f4cb Compare July 4, 2026 17:57
@frstrtr frstrtr merged commit 6249d2c into master Jul 4, 2026
22 checks passed
@frstrtr frstrtr deleted the dash/s8-stratum-binding-kat branch July 4, 2026 19:54
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