Function enqueue_note_for_validation
pub unconstrained fn enqueue_note_for_validation(
contract_address: AztecAddress,
owner: AztecAddress,
storage_slot: Field,
randomness: Field,
note_nonce: Field,
packed_note: BoundedVec<Field, 8>,
note_hash: Field,
nullifier: Field,
tx_hash: Field,
recipient: AztecAddress,
)
Enqueues a note for validation and storage by PXE.
Once validated, the note becomes retrievable via the
get_notesoracle. The note will be scoped tocontract_address, meaning other contracts will not be able to access it unless authorized.In order for the note validation and insertion to occur,
validate_and_store_enqueued_notes_and_eventsmust be later called. For optimal performance, accumulate as many note validation requests as possible and then validate them all at the end (which results in PXE minimizing the number of network round-trips).The
packed_noteis whatgetNoteswill later return. PXE indexes notes bystorage_slot, so this value is typically used to filter notes that correspond to different state variables.note_hashandnullifierare the inner hashes, i.e. the raw hashes returned byNoteHash::compute_note_hashandNoteHash::compute_nullifier. PXE will verify that the siloed unique note hash was inserted into the tree attx_hash, and will store the nullifier to later check for nullification.owneris the address used in note hash and nullifier computation, often requiring knowledge of their nullifier secret key.recipientis the account to which the note message was delivered (i.e. the address the message was encrypted to). This determines which PXE account can see the note - other accounts will not be able to access it (e.g. other accounts will not be able to see one another's token balance notes, even in the same PXE) unless authorized. In most casesrecipientequalsowner, but they can differ in scenarios like delegated discovery.