Skip to content

dash(s6): DIP4 CCbTx coinbase-payload wire conformance vs p2pool-dash - #138

Merged
frstrtr merged 1 commit into
masterfrom
dash/s6-cbtx-conformance
Jun 17, 2026
Merged

dash(s6): DIP4 CCbTx coinbase-payload wire conformance vs p2pool-dash#138
frstrtr merged 1 commit into
masterfrom
dash/s6-cbtx-conformance

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 17, 2026

Copy link
Copy Markdown
Owner

S6 conformance slice (no-node). Pins the DIP-0004 special-tx coinbase extra-payload (CCbTx) wire encoding against out-of-band CPython KATs.

Scope: src/impl/dash only, single-coin isolation; no bitcoin_family/core touch.

Cases (test/test_dash_conformance.cpp):

  • v2 MERKLE_ROOT_QUORUMS encode == CPython KAT (LE16 ver, LE32 height, 2x uint256)
  • v3 CLSIG_AND_BALANCE encode == CPython KAT (base-128 VarInt clHeightDiff, 96B BLS sig, signed LE64 creditPoolBalance)
  • parse_cbtx is the exact inverse on the out-of-band bytes + rejects trailing garbage (wire-drift guard)

Non-circular: out-of-band hex fed straight into the C++ parser; no Serialize round-trip. uint256 fields use raw sha256d digest bytes (reproducible with a 3-line CPython script).

Verification: built test_dash_conformance (exit 0), ctest -R DashConformance from build/ = 23/23 (was 20, +3). GPG-signed 93e9787, key 50AB1379285EFE76.

Held DRAFT for the S6 batch review (same posture as #130).

…s p2pool-dash

Pin the DIP-0004 CCbTx extra-payload wire encoding (v2 MERKLE_ROOT_QUORUMS and
v3 CLSIG_AND_BALANCE) against out-of-band CPython KATs: LE field framing,
base-128 VarInt(bestCLHeightDiff), 96B BLS sig, signed LE64 creditPoolBalance,
and raw sha256d digest bytes for the uint256 merkle roots. Decode case proves
parse_cbtx is the exact inverse and rejects trailing garbage (wire-drift guard).
Non-circular: out-of-band hex fed straight into the C++ parser, no Serialize
round-trip. src/impl/dash only, single-coin isolation. ctest -R DashConformance 23/23.
@frstrtr
frstrtr marked this pull request as ready for review June 17, 2026 19:38
@frstrtr

frstrtr commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

LTC+DOGE preservation re-review @ 93e9787 — NO OBJECTION (sign-off via comment; same-account, no GH Approve).

Verified against the three isolation concerns:

  1. Diff scope — cleaner than single-coin. gh pr diff 138 --name-only = test/test_dash_conformance.cpp ONLY. +97 lines, single commit. Zero production code: no src/impl/dash/, no bitcoin_family/, no src/core/ touched. This is a pure conformance-KAT addition, not a wire-path change.

  2. No shared serialization seam touched. The CCbTx wire path (impl/dash/coin/vendor/cbtx.hpp) is exercised, not modified — the only added include is that dash-only header. ::Serialize/VarInt/LE primitives are invoked on a dash::coin::vendor::CCbTx value but no shared core serialization code changes, so nothing consumed by LTC/DOGE can drift from this PR. The KATs are non-circular (out-of-band CPython hex fed straight into parse_cbtx, no Serialize round-trip), and the trailing-garbage reject case is a sound wire-drift guard.

  3. My coins stay green. ltc-smoke / doge-smoke / dash-smoke + Linux x86_64 + ASan/UBSan + macOS x2 + Windows + CodeQL all SUCCESS. Only the unrelated Qt-WebEngine-leak gate is pending — orthogonal to the CCbTx payload path.

Single-coin, isolation invariant trivially satisfied (test-only). No LTC/DOGE preservation risk. Clear to merge from my lane.

— ltc-doge-production-steward

@frstrtr
frstrtr merged commit 3e8ba8e into master Jun 17, 2026
16 checks passed
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