Skip to content

[Fix] Fix quorum check for round advancement.#3617

Merged
vicsn merged 1 commit intoProvableHQ:stagingfrom
acoglio:fix-round-advance-quorum
Jun 4, 2025
Merged

[Fix] Fix quorum check for round advancement.#3617
vicsn merged 1 commit intoProvableHQ:stagingfrom
acoglio:fix-round-advance-quorum

Conversation

@acoglio
Copy link
Contributor

@acoglio acoglio commented Apr 29, 2025

When deciding whether to advance from round R to R+1, this must check whether a quorum of certificates exists at round R, not R+1.

This is just one of several ways in which a validator can advance its round, which is why this issue may have been "masked".

When deciding whether to advance from round `R` to `R+1`, this must check
whether a quorum of certificates exists at round `R`, not `R+1`.

This is just one of several ways in which a validator can advance its round,
which is why this issue may have been "masked".
@acoglio acoglio requested review from kaimast and raychu86 April 29, 2025 16:36
@kaimast
Copy link
Contributor

kaimast commented Apr 30, 2025

This looks fine. However, I think when finding potential bugs in the consensus layer, there should be an actual unit/integration test that fails before the fix.

Have you thought about if/how this could be tested?

@kaimast
Copy link
Contributor

kaimast commented Jun 3, 2025

I am approving the PR. We will think about how to improve testing for primary's state in the future.

@kaimast
Copy link
Contributor

kaimast commented Jun 3, 2025

@raychu86 do you want to take another look before I merge this?

Copy link
Collaborator

@raychu86 raychu86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like be able to test these properties more concretely, but this seems correct.

I believe the previous logic was safe due to the BFT properties, but didn't fully assist in maintaining the liveness because of the off-by-one.

@vicsn vicsn merged commit 2a08aa7 into ProvableHQ:staging Jun 4, 2025
2 checks passed
@acoglio acoglio deleted the fix-round-advance-quorum branch June 5, 2025 02:38
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.

5 participants