fix: patch the query collision bug in multipoint opening#400
Merged
guorong009 merged 4 commits intomainfrom Jul 7, 2025
Merged
fix: patch the query collision bug in multipoint opening#400guorong009 merged 4 commits intomainfrom
guorong009 merged 4 commits intomainfrom
Conversation
Author
|
@mratsim can you also review the PR? Thanks in advance! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #400 +/- ##
==========================================
+ Coverage 82.82% 82.89% +0.06%
==========================================
Files 76 76
Lines 16988 17110 +122
==========================================
+ Hits 14071 14183 +112
- Misses 2917 2927 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
@CPerezz @davidnevadoc |
ed255
approved these changes
Jul 7, 2025
ed255
left a comment
There was a problem hiding this comment.
LGTM! Great job porting these patches to our fork :)
|
Great job @guorong009 💪 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The multipoint opening argument is used to efficiently evaluate multiple polynomial commitments at
multiple points. In the implementation, a map is used to track queries: (Commitment, QueryPoint) =>
Value. Here, the key is a tuple of the polynomial commitment and the query point, and the value is the
evaluation of the polynomial at that point. A “query collision” occurs when two independent queries
have the same key—meaning they refer to the same commitment and the same evaluation point. When
this happens, one evaluation silently overwrites the other in the map, causing one to be ignored during
verification. This is a critical flaw: a malicious prover can exploit this to forge a proof, since one of the
evaluations will not be checked in the polynomial commitment opening.
Changes
construct_intermediate_setsfunc in bothshplonkandgwcschemesNOTE
The patch was co-authored by Jack (str4d) Grigg and Sean Bowe, and reviewed by Daira-Emma and Edu. The bug was reported by Suneal from zkSecurity. The patch is ported from here