-
Notifications
You must be signed in to change notification settings - Fork 235
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
feat: read-requests generated by app circuit, checked in private kernel #619
Conversation
…dency between circuits.js and merkel-tree
* fix: david's get commitments off index bug * fix: rm lingering comment
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 pretty good to me! just some comments, all nits
circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit.test.cpp
Show resolved
Hide resolved
circuits/cpp/src/aztec3/circuits/kernel/private/testing_harness.cpp
Outdated
Show resolved
Hide resolved
circuits/cpp/src/aztec3/circuits/kernel/private/testing_harness.cpp
Outdated
Show resolved
Hide resolved
yarn-project/acir-simulator/src/client/client_execution_context.ts
Outdated
Show resolved
Hide resolved
yarn-project/acir-simulator/src/client/client_execution_context.ts
Outdated
Show resolved
Hide resolved
circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit.test.cpp
Outdated
Show resolved
Hide resolved
circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit.test.cpp
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.
Circuits/cpp changes look correct to me. Just added minor comments.
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.
Description
When the app circuit reads a note, it should output a read request for that note. The RPC client will then generate membership witness (leaf index & sibling path) for that read request and pass that to the private kernel. The private kernel will silo the read request by contract address and perform a membership check to ensure that the read request corresponds to an existing commitment in the private data tree. All read requests must hash to matching private data roots. App circuit no longer needs to get any membership info for notes when it makes a
get
oracle call.Outlined in these discourse threads:
Blocks #512
Closes #513
Followup tasks:
SCARY BUG UNCOVERED: bug: simulator oracle getNotes' leaf index does not match private data tree #788get_2
inset.nr
only pushes oneread_request
even when reading two notes #780Checklist: