Conversation
Olshansk
left a comment
There was a problem hiding this comment.
@red-0ne I reviewed this up until ### PaceMaker block proposal delaying and will pick it up again tomorrow.
I believe some of the statements here (e.g. regarding signature swapping, time, etc..) are not completely correct and worded too strongly (without the appropriate qualifiers) that could lead people in the wrong direction. For example, see discussion in #953.
I explicitly avoided diving into a deep discussion/edits since I'm not 100% sure how familiar you are with the technical concepts.
My request:
- Can you do a self-review and update some of the wording appropriately?
- If I'm being too vague and you need me to provide a detailed explanation, please let me know and I will happily do so.
|
@RossiNYC I believe you were added to this PR by accident. Please ignore. I've removed you from the list of reviewers. |
|
|
||
| ### PaceMaker block proposal delaying | ||
|
|
||
| The pace maker ensures minimum block production time with the aim to have a constant production pace. |
Olshansk
left a comment
There was a problem hiding this comment.
Great addition to the documentation! If anything is unclear in the future, we'll iterate on it 💯
0xRampey
left a comment
There was a problem hiding this comment.
Super helpful documentation! Just added some grammatical changes
| * With this chain of trust form a total of `3t+1` validators, where at least `2t+1` validators are honest and live. A synching node systematically detects invalid blocks | ||
| * No malicious or faulty node could inject an alternative block without making at least `2t+1` validators sign it | ||
| * The persistence layer is used as a resume point for the block application, so a node won't restart block application from genesis each time it's rebooted | ||
| * When the routine applies `NetworkCurrentHeight`, it signals it so the node could switch to `consensus` mode. Meanwhile, it waits to apply a new downloaded block |
There was a problem hiding this comment.
| * When the routine applies `NetworkCurrentHeight`, it signals it so the node could switch to `consensus` mode. Meanwhile, it waits to apply a new downloaded block | |
| * When the routine applies a block with height that matches `NetworkCurrentHeight`, it triggers a signal, prompting the node to switch to `consensus` mode. Meanwhile, it waits to apply a new downloaded block. |
| * The `apply` mechanism needs to maintain a chain of trust while applying blocks by performing the following: | ||
| * Before applying block at height `h`, verify that it is signed by a quorum from the validator set at height `h-1`; note that the genesis validator set is used for block `1` | ||
| * By applying each block, the validator set is updated (validators joining or leaving), starting from genesis validator set for any new node | ||
| * With this chain of trust form a total of `3t+1` validators, where at least `2t+1` validators are honest and live. A synching node systematically detects invalid blocks |
There was a problem hiding this comment.
| * With this chain of trust form a total of `3t+1` validators, where at least `2t+1` validators are honest and live. A synching node systematically detects invalid blocks | |
| * With this chain of trust form a total of `3t+1` validators, where at least `2t+1` validators are honest and live. A syncing node systematically detects invalid blocks |
| It has a bootstrapping state where it: | ||
| * Initializes connections to the network through a bootstrap node | ||
| * Keeps an updated current height (the greatest block height seen on the network) | ||
| * Compares network and local current heights, before switching to one of two mutually exclusive modes: `sync` or `consensus` |
There was a problem hiding this comment.
There's another doc which goes over StateSync in more detail over here https://github.com/pokt-network/pocket/blob/consensus-orchestration-doc/consensus/doc/PROTOCOL_STATE_SYNC.md#state-sync-lifecycle.
The names used here are different from the above doc such as the types of mode.
I'd expect a dev would want to go here for more in-depth info about state sync, so do we
- Leave a link to the doc here? or maybe
- Reconcile the terms used between both docs?
I think the idea is to use terminology that is as close as possible to the variable names used in the codebase.
cc: @Olshansk for your thoughts
Description
Document consensus orchestration from the POV of a validator node
Summary generated by Reviewpad on 04 Aug 23 10:35 UTC
This pull request includes the following changes:
These are the main changes made in the diff. Let me know if you need further details on any of these changes.
Issue
Fixes #919
Type of change
Please mark the relevant option(s):
Testing
make develop_test; if any code changes were mademake test_e2eon k8s LocalNet; if any code changes were madee2e-devnet-testpasses tests on DevNet; if any code was changedRequired Checklist
godocformat comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*if I updatedshared/*README(s)