core/vote: not vote if too late for next in turn validator #2568
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
core/vote: not vote if too late for next in turn validator
Rationale
Assume that at block height N, validator Va mines a large block BN, broadcasts it, and votes immediately. Due to the block's large size, other validators (such as Vb, Vc, and Vd) take a longer time to import BN, resulting in Vc and Vd voting for BN later. As a result, at block height N+1, Vb fails to collect enough votes for BN and mines and broadcasts a block BN1 without vote proof. Subsequently, backup validator Vc collects enough votes for BN, mines, and broadcasts a block BN1' with vote proof, causing other validators to experience a block reorganization (reorg).
this PR suggest not to vote if too late for next in turn validator
Example
add an example CLI or API response...
Changes
Notable changes: