Skip to content

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

Merged
zzzckck merged 3 commits intobnb-chain:developfrom
NathanBSC:not_vote_too_late
Jul 11, 2024
Merged

core/vote: not vote if too late for next in turn validator#2568
zzzckck merged 3 commits intobnb-chain:developfrom
NathanBSC:not_vote_too_late

Conversation

@NathanBSC
Copy link
Copy Markdown
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 force-pushed the not_vote_too_late branch from d8b3f06 to a12d80d Compare July 8, 2024 10:40
@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
@NathanBSC NathanBSC force-pushed the not_vote_too_late branch from a12d80d to 4088e4e Compare July 8, 2024 10:49
@zzzckck
Copy link
Copy Markdown
Collaborator

zzzckck commented Jul 9, 2024

this may encourage validators to delay broadcast block?

@NathanBSC
Copy link
Copy Markdown
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.

@buddh0 buddh0 force-pushed the not_vote_too_late branch from 4088e4e to 8c0d391 Compare July 10, 2024 09:56
@zzzckck zzzckck merged commit c96fab0 into bnb-chain:develop Jul 11, 2024
@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