Skip to content

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

Open

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).

Activity

  1. added
    C-aztec.nrComponent: Aztec smart contract framework
    C-pxeComponent: PXE (Private eXecution Envrionment)
    S-needs-discussionStatus: Still needs more discussion before work can start.
    on Mar 11, 2025
  2. iAmMichaelConnor commented on Mar 11, 2025

    @iAmMichaelConnor
    Contributor

    Sounds like a good use case.
    Do we just want to give notes to wallets, or should we actually want to gobble up all simulation data, format it up nicely, and return it to wallets (as long as a user agrees to leaking this info to a wallet)?
    Things like notes, nullifiers (if used for state in future), newly-deployed contracts, event logs, etc etc could all be useful to a proactive wallet.

  3. nventuro commented on Mar 11, 2025

    @nventuro
    ContributorAuthor

    as long as a user agrees to leaking this info to a wallet

    The user chose to run the wallet, and the wallet can do whatever it wants. It could choose to use a fork of PXE etc. It is not PXE's job to ask the user if they trust the wallet, nor can it do this.

    Things like notes, nullifiers (if used for state in future), newly-deployed contracts, event logs, etc etc could all be useful to a proactive wallet.

    Possibly, yes. I brought up notes because this was their immediate need, so it made sense to start there. What seems unfortunate is that such a feature requires support from the contract, so it's not something we can add after the fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions