> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function assert_nullifier_existed_by

Module: `noir_aztec::history::nullifier`

```rust
pub fn assert_nullifier_existed_by(block_header: BlockHeader, siloed_nullifier: Field)
```

Asserts that a nullifier existed by the time a block was mined.

This function takes a *siloed* nullifier, i.e. the value that is actually stored in the tree. Use [`crate::protocol::hash::compute_siloed_nullifier`](/aztec-nr-api/v6.0.0/protocol_types/hash/fn.compute_siloed_nullifier.md) to convert an inner nullifier (what [`PrivateContext::push_nullifier_unsafe`](/aztec-nr-api/v6.0.0/noir_aztec/context/struct.PrivateContext.md#push_nullifier_unsafe) takes) into a siloed one.

Note that this does not mean that the nullifier was created **at** `block_header`, only that it was present in the tree once all transactions from `block_header` were executed.

In order to prove that a nullifier did **not** exist by `block_header`, use [`assert_nullifier_did_not_exist_by`](/aztec-nr-api/v6.0.0/noir_aztec/history/nullifier/fn.assert_nullifier_did_not_exist_by.md).

## Cost

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`](/aztec-nr-api/v6.0.0/noir_aztec/context/struct.PrivateContext.md#assert_nullifier_exists) instead, which is typically cheaper. Note that there are semantic differences though, as that function also considers *pending* nullifiers.
