Skip to content
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

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Add *Proof functions to verkleFFI #56

merged 3 commits into from
Sep 9, 2024

Conversation

acolytec3
Copy link
Contributor

Exposes the createProof and verifyProof functions to Javascript

Copy link
Contributor Author

@acolytec3 acolytec3 left a 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.

Copy link
Contributor Author

@acolytec3 acolytec3 left a 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

Copy link
Contributor

@gabrocheleau gabrocheleau left a 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.

@kevaundray
Copy link
Collaborator

Approved as the API looks correct to me

@acolytec3
Copy link
Contributor Author

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).

@acolytec3 acolytec3 merged commit cda6f3a into master Sep 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants