SNARK Workers Getting Started
Before following this guide, complete the Validator Node setup — from Requirements through Connect to Mainnet or Devnet. You should have a synced node and a key pair before proceeding.
There are two modes for running SNARK work:
- Embedded worker — the daemon runs a single SNARK worker internally. Simpler to set up, no external processes needed.
- Coordinator with external workers — the daemon runs a SNARK coordinator that distributes work to one or more external SNARK worker processes. Use this to scale across multiple machines or cores.
In both modes, the daemon also participates in the network as a normal validator.
Embedded SNARK worker
Run the daemon with --run-snark-worker to produce SNARK proofs directly within the daemon process:
mina daemon \
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt \
--run-snark-worker $SNARK_WORKER_PUBLICKEY \
--snark-worker-fee 0.001 \
--work-selection seq
| Flag | Description |
|---|---|
--run-snark-worker | Public key to receive SNARK work fees |
--snark-worker-fee | Fee (in MINA) to charge per SNARK proof |
--work-selection | Work selection method: seq, rand, or roffset |
--snark-worker-parallelism | Number of threads for SNARK work (does not affect block production) |
Coordinator with external workers
Start the coordinator
Run the daemon with --run-snark-coordinator. The coordinator distributes work to external SNARK worker processes, propagates the generated proofs to the network, and sets the public key that receives SNARK work fees from those workers:
mina daemon \
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt \
--run-snark-coordinator $SNARK_WORKER_PUBLICKEY \
--snark-worker-fee 0.001 \
--work-selection seq
| Flag | Description |
|---|---|
--run-snark-coordinator | Public key to receive SNARK work fees from external workers |
--snark-worker-fee | Fee (in MINA) to charge per SNARK proof |
--work-selection | Work selection method: seq, rand, or roffset |
Connect workers to the coordinator
The protocol between the coordinator and workers is not secure. Only run workers on the same intranet as the coordinator — do not expose the coordinator port to the public internet.
On each worker machine, run:
mina internal snark-worker \
--proof-level full \
--shutdown-on-disconnect false \
--daemon-address <COORDINATOR_IP:PORT>
The default coordinator port is 8301. Use --snark-worker-parallelism on the worker to set the number of threads used for SNARK work.
For a Docker Compose example that sets up a coordinator and worker together, see Docker Compose Example.
Related
- Mina CLI Reference — Full
mina daemoncommand reference - FAQ: SNARKs and SNARK Workers — Common questions about SNARK pricing, fees, and performance