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

feat: process tagged logs #9623

Merged
merged 22 commits into from
Nov 7, 2024
Merged

feat: process tagged logs #9623

merged 22 commits into from
Nov 7, 2024

Conversation

Thunkar
Copy link
Contributor

@Thunkar Thunkar commented Oct 31, 2024

Closes: #9371 #9370 #9372

Blindly moves the logic in note_processor.ts to the simulator_oracle, so retrieved logs can be processed and injected in PXE's db. This approach has several problems:

  • We have to trigger a process from an oracle, but the thing itself requires a simulator to call compute_note_hash_and_nullifier. This either implies moving lot of stuff into client_execution_context (namely, the key store), or a chicken and egg problem with simulator_oracle (we need a simulator in the oracle that is provided to a simulator). Right now a very ugly solution is adopted, instantiating a new simulator in place.
  • Are deferred notes even necessary now? No, will be removed in Remove note processor in favor of new approach #9575
  • Is there an alternative to passing the the dataStartIndexForTx all the way from the node to compute the note index? (this is not too bad IMO)
  • Can the logic in the processor be simplified?
  • Is there a better place to put this code that still allows us to initiate the process from aztec.nr?

@Thunkar Thunkar requested a review from sklppy88 October 31, 2024 14:06
@Thunkar Thunkar self-assigned this Oct 31, 2024
@Thunkar Thunkar requested a review from nventuro November 5, 2024 06:57
@Thunkar Thunkar marked this pull request as ready for review November 5, 2024 06:57
Copy link
Contributor

@nventuro nventuro left a comment

Choose a reason for hiding this comment

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

Lovely 🙌 🙌

yarn-project/pxe/src/simulator_oracle/index.ts Outdated Show resolved Hide resolved
yarn-project/pxe/src/simulator_oracle/index.ts Outdated Show resolved Hide resolved
Thunkar and others added 3 commits November 7, 2024 06:44
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
@Thunkar Thunkar enabled auto-merge (squash) November 7, 2024 06:10
@Thunkar Thunkar merged commit 2fcf94e into master Nov 7, 2024
69 checks passed
@Thunkar Thunkar deleted the gj/process_tagged_logs branch November 7, 2024 06:47
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 decrypt oracle call
2 participants