Function attempt_note_nonce_discovery
pub unconstrained fn attempt_note_nonce_discovery<Env>(
unique_note_hashes_in_tx: BoundedVec<Field, 64>,
first_nullifier_in_tx: Field,
compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,
contract_address: AztecAddress,
storage_slot: Field,
randomness: Field,
note_type_id: Field,
packed_note: BoundedVec<Field, 11>,
) -> BoundedVec<DiscoveredNoteInfo, 64>
Searches for note nonces that will result in a note that was emitted in a transaction. While rare, it is possible for multiple notes to have the exact same packed content and storage slot but different nonces, resulting in different unique note hashes. Because of this this function returns a vector of discovered notes, though in most cases it will contain a single element.
Due to how nonces are computed, this function requires knowledge of the transaction in which the note was created, more specifically the list of all unique note hashes in it plus the value of its first nullifier.