Expand description
SNARK verification integration for the node.
This module integrates the SNARK verification state machine with the node’s Redux store, enabling verification of:
- Block proofs: Consensus-layer proofs validating block production
- Transaction proofs: Ledger proofs for transaction validity (SNARK work)
- User commands: Signatures and zkApp proofs for user transactions
§Architecture
The module re-exports mina_snark and provides the
[redux::SubStore] implementation that connects the SNARK state machine
to the node’s global state.
Verification runs in dedicated threads to avoid blocking the main Redux loop:
- Block verification: Single dedicated thread (
block_proof_verifier) - Work/command verification: Rayon thread pool with FIFO scheduling
For the underlying verification implementation, see mina_snark and
[ledger::proofs::verification].
Modules§
- block_
verify - block_
verify_ effectful - Block Verification Service Layer
- snark_
effects 🔒 - user_
command_ verify - user_
command_ verify_ effectful - work_
verify - work_
verify_ effectful
Structs§
- Block
Verifier - Verifier index for block proofs (consensus layer / block selection). Lazily initialized and cached globally.
- Snark
Config - Snark
State - Transaction
Verifier - Verifier index for transaction proofs (execution layer / transaction confirmation). Lazily initialized and cached globally.
Enums§
Traits§
Functions§
- calc_
merkle_ root_ hash - Computes the root hash of the merkle tree with an account and its merkle path
- get_srs
- Returns the Structured Reference String (SRS) for SNARK verification.
Delegates to
ledger::verifier::get_srswith Fp field type. - snark_
effects - srs_
from_ bytes - srs_
to_ bytes - verifier_
index_ from_ bytes - verifier_
index_ to_ bytes