aztec-nr - noir_aztec::messages::discovery::process_message

Function process_message_ciphertext

pub unconstrained fn process_message_ciphertext<Env>(
    contract_address: AztecAddress,
    compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,
    message_ciphertext: BoundedVec<Field, 17>,
    message_context: MessageContext,
)

Processes a message that can contain notes, partial notes, or events.

Notes result in nonce discovery being performed prior to delivery, which requires knowledge of the transaction hash in which the notes would've been created (typically the same transaction in which the log was emitted), along with the list of unique note hashes in said transaction and the compute_note_hash_and_nullifier function. Once discovered, the notes are enqueued for validation.

Partial notes result in a pending partial note entry being stored in a PXE capsule, which will later be retrieved to search for the note's completion public log.

Events are processed by computing an event commitment from the serialized event data and its randomness field, then enqueueing the event data and commitment for validation.