test(dash): G1 difficulty/vardiff parity KAT — share-diff floor + per-share min_work oracle pin#628
Merged
Merged
Conversation
fd064d6 to
c2ef6a7
Compare
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 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.
c2ef6a7 to
870ed06
Compare
frstrtr
added a commit
that referenced
this pull request
Jul 4, 2026
#630) * test(dash): S8 stratum-binding contract KAT (extranonce2 nonce64-slot) 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. * fix(dash): untangle test/CMakeLists.txt stratum-binding merge resolution 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. --------- Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
870ed06 to
fcd8424
Compare
frstrtr
added a commit
that referenced
this pull request
Jul 4, 2026
…fix #628 NOT_BUILT red) The Release+ASan/UBSan job build --target list omitted test_dash_difficulty_parity, so the target was never built there and ctest reported "could not find executable" (NOT_BUILT sentinel -> red). The first (Release) job already listed it; CMake wiring is correct and the target builds+links (6/6 DashDifficultyParity pass locally). Add the target to the second allowlist to match.
This was referenced Jul 4, 2026
frstrtr
added a commit
that referenced
this pull request
Jul 4, 2026
…fix #628 NOT_BUILT red) The Release+ASan/UBSan job build --target list omitted test_dash_difficulty_parity, so the target was never built there and ctest reported "could not find executable" (NOT_BUILT sentinel -> red). The first (Release) job already listed it; CMake wiring is correct and the target builds+links (6/6 DashDifficultyParity pass locally). Add the target to the second allowlist to match.
6e9c085 to
c689cf5
Compare
…-share min_work oracle pin Pins dash::SharechainConfig::max_target() byte-exactness (mainnet 0xFFFF*2**208, testnet 2**256//2**20-1) and chain::target_to_average_attempts(floor) per-share min_work (mainnet 4295032833, testnet 1048576) to oracle-independent values derived from frstrtr/p2pool-dash bitcoin/data.py, plus the min_work accumulation identity and floor bits roundtrip. Pure/socket-free; 6/6 on Linux x86_64 ctest. Consensus-neutral (read-only difficulty accounting), independently-landable.
c689cf5 to
b3c397a
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.
Non-fenced, consensus-NEUTRAL warm-lane slice authorized by integrator (keep the migration-gating byte-parity groundwork landable without an operator tap).
What
New pure/socket-free KAT
test/test_dash_difficulty_parity.cpp(6 tests) pinning the DASH sharechain difficulty surface to oracle-EXACT arithmetic from frstrtr/p2pool-dash (networks/dash.py + bitcoin/data.py):dash::SharechainConfig::max_target()mainnet0xFFFF*2**208, testnet2**256//2**20-1.chain::target_to_average_attempts(floor)=2**256//(target+1)→ mainnet 4295032833 (0x100010001), testnet 1048576 (2**20). This is the quantity ShareIndex accumulates from m_max_bits (share_chain.hpp:228).Every expected value derived INDEPENDENTLY from the oracle integer formula (derive comments inline), not read back from the SUT — true parity pin, not a tautology.
Why a DASH-specific KAT
The cross-coin APS-over-chain accumulation is already pinned LTC-instantiated in test_compute_share_target.cpp. This closes the DASH-lane gap: the config floor + min_work-per-share numbers differ (p2pool-dash, not p2pool-ltc) and had no dedicated KAT.
Verify
Built + ran on workstation Linux x86_64:
ctest -R ^DashDifficultyParity→ 100% 6/6, non-hollow (out of 6). GPG-signed (50AB1379285EFE76).No prod-consensus mutation (read-only difficulty accounting). Review-gated → integrator verify (oracle + full CI) → operator tap. No self-merge.