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(consensus): improve consensus alghorithm #1329

Merged
merged 7 commits into from
Jun 9, 2024

Conversation

b00f
Copy link
Collaborator

@b00f b00f commented Jun 8, 2024

Description

This PR enhances the consensus algorithm in the following ways:

  • Reduces the ChangeProposerTimeout to 5 seconds and increases ChangeProposerDelta to 5 seconds. This allows the proposer change to start one second earlier and the next proposer change to start one second later.
  • Moves the basic check for proposals to the consensus phase. This optimization benefits nodes that are not part of the committee.
  • Adds the round to the query proposal message. This ensures that messages with expired rounds are ignored.
  • When a validator sees a proper and justified "Decided" vote, it moves the consensus to the vote's round, even if it is a prior round.
  • The proposer responds to the query-proposal message. This helps to reduce the number of consensus messages.

Copy link

codecov bot commented Jun 9, 2024

Codecov Report

Attention: Patch coverage is 86.30137% with 20 lines in your changes missing coverage. Please review.

Project coverage is 76.64%. Comparing base (20e991a) to head (4fc2ca8).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1329      +/-   ##
==========================================
+ Coverage   76.05%   76.64%   +0.58%     
==========================================
  Files         206      231      +25     
  Lines       10672    11788    +1116     
==========================================
+ Hits         8117     9035     +918     
- Misses       2169     2335     +166     
- Partials      386      418      +32     

@themantre themantre merged commit d419154 into pactus-project:main Jun 9, 2024
12 checks passed
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