Skip to content

dash(s6): DIP-0027 asset-lock/unlock payload wire conformance KAT - #140

Closed
frstrtr wants to merge 1 commit into
dash/s6-cbtx-conformancefrom
dash/s6-assetlock-conformance
Closed

dash(s6): DIP-0027 asset-lock/unlock payload wire conformance KAT#140
frstrtr wants to merge 1 commit into
dash/s6-cbtx-conformancefrom
dash/s6-assetlock-conformance

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Operator-decided scope (KAT assetlock): DIP-0027 asset-lock WIRE conformance as known-answer-tests — vector-driven serialization/parsing parity ONLY. No state machine (correctly shelved).

What

Adds 6 KATs to test_dash_conformance.cpp covering both DIP-0027 special-tx payloads the credit-pool balance scanner reads off the wire:

  • CAssetLockPayload (type 8): single-output, two-output (+total_credit), empty-vector serialize KATs; parse inverse + trailing-garbage guard.
  • CAssetUnlockPayload (type 9): fixed-layout serialize KAT (index/fee/requestedHeight + quorumHash + 96B BLS sig); parse inverse + trailing-garbage guard.

Non-circular

Expected hex computed OUT-OF-BAND with CPython (LE struct pack + Bitcoin CompactSize + raw sha256d/sig bytes), so pins do not derive from the C++ ::Serialize path under test. Parse cases feed the same out-of-band bytes straight into parse_assetlock_payload/parse_assetunlock_payload.

Isolation / verification

  • Single-coin: src/impl/dash only; test-only (no production change).
  • Linux x86_64 ctest: test_dash_conformance 29/29 green (was 23/29; +6).
  • Target already in build.yml both --target lists; no CMake/workflow change.

Stacked on #138 (s6-cbtx-conformance); retarget to master once #138 lands.

…Lock/CAssetUnlock KAT)

Vector-driven serialization/parsing parity for the two DIP-0027 special-tx
payloads the credit-pool balance scanner reads off the wire: CAssetLockPayload
(type 8, vector<TxOut> credit outputs) and CAssetUnlockPayload (type 9, fixed
index/fee/requestedHeight + quorumHash + 96B BLS sig). KATs computed out-of-band
with CPython so the pins are non-circular with the C++ ::Serialize path; parse
cases prove parse_assetlock_payload/parse_assetunlock_payload are the exact
inverse and reject trailing garbage. Test-only, single-coin (src/impl/dash).
@frstrtr

frstrtr commented Jun 18, 2026

Copy link
Copy Markdown
Owner Author

Closing per operator: DIP-0027 asset-lock WIRE conformance is SHELVED (out of S6 scope, operator decision 2026-06-18). Branch + commits preserved (no delete) — reopen if it comes back into scope.

@frstrtr frstrtr closed this Jun 18, 2026
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