-
Notifications
You must be signed in to change notification settings - Fork 266
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
Number of read requests optimisation. #1660
Labels
T-bug
Type: Bug. Something is broken.
Comments
What's the issue with a mismatch between witnesses and read requests? |
4 tasks
LeilaWang
added a commit
that referenced
this issue
Sep 11, 2023
…2164) Close #1660 - An app can apply a filter to the returned notes from the `getNotes` oracle call, to only read and make use of some of them. So the returned notes are not always included in the read_requests. We now construct the `readRequestPartialWitnesses` based on the content of the read_requests array in public inputs at the end of an execution. Refactoring: - Create `ExecutionNoteCache` to share new notes (pending notes) and emitted nullifiers among all executions. # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When we call
oracle.get_notes()
, the simulator adds the membership witness for all return notes.But when aztec lib receives the notes, it applies a filter first, and then adds the hashes of the selected notes to
read_requests
.It will cause the inconsistency between
read_requests
andwitnesses
if the filter returns fewer notes than the notes returned from the simulator.Before we fix it properly, current workaround is to make read requests for all notes returned from the simulator.
In the meantime, the NoteGetterOption.filter will not help reducing the number of read requests per tx.
The text was updated successfully, but these errors were encountered: