Skip to content

test(dash): LLMQ quorum-tail verification leaf (S7) - #321

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

test(dash): LLMQ quorum-tail verification leaf (S7)#321
frstrtr merged 1 commit into
masterfrom
dash/s7-quorum-llmq-leaf

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 22, 2026

Copy link
Copy Markdown
Owner

S7 quorum/LLMQ verification leaf — next staged slice after SimplifiedMNList (#309)

Lands the quorum/LLMQ verification leaf from dash-spv-embedded onto master: the mnlistdiff quorum tail parser + in-memory active-set tracker. This is the link between the SimplifiedMNList leaf (#309) and the embedded_gbt main on the S7 chain, and the consensus prerequisite for the payout-replay-protection / ChainLock path this lane owns.

Sources (header-only, fenced to src/impl/dash/)

  • coin/vendor/llmq_commitment.hppCFinalCommitment (+ DYNBITSET formatter, type-6 qfcommit payload parser)
  • coin/vendor/quorum_tail.hpp — fail-safe structured tail parser (deletedQuorums + newQuorums + quorumsCLSigs)
  • coin/quorum_manager.hpp — in-memory active-set tracker (apply / find / replace_state)

Tests — test/test_dash_quorum.cpp, 11 KATs, 11/11 green on Linux x86_64

  • byte-exact CFinalCommitment wire (non-indexed v1) against a hand-built vector
  • INDEXED version gate (v2/v4) emits quorumIndex(int16); non-indexed omits it (Δlen == 2)
  • DYNBITSET LSB-first 9-bit packing and out-of-range trailing-pad-bit rejection (dashcore malleation guard)
  • parse_quorum_tail: all-sections decode, empty=clean-success, trailing-garbage rejection
  • parse_qfcommit_payload: round-trip + strict-tail policy
  • QuorumManager: insert/replace/delete, find / find_mutable / active_by_type / replace_state / CL-sig caching

Notes

Surfaced for operator merge-tap after CI rollup — not self-merging (consensus-bearing lane).

Bring the quorum/LLMQ verification leaf from dash-spv-embedded onto
master (the next staged slice after SimplifiedMNList #309): the
mnlistdiff quorum-tail parser + in-memory active-set tracker.

  - vendor/llmq_commitment.hpp  CFinalCommitment + DYNBITSET + qfcommit
  - vendor/quorum_tail.hpp       fail-safe structured tail parser
  - coin/quorum_manager.hpp      in-memory active-set tracker

test_dash_quorum.cpp adds 11 bit-exact wire KATs: byte-exact
CFinalCommitment (indexed-version gate, LSB-first DYNBITSET, malleated
pad-bit rejection), parse_quorum_tail all-sections / empty / trailing-
garbage, parse_qfcommit strict-tail, and QuorumManager apply/find/
delete/replace_state semantics. 11/11 green on Linux x86_64.

Adapted the vendored 1-arg SERIALIZE_METHODS to the master macro name
C2POOL_SERIALIZE_METHODS (2-arg SERIALIZE_METHODS is btclibs-only).
Fenced to src/impl/dash/ + test harness; header-only, no shared touch.
BLS verification and live-node active-set cross-check remain Phase L.
@frstrtr
frstrtr merged commit 6fa8569 into master Jun 22, 2026
20 checks passed
frstrtr added a commit that referenced this pull request Jun 22, 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>
frstrtr added a commit that referenced this pull request Jun 23, 2026
test(dash): LLMQ quorum-tail verification leaf (S7)
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