-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Ethereum Verkle IPA refactoring part 2 #397
Merged
Merged
Conversation
This file contains 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
…'polynomial opening' is pervasively used.
…eralization and evalPoly
…efactoring too complex
…g otherwise, comment them out
This was referenced Jun 26, 2024
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.
This PR is a followup to #392. Unfortunately this PR has become the biggest PR ever and a part 3 is needed.
An important background to this PR is #396.
The previous IPA implementation:
This refactoring may fix 1 and 2, however at the moment only if run in AddressSanitizer. If not for some reason verification fails.
Hence this refactoring improves structure and lay out groundwork for addressing the bugs once and for all but does not improve or degrade compared to past implementation.
The files
constantine/ethereum_verkle_primitives.nim
andconstantine/ethereum_verkle_trees.nim
have been deleted and replaced byconstantine/ethereum_verkle_ipa.nim
The final public API for Eth Verkle IPA still needs to be implemented. It will be similar to the KZG one and will expose only what's necessary and not Constantine's internals.
However before that #396 must be fixed
Highlight of changes:
array[N, Field]
which are 256x32 bytes = 8kB are now on heap.Bytes
/EC_P
/EC_P_Aff
cause confusion if library is used for many purposes, for example BN254, BLS12-381 and Banderwagon curves and should be private to a module or left to the caller.ipa_verify
should be significantly faster than before as a MSM is used instead of ~10 individual scalar mul. The change of basis computation is also linear in domain size instead of being ½ n log₂ n.