[][src]Crate solana

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 fullnodes and a Rust library

Modules

bank_forks

The bank_forks module implments BankForks a DAG of checkpointed Banks

banking_stage

The banking_stage processes 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.

blob_fetch_stage

The blob_fetch_stage pulls blobs from UDP sockets and sends it to a channel.

blockstream

The blockstream module provides a method for streaming entries out via a local unix socket, to provide client services such as a block explorer with real-time access to entries.

blockstream_service

The blockstream_service implements optional streaming of entries and block metadata using the blockstream module, providing client services such as a block explorer with real-time access to entries.

blocktree

The block_tree module provides functions for parallel verification of the Proof of History ledger as well as iterative read, append write, and random access read to a persistent file-based ledger.

blocktree_processor
broadcast_stage

A stage to broadcast data from a leader node to validators

chacha
cluster
cluster_info

The cluster_info module defines a data structure that is shared by all the nodes in the network over a gossip control plane. The goal is to share small bits of off-chain information and detect and repair partitions.

cluster_info_repair_listener
cluster_info_vote_listener
consensus
contact_info
crds

This module implements Cluster Replicated Data Store for asynchronous updates in a distributed network.

crds_gossip

Crds Gossip This module ties together Crds and the push and pull gossip overlays. The interface is designed to run with a simulator or over a UDP network connection with messages up to a packet::BLOB_DATA_SIZE size.

crds_gossip_error
crds_gossip_pull

Crds Gossip Pull overlay This module implements the anti-entropy protocol for the network.

crds_gossip_push

Crds Gossip Push overlay This module is used to propagate recently created CrdsValues across the network Eager push strategy is based on Plumtree http://asc.di.fct.unl.pt/~jleitao/pdf/srds07-leitao.pdf

crds_value
cuda_runtime
entry

The entry module is a fundamental building block of Proof of History. It contains a unique ID that is the hash of the Entry before it, plus the hash of the transactions within it. Entries cannot be reordered, and its field num_hashes represents an approximate amount of time since the last Entry was created.

erasure

Erasure Coding and Recovery

fetch_stage

The fetch_stage batches input from a UDP socket and sends it to a channel.

gen_keys

The signature module provides functionality for public, and private keys.

genesis_utils
gossip_service

The gossip_service module implements the network control plane.

leader_schedule
leader_schedule_cache
leader_schedule_utils
ledger_cleanup_service

The ledger_cleanup_service drops older ledger data to limit disk space usage

local_vote_signer_service

The local_vote_signer_service can be started locally to sign fullnode votes

packet

The packet module defines data structures and methods to pull data from the network.

poh

The Poh module provides an object for generating a Proof of History.

poh_recorder

The poh_recorder module provides an object for synchronizing with Proof of History. It synchronizes PoH, bank's register_tick and the ledger

poh_service

The poh_service module implements a service that records the passing of "ticks", a measure of time in the PoH stream

recvmmsg

The recvmmsg module provides recvmmsg() API implementation

recycler
repair_service

The repair_service module implements the tools necessary to generate a thread which regularly finds missing blobs in the ledger and sends repair requests for those blobs

replay_stage

The replay_stage replays transactions broadcast by the leader.

replicator
result

The result module exposes a Result type that propagates one of many different Error types.

retransmit_stage

The retransmit_stage retransmits blobs between validators

rpc

The rpc module implements the Solana RPC interface.

rpc_pubsub

The pubsub module implements a threaded subscription service on client RPC request

rpc_pubsub_service

The pubsub module implements a threaded subscription service on client RPC request

rpc_service

The rpc_service module implements the Solana JSON RPC service.

rpc_subscriptions

The pubsub module implements a threaded subscription service on client RPC request

service

The service module implements a trait used by services and stages.

shred

The shred module defines data structures and methods to pull MTU sized data frames from the network.

sigverify

The sigverify module provides digital signature verification functions. By default, signatures are verified in parallel using all available CPU cores. When --features=cuda is enabled, signature verification is offloaded to the GPU.

sigverify_stage

The sigverify_stage implements 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 the cuda feature is enabled with --features=cuda.

snapshot_package
snapshot_utils
staking_utils
storage_stage
streamer

The streamer module defines a set of services for efficiently pulling data from UDP sockets.

test_tx
tpu

The tpu module implements the Transaction Processing Unit, a multi-stage transaction processing pipeline in software.

tvu

The tvu module implements the Transaction Validation Unit, a multi-stage transaction validation pipeline in software.

validator

The fullnode module hosts all the fullnode microservices.

weighted_shuffle

The weighted_shuffle module provides an iterator over shuffled weights.

window_service

window_service handles the data plane incoming blobs, storing them in blocktree and retransmitting where required

Macros

create_new_tmp_ledger
get_tmp_ledger_path
socketaddr
socketaddr_any
tmp_copy_blocktree
tmp_ledger_name