diff --git a/src/tvu.rs b/src/tvu.rs index 1f1d76b8a..28e360629 100644 --- a/src/tvu.rs +++ b/src/tvu.rs @@ -1,24 +1,51 @@ //! The `tvu` module implements the Transaction Validation Unit, a -//! 5-stage transaction validation pipeline in software. -//! 1. streamer -//! - Incoming blobs are picked up from the replicate socket. -//! 2. verifier -//! - TODO Blobs are sent to the GPU, and while the memory is there the PoH stream is verified -//! along with the ecdsa signature for the blob and each signature in all the transactions. Blobs -//! with errors are dropped, or marked for slashing. -//! 3.a retransmit -//! - Blobs originating from the parent (leader, at the moment, is the only parent), are retransmit to all the -//! peers in the crdt. Peers is everyone who is not me or the leader that has a known replicate -//! address. -//! 3.b window -//! - Verified blobs are placed into a window, indexed by the counter set by the leader.sockets. This could -//! be the PoH counter if its monotonically increasing in each blob. Erasure coding is used to -//! recover any missing packets, and requests are made at random to peers and parents to retransmit -//! a missing packet. -//! 4. accountant -//! - Contigous blobs are sent to the accountant for processing transactions -//! 5. validator -//! - TODO Validation messages are sent back to the leader +//! 3-stage transaction validation pipeline in software. +//! +//! ```text +//! .----------------------------------------. +//! | TVU | +//! | | +//! | | +//! | | +//! | | +//! | .-------. .--------. .-----------. | +//! .--------. | | Blob | | Window | | Replicate | | .------------. +//! | Leader |--->| Fetch |->| Stage |->| Stage |---->| Validators | +//! `--------` | | Stage | | | | | | `------------` +//! | `-------` `----+---` `----+------` | +//! | | | | +//! | | | | +//! | | | | +//! | | | | +//! `------------------|-----------|---------` +//! | | +//! v v +//! .--------. .------. +//! | Window | | Bank | +//! `--------` `------` +//! ``` +// +// TODO: @aeyakovenko, these comments no longer refect the code in this module: +// 1. streamer +// - Incoming blobs are picked up from the replicate socket. +// 2. verifier +// - TODO Blobs are sent to the GPU, and while the memory is there the PoH stream is verified +// along with the ecdsa signature for the blob and each signature in all the transactions. Blobs +// with errors are dropped, or marked for slashing. +// 3.a retransmit +// - Blobs originating from the parent (leader, at the moment, is the only parent), are retransmit to all the +// peers in the crdt. Peers is everyone who is not me or the leader that has a known replicate +// address. +// 3.b window +// - Verified blobs are placed into a window, indexed by the counter set by the leader.sockets. This could +// be the PoH counter if its monotonically increasing in each blob. Erasure coding is used to +// recover any missing packets, and requests are made at random to peers and parents to retransmit +// a missing packet. +// 4. accountant +// - Contigous blobs are sent to the accountant for processing transactions +// 5. validator +// - TODO Validation messages are sent back to the leader +// use bank::Bank; use blob_fetch_stage::BlobFetchStage;