SnarkOS
SnarkOS is the node implementation for the Aleo network. Written in Rust, it handles peer-to-peer networking, consensus, block production, transaction validation, and chain state management. Validators, provers, and full nodes all run SnarkOS.
SnarkOS embeds SnarkVM to verify zero-knowledge proofs in transactions. When a transaction arrives, SnarkOS checks the proof, confirms serial numbers (nullifiers) have not been spent, and runs any finalize logic against the current mapping state. If everything passes, the transaction goes into a block.
Consensus combines proof-of-stake for validators with puzzle-solving for provers. Validators stake Aleo credits and take turns proposing blocks. Provers compete to solve coinbase puzzles that secure the network and earn rewards. SnarkOS coordinates both roles, managing the staking registry, puzzle difficulty, and reward distribution. It also exposes a JSON-RPC API for wallets, explorers, and developer tools to query chain state, broadcast transactions, and read mapping values.