How anza-xyz/agave works
Agave is a Rust-based Solana validator and its supporting node software. The main product workflow is transaction ingress and banking, followed by ledger persistence and replay/consensus; account state and snapshots support that operation. The tree also exposes RPC, gossip, validator administration, and Geyser plugin capabilities. The available excerpts are mostly storage-focused, so several major runtime stages are represented from the source index and tree, while unsupported control-flow links are omitted.
Main entry points: validator.rs Validator Process · replay_stage.rs Ledger Replay · accounts_db.rs Accounts Database · banking_stage.rs Banking Stage
Components 19
Validator Runtime
- Validator Process
core/src/validator.rs - Transaction Ingress
core/src/tpu.rs - Banking Stage
core/src/banking_stage.rs - Transaction Consumer
core/src/banking_stage/consumer.rs - Transaction Scheduler
core/src/banking_stage/transaction_scheduler/scheduler_controller.rs - Fork Choice
core/src/consensus.rs - Ledger Replay
core/src/replay_stage.rs
Accounts and Snapshots
- Blockstore
ledger/src/blockstore.rs - Accounts Database
accounts-db/src/accounts_db.rs - Accounts Index
accounts-db/src/accounts_index.rs - Account Storage
accounts-db/src/account_storage.rs - Snapshot Serialization
runtime/src/serde_snapshot.rs - Storage Rebuilder
runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs - Snapshot Storage List
runtime/src/serde_snapshot/storages_list.rs
Network and API
- Cluster Gossip
gossip/src/gossip_service.rs - RPC Service
rpc/src/rpc_service.rs
Operations and Extensions
- Command Line
cli/src/main.rs - Geyser Plugins
geyser-plugin-manager/src/geyser_plugin_manager.rs
Other components
- Node Operator
Connections 18
- Node Operator → Validator Process: runs
- Banking Stage → Transaction Consumer: uses
core/src/banking_stage.rs - Banking Stage → Transaction Scheduler: uses
core/src/banking_stage.rs - Accounts Index → Accounts Database: supports
- Accounts Index → Account Storage: indexes
- Account Storage → Accounts Database: managed by
accounts-db/src/account_storage.rs - Snapshot Serialization → Snapshot Storage List: uses
runtime/src/serde_snapshot.rs - Storage Rebuilder → Snapshot Serialization: reads formats
runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs - Storage Rebuilder → Snapshot Storage List: rebuilds from
runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs - Validator Process → Transaction Ingress: configures
- Validator Process → Fork Choice: configures
- Validator Process → Ledger Replay: configures
- Validator Process → Cluster Gossip: starts
- Validator Process → RPC Service: starts
- Validator Process → Geyser Plugins: can enable
- Command Line → RPC Service: can query
- Ledger Replay → Blockstore: reads
- Ledger Replay → Accounts Database: updates