Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add check on total weight and certificate threshold in verifyValidatorsUpdate in LIP 0053 #488

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

ricott1
Copy link
Contributor

@ricott1 ricott1 commented Sep 25, 2023

No description provided.

totalWeight = 0
for validator in newActiveValidators:
# The bftWeight property of each element is a positive integer.
if validator.bftWeight == 0:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check is redundant in principle, but I kept it for symmetry with LIP0043. Let me know if you prefer to remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is good to have it. Otherwise, there could maybe be the case that the total weight is 0.

Copy link
Contributor

@janhack janhack left a comment

Choose a reason for hiding this comment

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

Looks good.

@shuse2
Copy link
Collaborator

shuse2 commented Sep 25, 2023

Issue created: LiskArchive/lisk-sdk#9039

Copy link
Contributor

@janhack janhack left a comment

Choose a reason for hiding this comment

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

Editorial approval

@janhack janhack changed the title LIP0053: Add check on total weight and certificate threshold in verifyValidatorsUpdate Add check on total weight and certificate threshold in verifyValidatorsUpdate in LIP 0053 Sep 26, 2023
@janhack janhack merged commit 6bdc73c into main Sep 26, 2023
@janhack janhack deleted the ale_add_certificate_threshold_check branch September 26, 2023 10:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants