Skip to content

dash: merkleRootQuorums (CbTx) computation leaf + bit-exact KATs (S7) - #325

Merged
frstrtr merged 1 commit into
masterfrom
dash/s7-quorum-root-leaf
Jun 22, 2026
Merged

dash: merkleRootQuorums (CbTx) computation leaf + bit-exact KATs (S7)#325
frstrtr merged 1 commit into
masterfrom
dash/s7-quorum-root-leaf

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 22, 2026

Copy link
Copy Markdown
Owner

S7 quorum-root leaf — next staged DASH slice after SimplifiedMNList (#309) and the LLMQ quorum-tail leaf (#321).

What

Lands src/impl/dash/coin/quorum_root.hppcompute_merkle_root_quorums() over the in-memory QuorumManager active set, mirroring dashcore evo/cbtx.cpp::CalcCbTxMerkleRootQuorums. This is the CbTx merkleRootQuorums field a built block template must carry for a Dash node to accept the coinbase special-tx payload — the last absent leaf feeding embedded_gbt main.

Tests — test_dash_quorum_root.cpp, 11/11 green Linux x86_64 (non-hollow)

  • llmq_uses_rotation mainnet type flags (5/6 rotated, rest not);
  • hash_commitment == SHA256d(pack(CFinalCommitment)), frozen wire-byte golden;
  • merkle primitives: empty→ZERO, singleton→itself, pair, odd-triple duplicate-last;
  • set selection: ALL non-rotated entries + rotated latest-per-quorumIndex dedup (older same-index dropped), lexicographically-sorted SHA256d merkle, frozen root golden.

Scope discipline

  • Fenced to src/impl/dash/ only — no shared / bitcoin_family / src/core changes (build.yml + test/CMakeLists.txt are the only non-dash files, each adding just the new target).
  • Mechanism-only; dev-key untouched.
  • End-to-end live-mnlistdiff → on-chain cbTx.merkleRootQuorums cross-check explicitly deferred to Phase L (block fixtures carry the on-chain values for it), same honesty boundary as test(dash): LLMQ quorum-tail verification leaf (S7) #321.
  • dashd RPC fallback preserved.

Conforms vs frstrtr/p2pool-dash discipline. No self-merge — surfacing for integrator verify + operator tap.

head: ceb5378 (GPG-signed)

S7 quorum-root leaf between the LLMQ quorum-tail leaf (#321) and
embedded_gbt main. Lands src/impl/dash/coin/quorum_root.hpp
(compute_merkle_root_quorums over the QuorumManager active set,
mirroring dashcore CalcCbTxMerkleRootQuorums) plus a self-contained
test_dash_quorum_root.cpp pinning:
  - llmq_uses_rotation mainnet type flags (5,6 rotated);
  - hash_commitment == SHA256d(pack(CFinalCommitment)) frozen golden;
  - merkle primitives (empty/singleton/pair/odd-triple);
  - set selection: all non-rotated entries + rotated latest-per-index
    dedup, lexicographically-sorted SHA256d merkle, frozen root golden.
End-to-end live-mnlistdiff cross-check deferred to Phase L. Fenced to
src/impl/dash; wired into test/CMakeLists.txt and build.yml gtest +
sanitizer target lists. 11/11 green Linux x86_64.
@frstrtr
frstrtr merged commit 164331b into master Jun 22, 2026
20 checks passed
frstrtr added a commit that referenced this pull request Jun 23, 2026
…325)

S7 quorum-root leaf between the LLMQ quorum-tail leaf (#321) and
embedded_gbt main. Lands src/impl/dash/coin/quorum_root.hpp
(compute_merkle_root_quorums over the QuorumManager active set,
mirroring dashcore CalcCbTxMerkleRootQuorums) plus a self-contained
test_dash_quorum_root.cpp pinning:
  - llmq_uses_rotation mainnet type flags (5,6 rotated);
  - hash_commitment == SHA256d(pack(CFinalCommitment)) frozen golden;
  - merkle primitives (empty/singleton/pair/odd-triple);
  - set selection: all non-rotated entries + rotated latest-per-index
    dedup, lexicographically-sorted SHA256d merkle, frozen root golden.
End-to-end live-mnlistdiff cross-check deferred to Phase L. Fenced to
src/impl/dash; wired into test/CMakeLists.txt and build.yml gtest +
sanitizer target lists. 11/11 green Linux x86_64.

Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
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