hyperledger / besu-native

Apache License 2.0
12 stars 35 forks source link

Linking error potential fix #131

Closed neotheprogramist closed 8 months ago

neotheprogramist commented 8 months ago

Description

This pull request addresses a critical linking error encountered in the Hyperledger Besu native library. The issue came to light following a modification in the method invocation within the PedersenHasher class, where LibIpaMultipoint.commit was changed to LibIpaMultipoint.commit_root. As a result of this change, a java.lang.UnsatisfiedLinkError is triggered when calling the commit_root method, with the error message: 'byte[] org.hyperledger.besu.nativelib.ipamultipoint.LibIpaMultipoint.commit_root(byte[])'.

Proposed Fix

The fix proposed in this pull request involves renaming the commit_root method from snake_case to camelCase. This renaming aims to:

Context

While other methods in the LibIpaMultipoint class, such as commit and pedersenHash, continue to operate as expected, it is believed that the naming convention employed for commit_root may be contributing to the linking error.

matkt commented 8 months ago

seems to work . could we add a small description in the PR ?

thomas-quadratic commented 8 months ago

Shouldn't we have a test in ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/ for this method as well ?

thomas-quadratic commented 8 months ago

Good with me. Thanks!

thomas-quadratic commented 8 months ago

Good for me as well, thanks @neotheprogramist