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

Epic: Tagging & Note Discovery #9119

Open
22 of 42 tasks
iAmMichaelConnor opened this issue Oct 9, 2024 · 1 comment
Open
22 of 42 tasks

Epic: Tagging & Note Discovery #9119

iAmMichaelConnor opened this issue Oct 9, 2024 · 1 comment
Labels
Milestone

Comments

@iAmMichaelConnor
Copy link
Contributor

iAmMichaelConnor commented Oct 9, 2024

This refers to the first version of tagging and note discovery, which will:

  • not support multiple devices (sending notes from synced devices at the same time will result in index reuse)
  • leak a bunch of information to the nodes (as they'll be getting sensitive requests which will link notes with one another and their nullifiers)
  • be implemented as part of PXE in TS, though moving it to Noir should just be a matter of translation
  • be supported by TXE

Misc

Preview Give feedback
  1. S-needs-discussion team-fairies

PXE

Preview Give feedback
  1. C-pxe team-fairies
    sklppy88
  2. C-pxe team-fairies
    Thunkar
  3. C-pxe team-fairies
    Thunkar
  4. C-pxe team-fairies
    sklppy88
  5. C-aztec.nr C-pxe team-fairies
    sklppy88
  6. C-pxe team-fairies
    Thunkar
  7. C-pxe team-fairies
    Thunkar
  8. C-pxe team-fairies
    Thunkar
  9. C-pxe team-fairies
    Thunkar
  10. C-aztec.js C-pxe team-fairies
  11. C-aztec.nr C-pxe team-fairies
    sklppy88
  12. C-pxe team-fairies
  13. C-aztec.nr C-pxe team-fairies
  14. C-pxe team-fairies
  15. C-pxe team-fairies
  16. C-pxe team-fairies
  17. C-aztec.nr C-pxe team-fairies
  18. C-pxe team-fairies

Node

Preview Give feedback
  1. C-node team-fairies
    Thunkar
  2. C-node team-fairies
  3. C-node team-fairies
  4. C-node team-fairies
  5. C-node team-fairies
  6. A-security C-node team-fairies
  7. C-node team-fairies
  8. C-node C-pxe team-fairies

Aztec.nr

Preview Give feedback
  1. C-aztec.nr C-pxe team-fairies
    Thunkar
  2. C-aztec.nr team-fairies
    nventuro
  3. C-aztec.nr team-fairies
  4. C-aztec.nr team-fairies
  5. C-aztec.nr team-fairies
  6. C-aztec.nr C-pxe team-fairies
  7. C-aztec.nr C-pxe team-fairies
  8. C-aztec.nr C-pxe
  9. C-aztec.nr team-fairies
@iAmMichaelConnor iAmMichaelConnor added the team-fairies Nico's team label Oct 9, 2024
@iAmMichaelConnor iAmMichaelConnor added this to the TestNet milestone Oct 9, 2024
@github-project-automation github-project-automation bot moved this to Todo in A3 Oct 28, 2024
@nventuro
Copy link
Contributor

Reorg handling was added in #9913 and #10093.

nventuro added a commit that referenced this issue Feb 6, 2025
Closes a bunch of things from
#9119. Leaves us
well positioned to tackle
#10723.

Currently in a draft status as I still need to adjust the
`#[partial_note]` macro to produce the new structures (though these are
simpler than the old one), update callsites, remove all of the code that
dealt with partial note encoding etc. The new flow is complete already
however, and I put together a (still under active development) small
example of all we need to autogenerate to use this in `PartialUintNote`
(which would eventually be autogenerated).

I moved some stuff around to places where I think it fits much better,
but the diff does not look too bad. Most (all?) of the new stuff has
extended explanations of what it does and how it's meant to be used, so
this should be hopefully easy to follow. The basic flow is:

1) a contract private or unconstrained function gets a call to
`note::discovery::discover_new_notes()`
2) this results in a call to the `syncNotes` oracle
3) PXE finds logs based on the tagging scheme, updates indices
4) PXE decrypts logs (soon to be moved to nr)
5) PXE calls the `process_log` unconstrained contract function
6) this autogenerated function calls
`note::discovery::private::do_process_log`, which continues handling the
log
7) eventually we process all logs and `note::discovery::partial:...`
runs, searching for public logs from inside noir (via a new
`getTaggedLog` oracle call

The interface of `PartialUintNote` can be greatly improved, I'm thinking
we may have `UintNote::partial(recipient)` return a struct similar to
this one with some `emit` method for the log. We'd then put this in
storage, retrieve it and call e.g. `complete(amount)`. But these are
ultimately small API details.

---------

Co-authored-by: Jan Beneš <[email protected]>
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue Feb 7, 2025
Closes a bunch of things from
AztecProtocol/aztec-packages#9119. Leaves us
well positioned to tackle
AztecProtocol/aztec-packages#10723.

Currently in a draft status as I still need to adjust the
`#[partial_note]` macro to produce the new structures (though these are
simpler than the old one), update callsites, remove all of the code that
dealt with partial note encoding etc. The new flow is complete already
however, and I put together a (still under active development) small
example of all we need to autogenerate to use this in `PartialUintNote`
(which would eventually be autogenerated).

I moved some stuff around to places where I think it fits much better,
but the diff does not look too bad. Most (all?) of the new stuff has
extended explanations of what it does and how it's meant to be used, so
this should be hopefully easy to follow. The basic flow is:

1) a contract private or unconstrained function gets a call to
`note::discovery::discover_new_notes()`
2) this results in a call to the `syncNotes` oracle
3) PXE finds logs based on the tagging scheme, updates indices
4) PXE decrypts logs (soon to be moved to nr)
5) PXE calls the `process_log` unconstrained contract function
6) this autogenerated function calls
`note::discovery::private::do_process_log`, which continues handling the
log
7) eventually we process all logs and `note::discovery::partial:...`
runs, searching for public logs from inside noir (via a new
`getTaggedLog` oracle call

The interface of `PartialUintNote` can be greatly improved, I'm thinking
we may have `UintNote::partial(recipient)` return a struct similar to
this one with some `emit` method for the log. We'd then put this in
storage, retrieve it and call e.g. `complete(amount)`. But these are
ultimately small API details.

---------

Co-authored-by: Jan Beneš <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants