-
Notifications
You must be signed in to change notification settings - Fork 290
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
Improve Consensus logic for Multi-BLS Validators with quorum #4799
Conversation
@GheisMohammadi i am good with that PR. Can you do run the same logic with Line 124 in 3b6fde4
return when the leader node already has quorum on the first onPrepare. Goal is to run didReachPrepareQuorum Line 188 in 3b6fde4
|
3b6fde4
to
c6518ec
Compare
done |
could you add PR description, and is this something we can write unit test (for onPrepare and onCommit) here as well ? |
@Frozen please review/approve |
@GheisMohammadi please update PR description |
done |
updated this PR to "ready for review" |
should i run it with make debug-multi-bls or debug-ext or debug? |
@Frozen you should run it with debug-multi-bls as it fixes a bug that only happens when using multi-bls and when the harmony node have quorum |
rebase pls branch on dev |
2ac0a9d
to
2b466b1
Compare
Issue
This PR improves the consensus logic to handle cases where validators with multiple BLS keys achieve quorum on their initial signatures or commits. Currently, such scenarios can block phase transitions because the condition
if !quorumWasMet && quorumIsMet
doesn't account for quorum being achieved immediately.To fix this, a new function,
checkFirstReceivedSignature
, is introduced. It checks whether quorum is reached on the first batch of signatures or commits. The PR also updates the logic forPrepare
andCommit
phases to properly handle these edge cases. The PR helps to better handling of multi-BLS key validators while maintaining compatibility with single-key setups.