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
{{ message }}
Repository navigation
Re-do partial note delivery using pending work db #10724
Once contracts have access to a PXE DB(#10730), we can migrate to the new (final) partial notes flow. The concept is as follows:
Logs are encrypted and emitted from private as soon as partial notes are created. This prevents the tagging index from being left hanging in case the note is not completed soon, since the log will be delivered immediately. This log will of course not be complete.
Partial notes will have a different note type id that will mark them as such. Perhaps we could use 127 bits for the id, and leave the msb for a complete/partial boolean flag.
Whenever we find a partial note after decrypting a log, we store what we've found in PXE as 'pending work'.
As part of the note syncing process, we read the pending work database and try to find any logs that correspond to the public component by searching for their tag. This tag might simply be the hash of the partial note content.
If the public log is found, we merge it with the private part and compute the full note content. We'd then require the tx note hashes in order to do nonce discovery (Consider bundling tx effects in getLogsByTag #9789)
With this PR note type id is now only 7 bits long but it is serialized to 2 bytes in the to_be_bytes function. This means there is a space for the 1 bit partial note flag.
Look for TODO(#10724) to spot where in the codebase this is.
#10867 introduced an end to end test for the pxe database that we should remove once we implement this, as the note discovery tests will indirectly be testing the db already.
Activity
benesjan commentedon Dec 19, 2024
With this PR note type id is now only 7 bits long but it is serialized to 2 bytes in theto_be_bytesfunction. This means there is a space for the 1 bit partial note flag.Look forTODO(#10724)to spot where in the codebase this is.nventuro commentedon Dec 23, 2024
Note that
to_be_byteswill go away once we move to field-based logs.benesjan commentedon Dec 23, 2024
As discussed in DMs will leave the encoding as it is now so the comment above no longer applies.
nventuro commentedon Jan 8, 2025
#10867 introduced an end to end test for the pxe database that we should remove once we implement this, as the note discovery tests will indirectly be testing the db already.
feat: process note logs in aztec-nr (#10651)
feat: improve PXE contract DB capabilities (#11303)
feat: improve PXE contract DB capabilities (#11303)
nventuro commentedon Feb 6, 2025
Closed via #11641