Skip to content

Conversation

@PastaPastaPasta
Copy link
Member

@PastaPastaPasta PastaPastaPasta commented Jan 17, 2026

Summary

  • Introduces a new DIP specifying trustless verification of LLMQ public keys using ChainLocks and merkleRootQuorums
  • Enables light clients and the Platform SDK to cryptographically verify Platform quorum public keys without trusting external parties
  • Defines compact proofs (~1 KB typical) using chainlock-based verification

Key Features

  • No header chains needed - verifies against chainlocked block's own cbtx
  • Leverages existing infrastructure - builds on DIP-0004 (merkleRootQuorums), DIP-0006 (LLMQs), DIP-0008 (ChainLocks)
  • New P2P messages - GETQUORUMPROOFCHAIN, QUORUMPROOFCHAIN
  • gRPC API - for Platform SDK integration

Proof Size Analysis

Checkpoint Age Proof Size
< 36 hours ~1 KB
2-4 days ~2-3 KB
30+ days ~16 KB

Test plan

  • Markdown linting passes
  • Review by DIP editors

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive design document for Compact Quorum Proof Chains, covering trustless platform verification mechanisms, data structures, verification algorithms, P2P protocols, gRPC API specifications, and security considerations.

✏️ Tip: You can customize this high-level summary in your review settings.

Introduces a new DIP specifying trustless verification of LLMQ public
keys using ChainLocks and merkleRootQuorums. This enables light clients
and the Platform SDK to cryptographically verify Platform quorum public
keys without trusting external parties.

Key features:
- Compact proofs (~1 KB typical) using chainlock-based verification
- No header chains needed - verifies against chainlocked block's cbtx
- New P2P messages (GETQUORUMPROOFCHAIN, QUORUMPROOFCHAIN)
- gRPC API for Platform SDK integration

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

A new design specification document is introduced that defines compact quorum proof chains for trustless platform verification. It specifies data structures, verification algorithms, P2P messages, gRPC API endpoints, and security considerations for cryptographically verifying quorum public keys using ChainLocks and merkleRootQuorums.

Changes

Cohort / File(s) Change Summary
Design Documentation
dip-pasta-compact-quorum-proofs.md
New comprehensive DIP document (+503 lines) defining compact quorum proof chain design, including ChainlockEntry and QuorumCommitmentProof structures, iterative verification algorithm, P2P message specifications (GETQUORUMPROOFCHAIN, QUORUMPROOFCHAIN), gRPC API for GetQuorumProofChain, proof size analysis, security threat model, checkpoint freshness logic, and cross-component implementation guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Poem

🐰 A document unfolds, so dense and divine,
With proofs and with chains in a trustless design,
Quorum commitments dance through the merkle-root trees,
While ChainLocks keep watch with cryptographic ease!
From verifier to gRPC, the blueprint takes flight,
A rabbit's proud salute to this protocol so bright! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add DIP for Compact Quorum Proof Chains' clearly and concisely describes the main change: introducing a new design document for compact quorum proof chains, which aligns with the primary content of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@dip-pasta-compact-quorum-proofs.md`:
- Around line 115-116: The ChainlockEntry height is declared as a signed type in
the table and protobuf; change the data-structure table entry from int32_t to
uint32_t and update the protobuf field type from int32 to uint32 (e.g., in the
ChainlockEntry message) so heights are consistently unsigned; also find and
update the other occurrences of the same field/type elsewhere in the spec (the
other ChainlockEntry listings) to use uint32 to match the checkpoint height
modeling and avoid negative values or interop issues.
- Line 434: Hyphenate the compound modifier in the proof size analysis sentence:
change "one per ~2 day interval" to "one per ~2-day interval" (locate the
sentence containing "When the checkpoint is 30+ days old, approximately 15
bridging chainlock quorums are needed" in the proof size analysis section and
update the phrase accordingly).

Comment on lines +115 to +116
| height | int32_t | 4 | Height of the chainlocked block |
| blockHash | uint256 | 32 | Hash of the chainlocked block |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Use unsigned heights consistently (int32_t → uint32_t / int32 → uint32).

Heights are non-negative and already modeled as uint32_t elsewhere (e.g., checkpoint height). Using signed types here risks negative values and interop inconsistencies in implementations. Consider making ChainlockEntry height unsigned in both the data-structure table and the protobuf.

🛠️ Proposed spec edits
-| height | int32_t | 4 | Height of the chainlocked block |
+| height | uint32_t | 4 | Height of the chainlocked block |
-message ChainlockEntry {
-    int32 height = 1;
+message ChainlockEntry {
+    uint32 height = 1;

Also applies to: 368-370

🤖 Prompt for AI Agents
In `@dip-pasta-compact-quorum-proofs.md` around lines 115 - 116, The
ChainlockEntry height is declared as a signed type in the table and protobuf;
change the data-structure table entry from int32_t to uint32_t and update the
protobuf field type from int32 to uint32 (e.g., in the ChainlockEntry message)
so heights are consistently unsigned; also find and update the other occurrences
of the same field/type elsewhere in the spec (the other ChainlockEntry listings)
to use uint32 to match the checkpoint height modeling and avoid negative values
or interop issues.


#### Very Old Checkpoint

When the checkpoint is 30+ days old, approximately 15 bridging chainlock quorums are needed (one per ~2 day interval).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Hyphenate compound modifier (“2-day”).

Minor grammar fix for readability in the proof size analysis section.

🧰 Tools
🪛 LanguageTool

[grammar] ~434-~434: Use a hyphen to join words.
Context: ...chainlock quorums are needed (one per ~2 day interval). | Component | Count | Si...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In `@dip-pasta-compact-quorum-proofs.md` at line 434, Hyphenate the compound
modifier in the proof size analysis sentence: change "one per ~2 day interval"
to "one per ~2-day interval" (locate the sentence containing "When the
checkpoint is 30+ days old, approximately 15 bridging chainlock quorums are
needed" in the proof size analysis section and update the phrase accordingly).

3. Find the index of the target commitment's hash
4. Construct the merkle path from that index to the root

## P2P Messages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs new protocol version. Also, Platform doesn't talk to Core via p2p afaik. Or is it for Core level SPV light clients?

Comment on lines +329 to +330
| checkpointQuorumCount | compactSize uint | 1-9 | Number of known chainlock quorums |
| checkpointQuorums | QuorumEntry[] | variable | Known chainlock quorum entries from checkpoint |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are redundant, full nodes already have this info

Suggested change
| checkpointQuorumCount | compactSize uint | 1-9 | Number of known chainlock quorums |
| checkpointQuorums | QuorumEntry[] | variable | Known chainlock quorum entries from checkpoint |

Comment on lines +327 to +328
| checkpointBlockHash | uint256 | 32 | Block hash of the client's checkpoint |
| checkpointHeight | uint32_t | 4 | Height of the checkpoint block |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also redundant - you can deterministically derive block height from block hash (always) and vice versa (but only if it's chainlocked).

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.

2 participants