Skip to content

feat: partial note handling in aztec-nr#12122

Merged
nventuro merged 59 commits intomasterfrom
nv/advanced_note_discovery
Feb 20, 2025
Merged

feat: partial note handling in aztec-nr#12122
nventuro merged 59 commits intomasterfrom
nv/advanced_note_discovery

Conversation

@nventuro
Copy link
Contributor

We're back! Reopening #11641, which was reverted in #11797.

@nventuro nventuro enabled auto-merge (squash) February 20, 2025 17:22
@nventuro nventuro merged commit 4ee6884 into master Feb 20, 2025
10 checks passed
@nventuro nventuro deleted the nv/advanced_note_discovery branch February 20, 2025 17:35
TomAFrench added a commit that referenced this pull request Feb 20, 2025
* master: (300 commits)
  fix(ci): don't have checks go green immediately (#12168)
  fix: ASSERTS that should throw (#12167)
  fix: retry rm operation in cleanup (#12162)
  chore: Fix linter errors (#12164)
  feat: Barretenberg C++ binary overhaul (#11459)
  fix: call install_hooks in bootstrap (#12159)
  chore: @aztec/stdlib pt. 3: aztec-address out of foundation (#12140)
  test: verify proving is resumed after broker crash (#11122)
  chore(ci3): update ci.md with swc notes (#12147)
  fix: don't try to get bench artifacts on external PR (#12157)
  feat: partial note handling in aztec-nr (#12122)
  fix: external fixes pt 2 (#12153)
  chore: fix message path (#12150)
  chore(ci3): refactor ci3.yml, fix external PR flow (#12037)
  fix: Do not try flushing txs in bot setup if not set (#12144)
  chore: Silence warns on invalid bootnode enr (#12135)
  fix: don't early-out on test fails (#12143)
  feat(avm): deduplicating event emitters (#12137)
  chore: @aztec/stdlib pt.2 -> remove @aztec/types (#12133)
  test: kill prover node and see it recover (#11118)
  ...
@nventuro nventuro restored the nv/advanced_note_discovery branch February 21, 2025 13:44
@nventuro nventuro deleted the nv/advanced_note_discovery branch February 21, 2025 13:44
nventuro added a commit that referenced this pull request Mar 12, 2025
Closes #9375.

This re-implements partial notes leveraging the work from #12122. We now
emit a private log with all of the fields plus a 'public log completion
tag', which is the tag of the public log that will contain the public
fields. These two logs are merged when doing discovery, resulting in the
note's packed representation.

All in all this means we need to store much less information in public
storage (just one field), and we don't need to deal with publishing
public logs with encrypted public content. It also removes a lot of PXE
code that dealt with the destructuring of these logs, slicing off the
public fields, etc. Once this is merged, moving decryption to NR should
be trivial.

I iterated a bit on how the note structs are laid out and thing the
current version is a reasonably good starting point. Eventually we'll
autogenerate it via macros, but given we may want to introduce further
changes I chose to not worry about that for now.

We're currently sort of hackily relying on the fact that note type ids
are 7 bits long, and set the 8th bit to indicate the log is that of a
partial note. Fixing this requires properly supporting events during log
discovery (which would become message discovery), but that's out of
scope for this PR.

---------

Co-authored-by: benesjan <janbenes1234@gmail.com>
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.

2 participants