hyperledger / besu-native

Apache License 2.0
13 stars 36 forks source link

Implement EIP-2537 using gnark-crypto #168

Closed garyschulte closed 3 months ago

garyschulte commented 4 months ago

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.

Screenshot 2024-06-11 at 1 59 16 PM Screenshot 2024-06-06 at 4 55 57 PM Screenshot 2024-06-06 at 4 56 07 PM Screenshot 2024-06-11 at 1 58 20 PM Screenshot 2024-06-06 at 4 56 21 PM Screenshot 2024-06-06 at 4 56 30 PM Screenshot 2024-06-06 at 4 56 41 PM Screenshot 2024-06-06 at 4 56 49 PM Screenshot 2024-06-06 at 4 56 57 PM Screenshot 2024-06-07 at 8 04 37 AM Screenshot 2024-06-07 at 8 04 30 AM Screenshot 2024-06-07 at 8 04 46 AM
garyschulte commented 3 months ago

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 👍