Skip to content

feat(dash): S3 SPV header-chain + DarkGravityWave v3 (PR-0 foundation) - #107

Merged
frstrtr merged 1 commit into
masterfrom
dash/pr0-foundation-s3
Jun 16, 2026
Merged

feat(dash): S3 SPV header-chain + DarkGravityWave v3 (PR-0 foundation)#107
frstrtr merged 1 commit into
masterfrom
dash/pr0-foundation-s3

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 16, 2026

Copy link
Copy Markdown
Owner

PR-0 foundation, S3 (consensus) slice — dash SPV header-chain + DGW v3 retarget.

Scope: src/impl/dash/ only (+ test wiring). Base: master.

What

  • header_chain.hpp: SPV HeaderChain + dark_gravity_wave v3 (DGW_PAST_BLOCKS=24), implemented as dash own calculate_next_work_required override — no call into the generic bitcoin_family base retarget. Per-coin isolated, not B0-gated.
  • block.hpp: header-only BlockType for the SPV slice. Full block body (m_txs + the dash transaction type) deferred to S5 (replay); SPV consumes headers only.
  • chain_seeds.hpp: dash chain seeds.
  • test/test_dash_header_chain.cpp: 7 hand-derived DGW v3 known-answer vectors (fresh — the LTC test cannot exercise DGW).
  • test/CMakeLists.txt + build.yml: test_dash_header_chain wired into both Linux x86_64 ctest --target lists (no green-by-absence).

Verification (Linux x86_64)

  • Build: green.
  • ctest -R DashDGWv3Kat7/7 passed (registered, not raw-binary-only).
  • Single GPG-signed commit 709e2598 (Good signature).

Gate

Per-coin isolation invariant holds: no src/core / bitcoin_family edits (header_chain includes but never modifies them). dash-steward-only review; operator-gated merge. Draft — holding push for operator approval.

PR-0 foundation, S3 (consensus) slice. Adds dash SPV HeaderChain and the
DGW v3 retarget (DGW_PAST_BLOCKS=24) as dash own calculate_next_work_required
override; no call into the generic bitcoin_family base retarget, so the slice
is per-coin isolated and not B0-gated.

- src/impl/dash/coin/header_chain.hpp: SPV header chain + dark_gravity_wave v3
- src/impl/dash/coin/block.hpp: header-only BlockType (full block body +
  dash transaction type deferred to S5 replay; SPV consumes headers only)
- src/impl/dash/coin/chain_seeds.hpp: dash chain seeds
- test/test_dash_header_chain.cpp: hand-derived DGW v3 known-answer vectors
  (fresh; the LTC test cannot exercise DGW). 7 KATs.
- test/CMakeLists.txt + build.yml: wire test_dash_header_chain into the
  Linux x86_64 ctest --target lists (both jobs) so CI builds it.
@frstrtr
frstrtr marked this pull request as ready for review June 16, 2026 11:47
@frstrtr
frstrtr merged commit edf9cd2 into master Jun 16, 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