Skip to main content Crate snarkos_node_bft Copy item path Source 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;helpers spawn_blocking A helper macro to spawn a blocking task. BFT Gateway The gateway maintains connections to other validators.
For connections with clients and provers, the Router logic is used. InnerGateway 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. 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_VALIDATORS_TO_SEND The maximum number of validators to send in a validators response event. 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. PrimaryCallback This callback trait allows listening to changes in the Primary, such as round advancement.
This is currently used by BFT. SyncCallback This callback trait allows listening to synchronization updates, such as discorvering new BatchCertificates.
This is currently used by BFT. Transport Part of the Gateway API that deals with networking.
This is a separate trait to allow for easier testing/mocking. ProposedBatch A helper type for an optional proposed batch.