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

fix: waiting for proposal in pre-commit phase #486

Merged
merged 4 commits into from
May 27, 2023

Conversation

b00f
Copy link
Collaborator

@b00f b00f commented May 26, 2023

Description

This pull request addresses a situation observed in the Testnet where certain nodes with slow connections become absentees in the certificate. This occurs when they receive block announcements before entering the pre-commit phase, possibly due to late proposals or votes.

To address this issue, the following changes have been made:

  • When there are sufficient pre-commit votes but no proposal, the system now waits to receive the proposal before proceeding.
  • If a proposal is received after committing a block, it is now accepted.
  • If timeout expires in pre-commit phase, we move to the change-proposer phase.

These scenarios are covered by tests, and also been tested using TLA+ to ensure its correctness.

@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #486 (060a2c8) into main (24442b8) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #486      +/-   ##
==========================================
- Coverage   82.44%   82.37%   -0.07%     
==========================================
  Files         150      150              
  Lines        7059     7071      +12     
==========================================
+ Hits         5820     5825       +5     
- Misses        945      953       +8     
+ Partials      294      293       -1     

consensus/consensus.go Show resolved Hide resolved
consensus/precommit.go Show resolved Hide resolved
@b00f b00f mentioned this pull request May 27, 2023
consensus/consensus.go Outdated Show resolved Hide resolved
@themantre themantre enabled auto-merge (squash) May 27, 2023 17:24
@themantre themantre merged commit efdf5e4 into pactus-project:main May 27, 2023
@b00f b00f deleted the consensus-late-proposal branch May 28, 2023 08:36
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.

2 participants