Crate snarkos_node_bft

Source

Re-exports§

pub use snarkos_node_bft_events as events;
pub use snarkos_node_bft_ledger_service as ledger_service;
pub use snarkos_node_bft_storage_service as storage_service;

Modules§

helpers

Macros§

spawn_blocking
A helper macro to spawn a blocking task.

Structs§

BFT
Gateway
The gateway maintains connections to other validators. For connections with clients and provers, the Router logic is used.
Primary
The primary logic of a node. AleoBFT adopts a primary-worker architecture as described in the Narwhal and Tusk paper (Section 4.2).
Sync
Block synchronization logic for validators.
Worker
A worker’s main role is maintaining a queue of verified (“ready”) transmissions, which will eventually be fetched by the primary when the primary generates a new batch.

Constants§

CONTEXT
MAX_BATCH_DELAY_IN_MS
The maximum number of milliseconds to wait before proposing a batch.
MAX_FETCH_TIMEOUT_IN_MS
The maximum number of milliseconds to wait before timing out on a fetch.
MAX_LEADER_CERTIFICATE_DELAY_IN_SECS
The maximum number of seconds allowed for the leader to send their certificate.
MAX_TIMESTAMP_DELTA_IN_SECS
The maximum number of seconds before the timestamp is considered expired.
MAX_WORKERS
The maximum number of workers that can be spawned.
MEMORY_POOL_PORT
The port on which the memory pool listens for incoming connections.
MIN_BATCH_DELAY_IN_SECS
The minimum number of seconds to wait before proposing a batch.
PRIMARY_PING_IN_MS
The interval at which each primary broadcasts a ping to every other node. Note: If this is updated, be sure to update MAX_BLOCKS_BEHIND to correspond properly.
WORKER_PING_IN_MS
The interval at which each worker broadcasts a ping to every other node.

Traits§

Transport
Part of the Gateway API that deals with networking. This is a separate trait to allow for easier testing/mocking.

Type Aliases§

ProposedBatch
A helper type for an optional proposed batch.