-
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
C bindings for verkle ipa #227
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Nischal Sharma <[email protected]>
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.
Didnt go through constantine repo files, initial review.
Will need to update the JAVA functions according to the current implementation as in ipa-multipoint module
} | ||
|
||
// Declare native methods | ||
public static native int ipa_commit(byte[] r, int r_len, byte[] inputs, int inputs_len); |
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.
You might need to change the params of these functions according to current implementation. For example like this -
Line 52 in d550463
public static native byte[] commit(byte[] values); |
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.
yes for verkle we need all the methods listed in LibIpaMulitpoint
you can ignore verifyPreStateRoot for the moment
// Declare native methods | ||
public static native int ipa_commit(byte[] r, int r_len, byte[] inputs, int inputs_len); | ||
public static native int ipa_prove(byte[] r, int r_len, byte[] inputs, int inputs_len); | ||
public static native int ipa_verify(byte[] r, int r_len, byte[] inputs, int inputs_len); |
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.
Same for all other functions, check with current implementation of what args it is taking and what should be the return type.
public void testCommit() { | ||
byte[] inputs = new byte[128]; | ||
|
||
byte[] result = LibConstantineEIP196.add(inputs); |
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.
Tests shall be updated
} | ||
|
||
// Verkle functions | ||
int ipa_commit_aff(const ctt_eth_verkle_ipa_polynomial_eval_crs *crs, banderwagon_ec_aff res, const ctt_eth_verkle_ipa_polynomial_eval_poly *poly) { |
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.
Update JAVA bindings functions according to these
Also sign DCO for all commits |
you have a list of tests in this package that you can use to verify your implementation https://github.com/hyperledger/besu-native/tree/d5504630332af07a22d519436dcfcbda2de3b134/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint . |
No description provided.