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 nullifier to snarkyjs and mina-signer #882

Merged
merged 63 commits into from
Jun 13, 2023
Merged

add nullifier to snarkyjs and mina-signer #882

merged 63 commits into from
Jun 13, 2023

Conversation

Trivo25
Copy link
Member

@Trivo25 Trivo25 commented May 1, 2023

implements the Nullifier as a new primitive in both mina-signer and SnarkyJS (in-snark variant) and demonstrates its usage in src/examples/nullifier.ts

see https://eprint.iacr.org/2022/1255.pdf

bindings o1-labs/o1js-bindings#10

closes #816

RFC: #756

@Trivo25 Trivo25 changed the base branch from feature/hashToCurve to feature/hashToCurve-bindings May 3, 2023 12:29
Base automatically changed from feature/hashToCurve-bindings to main May 4, 2023 10:10
src/provable/curve-bigint.ts Outdated Show resolved Hide resolved
Copy link
Member

@mitschabaude mitschabaude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, I have a few comment left. The nullifier verification checks out for me now!

src/lib/nullifier.ts Outdated Show resolved Hide resolved
src/lib/nullifier.ts Outdated Show resolved Hide resolved
src/lib/nullifier.unit-test.ts Show resolved Hide resolved
src/lib/nullifier.ts Show resolved Hide resolved
Copy link
Member

@mitschabaude mitschabaude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect!

Copy link
Contributor

@MartinMinkov MartinMinkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! Do you mind making some changes to the doc comments in nullifier.ts?

Could you include a short summary of the paper in the class declaration comment? I think even something like this would be incredibly helpful (which is taken directly from the abstract):

Nullifiers are used as a public commitment to a specific anonymous account, to forbid actions like double spending, or allow a consistent identity between anonymous actions.

Could you also include an @example section in each method? I think it'd be really helpful to see these in your intellisense as you're exploring the API to give some hints to a developer. This will also really help our API reference.

@Trivo25 Trivo25 merged commit 3f0a4a9 into main Jun 13, 2023
9 checks passed
@Trivo25 Trivo25 deleted the feature/nullifier branch June 13, 2023 22:34
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.

Add nullifier to mina-signer
4 participants