hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.51k stars 835 forks source link

Integration of Gnark library into besu-native #5353

Closed non-fungible-nelson closed 1 year ago

non-fungible-nelson commented 1 year ago

As a user, I would like access to Gnark within Besu-native to provide support for new cryptographic functions (Poseidon, MiMC, more), and gain better performance for existing crypto functions (bn256, others).

This will require JNI bindings to be built for the Go code-base.

non-fungible-nelson commented 1 year ago

Need JNI bindings on case by case basis.

matkt commented 1 year ago

Gnark is already in Besu-Native and we use it for MIMC.it is just necessary to add a method in the JNI interface to use a new method

non-fungible-nelson commented 1 year ago

will we need to add each individual method via JNI?

matkt commented 1 year ago

Yes adding something like that https://github.com/hyperledger/besu-native/pull/106/files#diff-9a8b92f5e0cc425e89d99a700529815fc9ce3a1438fa11b2217e1ad33fe466beR40 And https://github.com/hyperledger/besu-native/pull/106/files#diff-cafc75b52abcdd1ae30de9ce39ea15bbd9467f51cfed1c1e8e85c59010ad970aR19 I also named it MIMC Library it should be renamed to Gnark Library