> For the complete documentation index, see [llms.txt](https://docs.mazze.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mazze.io/shielded-space/legacy-pool/keys-and-tooling.md).

# Keys and tooling

{% hint style="warning" %}
This page documents the **legacy Groth16 pool**, superseded by the [shielded space](/shielded-space/privacy.md). See [Legacy pool](/shielded-space/legacy-pool.md).
{% endhint %}

## Verifying key lifecycle

The shielded pool verifies Groth16 proofs using a verifying key stored on chain.

* `setVerifyingKey(bytes)` stores the verifying key in system storage and exposes its hash via `verifyingKeyHash()`.
* The key is cached as a prepared verifying key to speed up proof checks.

At genesis, the node can load a verifying key from disk and execute a `setVerifyingKey` transaction. The loader looks for:

* `run/shielded_vk.hex`
* `shielded_vk.hex`

If a key is set at genesis, the shielded pool admin is cleared so the key can no longer be changed.

## Genesis pool seeding

Genesis optionally seeds the shielded pool balance from the treasury using `SHIELDED_POOL_GENESIS_FUND_MAZZE`.

## CLI utilities

The executor crate includes helper binaries for the shielded flow:

* `shielded_keygen` - generate proving/verifying keys.
* `shielded_vkhash` - compute a verifying key hash.
* `shielded_verify` - verify a proof payload against a verifying key.
* `shielded_note` - build/decrypt notes and derive Merkle paths.
* `shielded_bundle` - build shielded bundles and proofs.

## Operational docs

Step-by-step CLI and RPC usage is in [Legacy pool](/shielded-space/legacy-pool.md#cli-flow).
