You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With #9263 complete, we'll be able to produce secrets that can be used to compute tags which mark logs meant for us. Tagged logs will be fetched with the method added in #9268.
Tagging computation will be initially done in aztec.js, but is expected to eventually move to aztec.nr. We should design the system with an eye in this future transition in order to make it as painless as possible. So even though all of this will run in PXE, it's good to think of it as if it were running in an untrusted contract.
What should contracts query for?
As seen in #9378, the shared secret computation involves knowledge of the sender's address. Contracts cannot be given the list of addresses in the address book, as that would leak this sensitive information. They similarly cannot be given the list of secrets S, since they'd be able to use that to compute tags for a different contract, and learn information about the user that way (e.g. how many logs exist for some specific contract).
Instead, contracts should receive from PXE an app-siloed secret s_app = hash(S, app_address) = poseidon2([S.x, S.y, app_address]) (i.e. the same one used in #9378). Apps will not be able to use s_app for anything other than computing their own tags.
Indices
While the app-siloed secrets are sufficient to perform note discovery, we ideally want to also know how far we last synced to avoid doing repeated work. This means keeping track of the last seen tag index per app-siloed secret.
PXE should store this value and return it alongside the siloed secrets. Conceptually it'll store (S, app_address, index) and return an array with (s_app, index). How this is achieved internally is an implementation detail, though we do need to make sure to return index 0 if no entry exists, since there's no instance in which an app is 'added' to PXE: any app could perform app_siloed secret requests at any moment.
The text was updated successfully, but these errors were encountered:
Closes: AztecProtocol/aztec-packages#9365
- Allows storing the current known index for a given tagging secret.
- Returns the current index when calling `get_app_tagging_secret` so
notes can be sent with the correct one.
- Adds an oracle that returns the app tagging secrets for the whole
addressbook, including their indexes.
---------
Co-authored-by: esau <152162806+sklppy88@users.noreply.github.com>
With #9263 complete, we'll be able to produce secrets that can be used to compute tags which mark logs meant for us. Tagged logs will be fetched with the method added in #9268.
Tagging computation will be initially done in aztec.js, but is expected to eventually move to aztec.nr. We should design the system with an eye in this future transition in order to make it as painless as possible. So even though all of this will run in PXE, it's good to think of it as if it were running in an untrusted contract.
What should contracts query for?
As seen in #9378, the shared secret computation involves knowledge of the sender's address. Contracts cannot be given the list of addresses in the address book, as that would leak this sensitive information. They similarly cannot be given the list of secrets
S
, since they'd be able to use that to compute tags for a different contract, and learn information about the user that way (e.g. how many logs exist for some specific contract).Instead, contracts should receive from PXE an app-siloed secret
s_app = hash(S, app_address) = poseidon2([S.x, S.y, app_address])
(i.e. the same one used in #9378). Apps will not be able to uses_app
for anything other than computing their own tags.Indices
While the app-siloed secrets are sufficient to perform note discovery, we ideally want to also know how far we last synced to avoid doing repeated work. This means keeping track of the last seen tag index per app-siloed secret.
PXE should store this value and return it alongside the siloed secrets. Conceptually it'll store
(S, app_address, index)
and return an array with(s_app, index)
. How this is achieved internally is an implementation detail, though we do need to make sure to return index0
if no entry exists, since there's no instance in which an app is 'added' to PXE: any app could perform app_siloed secret requests at any moment.The text was updated successfully, but these errors were encountered: