SNARK worker
The commands on this page use the release binary. In Docker, see the Docker page's SNARK worker section.
Start it from the dashboard
mina node --network devnet --allow-worker-controlOpen the dashboard's SNARK worker page, enter your public key and fee, and start the worker. While it runs, you may change the key or the fee, or stop it. The node keeps the setting in snark-worker.json in its work directory, so a restart brings the worker back.
Without a key yet, make one with mina wallet generate, as for a block producer. Set MINA_PRIVKEY_PASS first, as that section shows: the command reads the key's password from it. The worker uses only the public key.
If your key has no account on chain yet, nodes accept your work only with a fee of at least 1 MINA, the account creation fee: a block that bought it would pay the fee to a new account, which costs 1 MINA. Fund the account first, or ask at least 1 MINA. The dashboard refuses a lower fee for such a key. With --run-snarker the node starts, and logs a warning once the first proof is refused.
--allow-worker-control lets anyone who can reach the node's HTTP port choose where the fees go. On a server, use an SSH tunnel.
Start it with flags
mina node --network devnet \
--run-snarker B62q... --snarker-fee 1The fee is in MINA, and the default is 0.1. The flags set the worker at every start, and win over a setting saved from the dashboard.
The example asks 1 MINA because a new key has no account on chain yet, and such a key needs at least that. A key that already has an account may ask less.
If the node runs as the user service, add these flags to its start command with a drop-in file, as the block producer page shows for its flags. The worker needs no password file.
If this node also produces blocks, --snarker-block-first-lead SECONDS stops new worker jobs before a known won slot (default 420, maximum 4200; 0 disables the pause).
If the fee receiver is a zkApp account, its receive permission must be None or OCaml peers reject the work.
The CLI reference lists the SNARK work options.
Fees
The SNARK worker page shows what other provers ask and how your fee compares.
Job selection
The worker takes only a job that no other worker has committed to and that has no work in the pool as cheap as its fee. By default it picks one of those jobs at random, so workers spread over the jobs rather than racing for the same one. --snarker-strategy rand selects this; seq takes the first eligible job in scan-state order.
Work bought by blocks
The SNARK worker page lists each best-chain block that bought your work: its height, time, producer, the bundles and their fees, and its confirmations (the blocks on top of it).
Work is pending until 15 blocks are on top of its block, Mina's recommended wait for a payment, and confirmed from then on. Dropped means another block took its place.
Blocks buy work only when the chain needs proofs, often many jobs at once and then none for hours, so a new worker's first sale may be hours away.
Turn it off
Stop the worker in the dashboard, which deletes snark-worker.json, or stop the node and delete snark-worker.json from the work directory. In both cases, start the node without --run-snarker. The record of work blocks bought, snark-worker-included.json, stays.