-
Notifications
You must be signed in to change notification settings - Fork 294
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
Update Quorum Check to Use GTE for Consistency #4806
base: dev
Are you sure you want to change the base?
Conversation
cb1ad64
to
db714bb
Compare
can you explain
is there any other places in the code we use GTE and not GT ? For me it's just a small detail , but in our consensus the threshold is actually 2/3 +1 not 2/3, might have been on purpose that we initially used GT and not GTE. what do you think ? |
there’s a mismatch in how the two We need to decide how quorum should work. should it include the threshold (>=) or only exceed it (>)? Usually, quorum is about meeting or surpassing a threshold (>=), so it makes sense to align both functions to that. If we agree, we just need to tweak |
ok if you ask me i would go with GT, not GTE. |
Then we need to tweak |
de4b8bc
to
366fce0
Compare
Consensus/quorum/one-node-one-vote.go is no longer used in mainnet/testnet/devnet. The only env that uses it in localnet and happens before the staking epoch |
Issue
This PR updates the
IsQuorumAchievedByMask
function in thestakedVoteWeight
struct to use GTE (greater than or equal to) instead of GT (greater than) for comparing the voting power with the quorum threshold. It ensures the consistency across all quorum checks in the codebase