-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add *Proof
functions to verkleFFI
#56
Conversation
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 isn't ready to merge yet as I want to clean up the outer typescript bindings so it's not just a pass through but this is my first attempt at exposing the proof functions to Javascript. Will test locally and see if I'm about to create and verify proofs or not.
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.
To test this locally:
Checkout this branch.
npm run build // from the repo root
npm link
Next, clone the ethereumjs-monorepo
and check out this commit - 446cd45c78b5c8fbf18bf12a3304693eddb3766a
git clone https://github.com/ethereumjs/ethereumjs-monorepo.git
cd ethereumjs-monorepo
git checkout 446cd45c78b5c8fbf18bf12a3304693eddb3766a
npm i
cd packages/verkle
npm link verkle-cryptography-wasm
npx vitest run test/proof.spec.ts
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.
Looks good to me.
I've taken a look at the tests from the ethjs-monorepo side, and I can't spot what's wrong with it, will need to wait for kev to chime in. However the verkle-crypto-wasm side is quite lean and straightforward, so I'm approving it here.
Approved as the API looks correct to me |
I suspect something is wrong somewhere (though maybe on the ethjs side and not here). Will merge for now so the functions are exposed and will do a followup PR to make the JS API easier to use (i.e. let you pass in the various fields and then the wrapper function will serialize according to what Rust wants). |
Exposes the
createProof
andverifyProof
functions to Javascript