Skip to content

dgb: BIP152 compact-block relay wire-parity KAT (ShortTxID + getblocktxn diffs) - #481

Merged
frstrtr merged 1 commit into
masterfrom
dgb/compact-blocks-bip152-parity-kat
Jun 25, 2026
Merged

dgb: BIP152 compact-block relay wire-parity KAT (ShortTxID + getblocktxn diffs)#481
frstrtr merged 1 commit into
masterfrom
dgb/compact-blocks-bip152-parity-kat

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Additive, FENCED, diagnostics/relay-only KAT — no consensus surface, src/impl/dgb/ only, no shared/other-coin touch.

Pins the BIP 152 compact-block RELAY wire primitives in coin/compact_blocks.hpp:

  • ShortTxID 6-byte little-endian byte layout + to_uint64() inverse
  • BlockTransactionsRequest (getblocktxn) differential transaction-index encode/decode

Relay-only: the reconstructed full block is validated normally, so this touches no PoW / share-format / payout / version-gate value. A drift here only changes bandwidth/reconstruction, never block validity — but it would desync us from any BIP 152 peer (DigiByte Core / the btc-family relay this header 1:1 mirrors).

NON-CIRCULAR anchors derived from the BIP 152 spec by hand and asserted against the on-the-wire serialiser output:

  • short-ID bytes (LSB-first 6-byte form)
  • absolute indexes {0,2,6,10,11} must serialise diffs {0,1,3,3,0} (delta-minus-one, first absolute)

No call site rewired. 5/5 green locally; registered in CMake + BOTH build.yml --target allowlists (#143 NOT_BUILT trap).

…txn diffs)

Additive, FENCED, diagnostics/relay-only KAT pinning the BIP 152 wire
primitives in coin/compact_blocks.hpp: the 6-byte little-endian ShortTxID
layout / to_uint64 inverse, and the BlockTransactionsRequest (getblocktxn)
differential transaction-index encode/decode. Relay-only -- the reconstructed
full block is validated normally -- so no consensus / PoW / share-format /
payout surface. NON-CIRCULAR: short-ID bytes and the {0,2,6,10,11}->{0,1,3,3,0}
index-diff sequence are derived by hand from the BIP 152 spec and asserted
against the on-the-wire serialiser output. No call site rewired. 5/5 green;
registered in CMake + both build.yml --target allowlists.
@frstrtr
frstrtr merged commit 0e669d1 into master Jun 25, 2026
32 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