-
Notifications
You must be signed in to change notification settings - Fork 36
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
Implement EIP-2537 using gnark-crypto #168
Implement EIP-2537 using gnark-crypto #168
Conversation
635f81f
to
4a62528
Compare
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.
fix a few minor things
gnark/src/main/java/org/hyperledger/besu/nativelib/gnark/LibGnarkEIP2537.java
Show resolved
Hide resolved
gnark/src/test/java/org/hyperledger/besu/nativelib/gnark/BLS12G1AddPrecompiledContractTest.java
Outdated
Show resolved
Hide resolved
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.
If gnark is the library of choice, should we make a plan to remove matterlabs from this repo?
Once we have a besu release with gnark-crypto, we can remove matter labs and the original altbn128 implementation 👍 |
f1023b6
to
8b0825d
Compare
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Still todo:pairing and fpToG1 fpToG2 Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
…exposed Signed-off-by: garyschulte <[email protected]>
clean up blst implementation, remove timings and test loops Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
…matter-labs impl in besu Signed-off-by: garyschulte <[email protected]>
…-labs add gnark eip-196 implementation and tests add tests to matter-labs eip-196 for comparison TODO: gnark eip-197 pairing currently failing Signed-off-by: garyschulte <[email protected]>
use gnark native Unmarshal for all eip196 cleanup for PR review Signed-off-by: garyschulte <[email protected]>
…mparison with gnark Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
…ead of repurposing output array Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
…ts, clean up 2537 implementation Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
… scalar behavior Signed-off-by: garyschulte <[email protected]>
…ark-crypto PR 510 until gnark-crypto is released Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
8b0825d
to
7686ae2
Compare
Implement eip-2537 using gnark-crypto.
related to #165
related to #91
Motivation
The primary motivation is to get besu onto a supported library for the ECC precompiles since the matter-labs eip-1962 repo appears to be unmaintained. There is additional benefit in that gnark-crypto performs better than matter labs on every precompile benchmark.
Testing on both x86_64 and ARM64 indicate this implementation compares very favorably with the matter-labs eip-1962 implementation for all operations.