Skip to content

Allow wallets to discover notes created in a PXE call #12649

@nventuro

Description

@nventuro

(requirement brought to us by @spalladino after discussing product ideas with developers)

It is currently up to contracts to determine how to deliver notes to their recipients: they may choose to constrain encryption and/or delivery and rely on the recipient processing the logs, or they may e.g. store the payload in a capsule for later retrieval by the app via some top-level unconstrained function. This is however missing one use-case: a wallet choosing to assist in this process, regardless of the decisions made by the contract/app.

An example would be a wallet that wishes to provide improved user experience by proactively finding newly created notes, backing them up in some external storage, etc., regardless of how the contract behaves. This would be difficult currently because even if the wallet was able to somehow get ahold of the note content, it'd be unable to add it to PXE (since as of #12171 only contracts add notes).

A possible solution for this would be to extend the notify_created_note oracle to also receive a 'note payload' that contains the information required to find a note (the same that'd be encrypted in a log), and to make the tx note cache available to the wallet for a given tx created by PXE. The wallet would then be able to store the information from this note cache and feed it into the contract's 'process message' method (which would need to be standardized).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-aztec.nrComponent: Aztec smart contract frameworkC-pxeComponent: PXE (Private eXecution Envrionment)S-needs-discussionStatus: Still needs more discussion before work can start.team-fairiesNico's team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions