-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect node is behind #3373
base: master
Are you sure you want to change the base?
Detect node is behind #3373
Commits on Oct 16, 2024
-
Detect if our node is behind the majority
This commit adds a mechanism that detects that our node is behind the majority of the stake. The intent is to later have this mechanism be the trigger for the bootstrapping mechanism. Currently, the bootstrapping mechanism is only active upon node boot, but not at a later point. The mechanism works in the following manner: - It intercepts the snowman engine's Chits message handling, and upon every reception of the Chits message, the mechanism that detects if the node is a straggler (a node with a ledger height behind the rest) may be invoked, if it wasn't invoked too recently. - The mechanism draws statistics from the validators known to it, and computes the latest accepted block for each validator. - The mechanism then proceeds to determine which blocks are pending to be processed (a block pending to be processed was not accepted). - The mechanism then collects a snapshot of all blocks it hasn't accepted yet, and the amount of stake that has accepted this block. - The mechanism then waits for its next invocation, in order to see if it has accepted blocks correlated with enough stake. - If there is too much stake that has accepted blocks by other nodes correlated to it that the node hasn't accepted, then the mechanism announces the node is behind, and returns the time period between the two invocations. - The mechanism sums the total time it has detected the node is behind, until a sampling concludes it is not behind, and then the total time is nullified. Signed-off-by: Yacov Manevich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 77ff361 - Browse repository at this point
Copy the full SHA 77ff361View commit details -
Signed-off-by: Yacov Manevich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dac0382 - Browse repository at this point
Copy the full SHA dac0382View commit details -
Address code review comments II
Signed-off-by: Yacov Manevich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4d014c0 - Browse repository at this point
Copy the full SHA 4d014c0View commit details -
Address code review comments III
Signed-off-by: Yacov Manevich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0228a65 - Browse repository at this point
Copy the full SHA 0228a65View commit details -
Address code review comments IV
Signed-off-by: Yacov Manevich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eb68c75 - Browse repository at this point
Copy the full SHA eb68c75View commit details
Commits on Oct 17, 2024
-
Use last accepted height from Chits message to detect if we're behind
Signed-off-by: Yacov Manevich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 438768d - Browse repository at this point
Copy the full SHA 438768dView commit details