diff --git a/book/art/fullnode-proposal.bob b/book/art/fullnode-proposal.bob new file mode 100644 index 0000000000..36a9e6bdf3 --- /dev/null +++ b/book/art/fullnode-proposal.bob @@ -0,0 +1,30 @@ + .----------------------------------. + | Fullnode | + | | + .--------. | .------------------. | + | |---->| | | + | Client | | | JSON RPC Service | | + | |<----| | | + `----+---` | `------------------` | + | | ^ | + | | | .----------------. | .------------------. + | | | | Gossip Service |<------>| Validators | + | | | `----------------` | | | + | | | ^ | | | + | | | | | | .------------. | + | | .--+---. .--+---. .---------. | | | | | + | | | Bank |<-|Replay| | Peer TX |<-----+ Upstream | | + | | | Forks| |Stage | | Receiver| | | | Validators | | + | | `------` `------` `-+-------` | | | | | + | | ^ ^ | | | `------------` | + | | | | v | | | + | | | .-+-------. | | | + | | | |Blocktree| | | | + | | | `---------` | | .------------. | + | | | ^ | | | | | + | | | | | | | Downstream | | + | | .--+--. .-------+---. | | | Validators | | + `-------->| TPU +-->| Broadcast +------------->| | | + | `-----` | Service | | | `------------` | + | `-----------` | `------------------` + `----------------------------------` \ No newline at end of file diff --git a/book/art/fullnode.bob b/book/art/fullnode.bob index d82577a700..6afe5ea519 100644 --- a/book/art/fullnode.bob +++ b/book/art/fullnode.bob @@ -1,30 +1,27 @@ - .---------------------------------. - | Fullnode | - | | - .--------. | .------------------. | - | |---->| | | - | Client | | | JSON RPC Service | | - | |<----| | | - `----+---` | `------------------` | - | | ^ | - | | | .----------------. | .------------------. - | | | | Gossip Service |<------>| Validators | - | | | `----------------` | | | - | | | | | | - | | | | | .------------. | - | | .--+---. .------. .--------. | | | | | - | | | Bank |<-|Replay| |Network |<------+ Upstream | | - | | | Forks| |Stage | |Observer| | | | Validators | | - | | `------` `--+---` `------+-` | | | | | - | | ^ | ^ | | | `------------` | - | | | .------ | | | | | | - | | | |Gossip|<-`.-+-------. | | | | - | | | |Votes | |Blocktree|<-` | | | - | | | `-+----` `---------` | | .------------. | - | | | | ^ | | | | | - | | | v | | | | Downstream | | - | | .+----. .------+----. | | | Validators | | - `-------->| TPU +-->| Broadcast +------------->| | | - | `-----` | Service | | | `------------` | - | `-----------` | `------------------` - `---------------------------------` \ No newline at end of file + .---------------------------. + | Fullnode | + | | + .--------. | .------------------. | + | |---->| | | + | Client | | | JSON RPC Service | | + | |<----| | | + `----+---` | `------------------` | + | | ^ | .------------------. + | | | .----------------. | | Validators | + | | | | Gossip Service +----->| | + | | | `--------+-------` | | .------------. | + | | | ^ | | | | | | + | | | | v | | | Upstream | | + | | .--+---. .-+---. | | | Validators | | + | | | Bank |<--| TVU |<--------------+ | | + | | `------` `-----` | | `------------` | + | | ^ | | | + | | | | | .------------. | + | | .--+--. .-----------. | | | | | + `-------->| TPU +-->| Broadcast +--------->| Downstream | | + | `-----` | Service | | | | Validators | | + | `-----------` | | | | | + | | | `------------` | + `---------------------------` | | + `------------------` + diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 036aaf646a..9fad16a1eb 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -36,6 +36,7 @@ - [Data Plane Fanout](data-plane-fanout.md) - [Reliable Vote Transmission](reliable-vote-transmission.md) - [Bank Forks](bank-forks.md) + - [Fullnode Changes](fullnode-with-ledger-notifications.md) - [Cluster Economics](ed_overview.md) - [Validation-client Economics](ed_validation_client_economics.md) - [State-validation Protocol-based Rewards](ed_vce_state_validation_protocol_based_rewards.md) diff --git a/book/src/fullnode-with-ledger-notifications.md b/book/src/fullnode-with-ledger-notifications.md new file mode 100644 index 0000000000..3daa14ce86 --- /dev/null +++ b/book/src/fullnode-with-ledger-notifications.md @@ -0,0 +1,35 @@ +# Fullnode + +This document proposes the following architecture changes to fullnode pipeline. + +## Current Architecture +Fullnode block diagrams + +## Proposal +Fullnode block diagrams + +## Background + +In the old architecture, the ReplayStage receives entries from the RetransmitStage, +processes them and writes to the ledger. + +In the current code, the ledger write operation has been moved out of the ReplayStage. +If the fullnode is running with a TPU, the Broadcast Service writes to the ledger. +The Retransmit Stage receives entries from peer fullnodes and also writes to the ledger. + +The ledger notifies the ReplayStage whenever some entity writes to it. The +ReplayStage reads from the ledger, processes the entries in the bank and submits +the votes. + +In old architecture, the RetransmitStage and ReplayStage are contained in the TVU. + +## Changes + +This document proposes the following change to the architecture. + +1. Split TVU into Peer Transaction Receiver (contains BlobFetchStage, and RetransmitStage) +2. Add Blocktree (ledger) to the diagram +3. The Blocktree is updated by Broadcast Stage and Peer Transaction Receiver +4. Replay Stage gets notified by Blocktree when someone writes to it +5. Replay Stage submits votes via Gossip Service +6. Replace Bank with BankForks \ No newline at end of file