Crate casper_node[][src]

Expand description

Casper blockchain node

This crate contain the core application for the Casper blockchain. Run with --help to see available command-line arguments.

Application structure

While the main function is the central entrypoint for the node application, its core event loop is found inside the reactor.

Re-exports

pub use types::NodeRng;
pub use utils::OS_PAGE_SIZE;

Modules

components

Components

crypto

Cryptographic types and functions.

effect

Effects subsystem.

logging

Logging via the tracing crate.

protocol

A network message type used for communication between nodes

reactor

Reactor core.

rpcs

The set of JSON-RPCs which the API server handles.

tls

Transport layer security and signing based on OpenSSL.

types

Common types used across multiple components.

utils

Various functions that are not limited to a particular module, but are too small to warrant being factored out into standalone crates.

Macros

fatal

Construct a fatal error effect.

unregister_metric

Used to unregister a metric from the Prometheus registry.

Structs

BlockProposerConfig

Block proposer configuration.

ConsensusConfig

Consensus configuration.

ContractRuntimeConfig

Contract runtime configuration.

DeployAcceptorConfig

Configuration options for fetching.

EventStreamServerConfig

SSE HTTP server configuration.

FetcherConfig

Configuration options for fetching.

GossipConfig

Configuration options for gossiping.

RestServerConfig

REST HTTP server configuration.

RpcServerConfig

JSON-RPC HTTP server configuration.

SmallNetworkConfig

Small network configuration.

StorageConfig

On-disk storage configuration.

Enums

ConfigMigrationError

Error returned as a result of migrating the config file.

DataMigrationError

Error returned as a result of migrating data.

GossipError

Error returned by a GossipTable.

SmallNetworkError

Error type returned by the SmallNetwork component.

StorageError

A storage component initialization error.

Constants

MAX_THREAD_COUNT

The maximum thread count which should be spawned by the tokio runtime.

Statics

QUEUE_DUMP_REQUESTED

Global flag that indicates the currently running reactor should dump its event queue.

TERMINATION_REQUESTED

Global value that indicates the currently running reactor should exit if it is non-zero.

VERSION_STRING

Version string for the compiled node. Filled in at build time, output allocated at runtime.

VERSION_STRING_COLOR

Color version string for the compiled node. Filled in at build time, output allocated at runtime.

Functions

migrate_config

Migrates values from the old config file to the new one, modifying the new config file on-disk.

migrate_data

Migrates data from that specified in the old config file to that specified in the new one.

new_rng

Constructs a new NodeRng.

setup_signal_hooks

Setup UNIX signal hooks for current application.