-
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
chore!: Modify functionality of commitRoot
to use groupToField
#151
Conversation
Signed-off-by: Kevaundray Wedderburn <[email protected]>
…se groupToField instead of commitment.to_bytes Signed-off-by: Kevaundray Wedderburn <[email protected]>
commitRoot
to use groupToFieldcommitRoot
to use groupToField
/// TODO: We can remove this method as its the same as calling commit and then groupToField | ||
/// TODO: This has not been done because it is a breaking API change, that changes the bindings. | ||
/// TODO: Once downstream besu-verkle switches to using commit and then groupToField, making this | ||
/// TODO: method unused, then we can remove it. | ||
#[no_mangle] | ||
pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaMultipoint_commitRoot( |
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.
This means that besu-verkle does not need to be modified to make it match the other implementations.
}; | ||
|
||
let updated_commitment = ffi_interface::update_commitment_sparse( | ||
&CONFIG, |
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.
As of the recent rust-verkle -- most methods just take a CONFIG
to make the downstream callers job easier and the API simpler
Tests should be failing since hard coded test vectors for commitRoot were not updated |
Closing as we don't want to modify commitRoot since mapToScalarField is not invertible |
Rationale
For the Java library, this will eventually reduce the API surface needed.
commitRoot
will essentially become a call tocommitToScalar
+groupToField
.This issue expands on the rationale: crate-crypto/rust-verkle#86
There are some geth and go-verkle PRs which would be good to merge before merging this (Leaving this as a Draft while those are open)