-
Notifications
You must be signed in to change notification settings - Fork 234
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
Inject (nullifier, commitment) tuple. #869
Conversation
14cd454
to
3b6f240
Compare
3b6f240
to
070f5ed
Compare
9dced87
to
3a96fb7
Compare
yarn-project/noir-contracts/src/libs/noir-aztec/src/state_vars/immutable_singleton.nr
Outdated
Show resolved
Hide resolved
yarn-project/noir-contracts/src/libs/custom-notes/src/transparent_note.nr
Outdated
Show resolved
Hide resolved
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! Just responded to your comments so once you update / remove those TODOs it's good to merge
yarn-project/noir-contracts/src/libs/custom-notes/src/transparent_note.nr
Outdated
Show resolved
Hide resolved
yarn-project/noir-contracts/src/libs/noir-aztec/src/state_vars/immutable_singleton.nr
Outdated
Show resolved
Hide resolved
Co-authored-by: David Banks <dbanks12@users.noreply.github.com>
bab2d3f
to
70318ad
Compare
|
||
// We also need the note commitment corresponding to the "nullifier" | ||
let compute_note_hash = note_interface.compute_note_hash; | ||
let note_hash = compute_note_hash(note); |
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.
By this point, we'll have already called compute_note_hash
when we called get
*, so it would be inefficient to call it again here.
@LeilaWang perhaps the Note
needs to contain a member note_hash: Option<Field>
, so that it can be retrieved by functions such as this one?
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.
Maybe also nullifier: Option<Field>
too?
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.
Yeah I was aware that we're recomputing the note commitment. Didn't find a way to retrieve it while computing the nullifier. One way could be to change the compute_nullifier
interface to return the pair (nullifier
, commitment
).
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.
I've added a TODO which we'll take care of as a separate PR.
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.
LGTM. My comments are very minor.
yarn-project/circuits.js/src/structs/private_circuit_public_inputs.ts
Outdated
Show resolved
Hide resolved
We need this one in master and comments have been addressed AFAIK
Description
resolves #863
Checklist: