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: distributed pledging exit when quorum count is <7 #193

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

thewebchap
Copy link
Member

@thewebchap thewebchap commented Jul 18, 2024

A fix for #173 when noBalanceQuorumCount check is done with quorum count 5 or 6.

Explanation

noBalanceQuorumCount is initialised to zero and incremented each time a quorum doesn't have enough tokens to pledge. Rubix PBFT consensus requires 5 nodes to pledge and hence as soon as noBalanceQuorumCount reaches greater than 2 , sender exit. The problem is when there are only 5 or 6 quorum nodes where in such situtaions , we should exit as soon as we realise we will not have 5 nodes that can pledge. Currently the sender wait 300 seconds before exiting with a different error code.

Fix

Initialise noBalanceQuorumCount to QuorumRequired - len(cr.QuorumList)

cr.QuorumList noBalanceQuorumCount
7 0
6 1
5 2

PS : Also renaming quorumCount in quorum.go to quorumAddrCount to avoid naming confusion.

@thewebchap thewebchap requested review from vaishnav-ch and gklps July 18, 2024 08:40
@thewebchap thewebchap changed the title fix for quorum length 5 to 7 fix: distributed pledging exit when quorum count is <7 Jul 18, 2024
@thewebchap thewebchap self-assigned this Jul 18, 2024
@thewebchap thewebchap merged commit b98e084 into development Jul 18, 2024
3 checks passed
@thewebchap thewebchap deleted the hari/distribured-pledging-fix branch August 5, 2024 03:55
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