Crates.io | snarkos-node-bft |
lib.rs | snarkos-node-bft |
version | 3.0.0 |
source | src |
created_at | 2023-10-20 01:12:34.580178 |
updated_at | 2024-09-18 13:09:53.198147 |
description | A memory pool for a decentralized operating system |
homepage | https://aleo.org |
repository | https://github.com/AleoNet/snarkOS |
max_upload_size | |
id | 1008578 |
size | 794,076 |
The snarkos-node-bft
crate provides a node implementation for a BFT-based memory pool.
The primary is the coordinator, responsible for advancing rounds and broadcasting the anchor.
Each round runs until one of two conditions is met:
As described in the paper, the BFT advances rounds whenever n − f vertices are delivered.
The problem in advancing rounds whenever n − f vertices are delivered is that parties
might not vote for the anchor even if the party that broadcast it is just slightly slower
than the fastest n − f parties. To deal with this, the BFT integrates timeouts into
the DAG construction. If the first n − f vertices a party p gets in an even-numbered round r
do not include the anchor of round r, then p sets a timer and waits for the anchor
until the timer expires. Similarly, in an odd-numbered round, parties wait for either
f + 1 vertices that vote for the anchor, or 2f + 1 vertices that do not, or a timeout.
The workers are simple entry replicators that receive transactions from the network and append them to their memory pool.
In order to function properly, workers must be synced to the latest round, and capable of performing verification on the entries they receive from other validators' workers.