forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(llmq): add trustless quorum proof chain generation and verification #7107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PastaPastaPasta
wants to merge
31
commits into
dashpay:develop
Choose a base branch
from
PastaPastaPasta:platform-sdk-compact-proof
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
87b9c1c
feat(llmq): add trustless quorum proof chain generation and verification
PastaPastaPasta 8f1de20
fix(llmq): address CI failures for quorum proof chain tests
PastaPastaPasta 621780a
fix(llmq): fix quorum proof chain algorithm for long proofs
PastaPastaPasta 4fff568
fix(llmq): optimize quorum proof chain for size and performance
PastaPastaPasta 5040535
fix(llmq): simplify proof chain search to prioritize speed
PastaPastaPasta c060fa4
Optimize quorum proof chain generation
PastaPastaPasta cac64c4
Optimize quorum proof generation performance
PastaPastaPasta 0d616f7
perf(llmq): optimize quorum proof chain generation
PastaPastaPasta 5234c12
refactor(llmq): use QuorumMerkleProof::Verify instead of local static…
PastaPastaPasta d95c717
perf(llmq): add quorum proof data caching for faster proof chain gene…
PastaPastaPasta cfe3b0b
refactor(llmq): break circular dependencies in quorumproofs
PastaPastaPasta 372904e
fix(llmq): address PR #7107 review feedback
PastaPastaPasta 0c0df70
test: fix build_checkpoint() to use LLMQ type 100 and update test setup
PastaPastaPasta 7b5802f
test: add tamper_proof_hex() helper for proof chain tests
PastaPastaPasta 2d7e3f4
fix(llmq): remove incorrect ActiveChain check in chainlock indexing
PastaPastaPasta 41b9966
test: add test_getquorumproofchain_single_step() and fix test setup
PastaPastaPasta 259ab20
test: add skeleton test_verifyquorumproofchain_success() (blocked by …
PastaPastaPasta 053882c
fix(llmq): fix BuildProofChain signer detection and VerifyProofChain …
PastaPastaPasta 7d2b7aa
test: add test_verifyquorumproofchain_tampered()
PastaPastaPasta 906990b
test: add test_verifyquorumproofchain_wrong_target()
PastaPastaPasta 2024c20
test: add test_verifyquorumproofchain_wrong_checkpoint()
PastaPastaPasta e16d9ee
test: add test_getquorumproofchain_errors()
PastaPastaPasta 2c78742
test: add test_getquorumproofchain_multi_step()
PastaPastaPasta 74b7c04
fix: compute proof data for chainlock block in multi-step proofs
PastaPastaPasta f0c2c2d
refactor: use only non-legacy BLS scheme for chainlock verification
PastaPastaPasta 7a48736
refactor: simplify quorum proof chain implementation
PastaPastaPasta ce1394e
chore: remove activity.md from version control
PastaPastaPasta db9eec7
refactor: simplify quorum proof APIs and fix build errors
PastaPastaPasta 53059e9
fix: resolve post-rebase build errors
PastaPastaPasta eb23e95
fix: add header-chainlock binding check and protect CChain access wit…
PastaPastaPasta 17297dc
refactor: move DB key strings out of headers and add cs_main lock ann…
PastaPastaPasta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,3 +180,4 @@ compile_commands.json | |
| # Linux perf profiling artifacts | ||
| perf.data | ||
| perf.data.old | ||
| activity.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Blocking: RemoveChainlockIndex unconditionally erases entries still referenced by other blocks
IndexChainlockkeys the index purely onchainlockedHeight(src/llmq/quorumproofs.cpp:217). Miners intentionally copy the same best ChainLock forward across consecutive coinbase transactions, incrementingbestCLHeightDiffuntil a newer ChainLock appears.ProcessSpecialTxsInBlocktherefore overwrites the same DB slot from multiple consecutive blocks, andUndoSpecialTxsInBlocklater callsRemoveChainlockIndex(chainlockedHeight)unconditionally on disconnect. After disconnecting block N+1, the previous block N (still in the active chain) may still embed a ChainLock for the same height, but the index entry is gone —getchainlockbyheightandBuildProofChainstart reporting missing coverage until a newer ChainLock or a re-migration restores it.Fix: either reference-count by
cbtxBlockHash, only erase if the disconnected block'scbtxBlockHashmatches the stored entry, or rebuild on next connect.source: ['claude', 'codex']