Skip to content

Commit e9f3665

Browse files
committed
dash: T1c byte-parity KAT vs live p2pool-dash oracle corpus (share-v16)
Close the T1c serialization-parity gap the 2026-07-21 join-lane audit flagged: test_dash_conformance.cpp only exercised synthetic/out-of-band vectors, with no byte-parity test against a real p2pool-dash node. Adds: - test/data/dash_oracle_corpus.hpp: 29 distinct canonical shares captured off a controlled p2pool-dash node JOINED to the live public sharechain (share-v16 / min-proto-1700), each raw wire-entry cross-validated byte-identical across 4 independent peers, deduped by share_hash. - test/test_dash_oracle_byte_parity.cpp: round-trips every canonical SHARE_RAW through the production load_share -> DashFormatter::Read -> DashFormatter::Write path and asserts serialize(parse(raw)) == raw (the exact condition for a relayed share to VERIFY_PASS on the fork), plus semantic cross-checks (prev_hash / donation / new_tx_count / pubkey_hash -> payout_script) against the fork's SHARE_RECV fields. Result: 30/30 pass. c2pool's DASH v16 layout already byte-matches the canonical fork; no serialization divergence found. Promotes the real captured-corpus KAT the conformance suite was missing.
1 parent 9c7ae70 commit e9f3665

3 files changed

Lines changed: 417 additions & 0 deletions

File tree

test/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,21 @@ if (BUILD_TESTING AND GTest_FOUND)
263263
target_link_libraries(test_dash_conformance PRIVATE c2pool_payout c2pool_hashrate c2pool_merged_mining) # OBJECT-lib SCC direct-naming (#22/#39): core stratum/web_server TUs
264264
gtest_add_tests(test_dash_conformance "" AUTO)
265265

266+
# DASH share-v16 BYTE-PARITY KAT (T1c gate): round-trips REAL captured
267+
# p2pool-dash oracle-gate wire bytes (test/data/dash_oracle_corpus.hpp)
268+
# through the production load_share/DashFormatter path and demands byte
269+
# identity — the real-corpus test the 2026-07-21 audit flagged as missing.
270+
# Mirrors the test_dash_conformance link set.
271+
add_executable(test_dash_oracle_byte_parity test_dash_oracle_byte_parity.cpp)
272+
target_link_libraries(test_dash_oracle_byte_parity PRIVATE
273+
GTest::gtest_main GTest::gtest
274+
dash_x11 core
275+
nlohmann_json::nlohmann_json
276+
${Boost_LIBRARIES}
277+
)
278+
target_link_libraries(test_dash_oracle_byte_parity PRIVATE c2pool_payout c2pool_hashrate c2pool_merged_mining) # OBJECT-lib SCC direct-naming (#22/#39): core stratum/web_server TUs
279+
gtest_add_tests(test_dash_oracle_byte_parity "" AUTO)
280+
266281
# DASH min-protocol-version ratchet gate KAT (#643, option a): pure, header-only
267282
# policy object; no socket/ltc/pool dependency. Mirrors the test_dash_conformance link set.
268283
add_executable(test_dash_min_protocol_gate test_dash_min_protocol_gate.cpp)

0 commit comments

Comments
 (0)