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

Use scoped addresses as recipients #9786

Closed
Tracked by #9119
nventuro opened this issue Nov 6, 2024 · 0 comments · Fixed by #9794
Closed
Tracked by #9119

Use scoped addresses as recipients #9786

nventuro opened this issue Nov 6, 2024 · 0 comments · Fixed by #9794
Labels
C-pxe Component: PXE (Private eXecution Envrionment) team-fairies Nico's team

Comments

@nventuro
Copy link
Contributor

nventuro commented Nov 6, 2024

#9380 describes a note tag as

let tag: Field = poseidon2([app_siloed_secret, recipient_address, index]);

and dismisses recipient_address as "being simply the user's address". However, this turns out to be a naive view of the problem.

We typically want to discover notes at a point in which we don't really know the user's address, e.g. get_notes and view_notes, or when PXE calls into a contract. When reading notes from e.g. a set inside a map the caller does know who they belong to, but a) a note does not necessarily belong to the account it was encrypted for, and b) this information is lost in the call chain and aztec-nr does not see this value (it is typically consumed by Map::at).

The proposed solution is to use all of PXE's scoped accounts as potential recipients, and find notes for any of them. This is a very good set: get_notes will never return notes for any account not in this set, as they are not in scope, and any new note for any of these accounts could presumably be read in the current transaction.

@nventuro nventuro added C-pxe Component: PXE (Private eXecution Envrionment) team-fairies Nico's team labels Nov 6, 2024
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue Nov 15, 2024
Closes: AztecProtocol/aztec-packages#9370 
Closes AztecProtocol/aztec-packages#9575 
Closes AztecProtocol/aztec-packages#9786

Replaces the note processor with the tagging approach, supporting a
sliding window of indexes and partial notes

---------

Co-authored-by: Nicolás Venturo <[email protected]>
Co-authored-by: Santiago Palladino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-pxe Component: PXE (Private eXecution Envrionment) team-fairies Nico's team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant