Crate solana_core
source ·Expand description
The solana library implements the Solana high-performance blockchain architecture.
It includes a full Rust implementation of the architecture (see
Validator) as well as hooks to GPU implementations of its most
paralellizable components (i.e. SigVerify). It also includes
command-line tools to spin up validators and a Rust library
Modules
- The
banking_stageprocesses Transaction messages. It is intended to be used to contruct a software pipeline. The stage uses all available CPU cores and can do its processing in parallel with signature verification on the GPU. - A stage to broadcast data from a leader node to validators
- this service receives instruction ExecuteTimings from replay_stage, update cost_model which is shared with banking_stage to optimize packing transactions into block; it also triggers persisting cost table to blockstore.
- The
fetch_stagebatches input from a UDP socket and sends it to a channel. - The
gen_keysmodule makes lots of keypairs - The
ledger_cleanup_servicedrops older ledger data to limit disk space usage - The
ledger_metric_report_serviceperiodically reports ledger store metrics. - Provides an iterator interface that create non-conflicting batches of elements to process.
- Quality of service for block producer. Provides logic and functions to allow a Leader to prioritize how transactions are included in blocks, and optimize those blocks.
- The
repair_servicemodule implements the tools necessary to generate a thread which regularly finds missing shreds in the ledger and sends repair requests for those shreds - The
replay_stagereplays transactions broadcast by the leader. - The
retransmit_stageretransmits shreds between validators - The
shred_fetch_stagepulls shreds from UDP sockets and sends it to a channel. - The
sigverifymodule provides digital signature verification functions. By default, signatures are verified in parallel using all available CPU cores. When perf-libs are available signature verification is offloaded to the GPU. - The
sigverify_stageimplements the signature verification stage of the TPU. It receives a list of lists of packets and outputs the same list, but tags each top-level list with a list of booleans, telling the next stage whether the signature in that packet is valid. It assumes each packet contains one transaction. All processing is done on the CPU by default and on a GPU if perf-libs are available - The
tpumodule implements the Transaction Processing Unit, a multi-stage transaction processing pipeline in software. - The
tvumodule implements the Transaction Validation Unit, a multi-stage transaction validation pipeline in software. - The
validatormodule hosts all the validator microservices. window_servicehandles the data plane incoming shreds, storing them in blockstore and retransmitting where required