Skip to content
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

core/vote: not vote if too late for next in turn validator #2568

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

NathanBSC
Copy link
Contributor

@NathanBSC NathanBSC commented Jul 8, 2024

Description

core/vote: not vote if too late for next in turn validator

Rationale

image

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:

  • add each change in a bullet point here
  • ...

@NathanBSC NathanBSC marked this pull request as ready for review July 8, 2024 10:44
@NathanBSC NathanBSC changed the title core/vote: not vote if too later for next in turn validator core/vote: not vote if too late for next in turn validator Jul 8, 2024
@zzzckck
Copy link
Collaborator

zzzckck commented Jul 9, 2024

this may encourage validators to delay broadcast block?

@NathanBSC
Copy link
Contributor Author

this may encourage validators to delay broadcast block?

IMO, not.
if validator delay broadcast block,
backup validator will broadcast their blocks and get votes.

core/vote/vote_manager.go Outdated Show resolved Hide resolved
core/vote/vote_manager.go Outdated Show resolved Hide resolved
core/vote/vote_manager.go Outdated Show resolved Hide resolved
@zzzckck zzzckck merged commit c96fab0 into bnb-chain:develop Jul 11, 2024
7 checks passed
@NathanBSC NathanBSC deleted the not_vote_too_late branch July 12, 2024 08:38
jingjunLi added a commit to jingjunLi/bsc that referenced this pull request Jul 22, 2024
jingjunLi added a commit to jingjunLi/bsc that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants