-
Notifications
You must be signed in to change notification settings - Fork 585
docs: add note delivery docs details #19754
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
base: next
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive documentation explaining note delivery mechanisms, note discovery, and tagging in Aztec smart contracts. The documentation helps developers understand how to deliver notes to recipients and the tradeoffs between different delivery modes.
Changes:
- Added detailed documentation for note delivery modes (OFFCHAIN, ONCHAIN_UNCONSTRAINED, ONCHAIN_CONSTRAINED)
- Expanded note discovery documentation with solutions for handling unknown senders
- Added clarification about the "sender" in note tagging being the account contract, not the transaction sender
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| docs/aztec-nr/framework-description/note_delivery.md | New comprehensive guide explaining note delivery modes, discovery mechanisms, and code examples |
| docs/foundational-topics/advanced/storage/note_discovery.md | Enhanced with detailed explanations of sender roles, limitations, and handshaking solutions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docs/docs-developers/docs/aztec-nr/framework-description/note_delivery.md
Show resolved
Hide resolved
docs/docs-developers/docs/aztec-nr/framework-description/note_delivery.md
Show resolved
Hide resolved
docs/docs-developers/docs/aztec-nr/framework-description/note_delivery.md
Show resolved
Hide resolved
docs/docs-developers/docs/aztec-nr/framework-description/note_delivery.md
Outdated
Show resolved
Hide resolved
| // Admin is the owner of the note and is motivated to receive it | ||
| // Use unconstrained delivery since we don't know if deployer is incentivized |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states 'Use unconstrained delivery' but the code uses ONCHAIN_CONSTRAINED. Either the comment should be updated to explain why constrained delivery is used, or the code should be changed to match the comment.
| // Admin is the owner of the note and is motivated to receive it | |
| // Use unconstrained delivery since we don't know if deployer is incentivized | |
| // Admin is the owner of the note and is motivated to receive it, | |
| // but the deployer might not be. Use constrained delivery to ensure the | |
| // admin's note is included onchain even if the deployer is uncooperative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree with copilot
docs/docs-developers/docs/aztec-nr/framework-description/note_delivery.md
Show resolved
Hide resolved
| // Admin is the owner of the note and is motivated to receive it | ||
| // Use unconstrained delivery since we don't know if deployer is incentivized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree with copilot
docs/docs-developers/docs/aztec-nr/framework-description/note_delivery.md
Outdated
Show resolved
Hide resolved
|
|
||
| #### The sender in note tagging | ||
|
|
||
| The "sender" in note tagging is **not necessarily the transaction sender**. It's the **sender for tags**, which account contracts set by calling `set_sender_for_tags(account_address)` before making calls to other contracts. This is typically the account contract address itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious if you are aware of any cases where the tag sender is not the users account contract?
docs/docs-developers/docs/foundational-topics/advanced/storage/note_discovery.md
Outdated
Show resolved
Hide resolved
|
|
||
| **Example use cases:** | ||
| - Change notes when transferring tokens (you're sending to yourself) | ||
| - Payments where the recipient won't provide goods/services without the note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you elaborate on why this is a good example? It's not clear to me why offchain is the right use for this case
|
|
||
| ### `MessageDelivery.OFFCHAIN` | ||
|
|
||
| **Fully offchain delivery with no guarantees.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdyt about saying more about what this method actually does? namely, the message is encrypted, without constraints and emitted via an oracle call, but i think thats it? Is it then accessible to the PXE and can be exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that right?? Is it emitted by an oracle call? @nventuro can you explain this please - im a bit confused
docs/docs-developers/docs/aztec-nr/framework-description/note_delivery.md
Outdated
Show resolved
Hide resolved
…delivery.md Co-authored-by: josh crites <[email protected]>
…/note_discovery.md Co-authored-by: josh crites <[email protected]>
Add docs explaining in more detail: