Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions noir-projects/aztec-nr/aztec/src/history/nullifier.nr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod test;
///
/// ## Cost
///
/// This function performs a single merkle tree inclusion proof, which is in the order of 4k gates.
/// This function performs a single merkle tree inclusion proof, which is ~4k gates.
///
/// If you don't need to assert existence at a _specific_ past block, consider using
/// [`PrivateContext::assert_nullifier_exists`](crate::context::PrivateContext::assert_nullifier_exists) instead, which
Expand Down Expand Up @@ -82,7 +82,7 @@ pub fn assert_nullifier_existed_by(block_header: BlockHeader, siloed_nullifier:
///
/// ## Cost
///
/// This function performs a single merkle tree inclusion proof, which is in the order of 4k gates.
/// This function performs a single merkle tree inclusion proof, which is ~4k gates.
pub fn assert_nullifier_did_not_exist_by(block_header: BlockHeader, siloed_nullifier: Field) {
// 1) Get the membership witness of a low nullifier of the nullifier.
// Safety: The witness is only used as a "magical value" that makes the proof below pass. Hence it's safe.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ where
{
/// Returns the current value.
///
/// This sets the transaction's `expiration_timestamp` (see
/// [`PrivateContext::set_expiration_timestamp`](crate::context::PrivateContext::set_expiration_timestamp)),
/// invalidating the transaction if not included before that time. See the 'Privacy' section below to learn more.
///
/// If [`schedule_value_change`](DelayedPublicMutable::schedule_value_change) has never been called, then this
/// returns the default empty public storage value, which is all zeroes - equivalent to `let t =
/// T::unpack(std::mem::zeroed());`.
Expand All @@ -410,18 +414,16 @@ where
///
/// ## Privacy
///
/// This function does leak some privacy, though in a subtle way. Understanding this is key to understanding how to
/// use `DelayedPublicMutable` in a privacy-preserving way.
/// This function leaks information via the transaction's expiration timestamp. The degree of leakage depends on
/// the delay that is set, and on whether a value change is currently scheduled.
///
/// Private reads are based on a historical public storage read at the anchor block (i.e.
/// [`crate::history::storage::public_storage_historical_read`]). `DelayedPublicMutable` is able to provide
/// guarantees about values read in the past remaining the state variable's current value into the future due to
/// guarantees that values read in the past remain the state variable's current value into the future due to
/// the existence of delays when scheduling writes. It then sets the `expiration_timestamp` property of the current
/// transaction (see
/// [`PrivateContext::set_expiration_timestamp`](crate::context::PrivateContext::set_expiration_timestamp)) to
/// ensure that the transaction can only be included in a block **prior** to the state variable's value changing.
/// In other words, it knows some facts about the near future up until some time horizon, and then makes sure that
/// it doesn't act on this knowledge past said moment.
/// transaction to ensure that the transaction can only be included in a block **prior** to the state variable's
/// value changing. In other words, it knows some facts about the near future up until some time horizon, and then
/// makes sure that it doesn't act on this knowledge past said moment.
///
/// Because the `expiration_timestamp` property is part of the transaction's public information, any mutation to
/// this value could result in transaction fingerprinting. Note that multiple contracts may set this value during a
Expand Down Expand Up @@ -470,7 +472,7 @@ where
///
/// ## Cost
///
/// This function performs a historical public storage read (which is in the order of 4k gates), **regardless of
/// This function performs a historical public storage read (which is ~4k gates), **regardless of
/// `T`'s packed length**. This is because [`DelayedPublicMutable::schedule_value_change`] stores not just the
/// value but also its hash: this function obtains the preimage from an oracle and proves that it matches the hash
/// from public storage.
Expand Down
Loading