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

Add pre-conditions to candidate limits and slot limits enforcing size #341

Open
joshuahannan opened this issue Feb 1, 2023 · 0 comments
Assignees
Labels
Feedback good first issue Good for newcomers help wanted Extra attention is needed SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board

Comments

@joshuahannan
Copy link
Member

Issue To Be Solved

In general, we expect that:

the candidate limit exceeds the slot limit by a large margin (probably about an order of magnitude)
the number of new approved nodes is small relative to the difference between slot limit and candidate limit
In addition, nodes which are already staked do not take up candidate spots.

Suggest A Solution

It would be more useful to enforce some logical consistency in the two setter functions:

setSlotLimits panics if a slot limit is set higher than the candidate limit
setCandidateNodeLimit panics if a slot limit is set higher than the candidate limit

Need tests to test positive and negative cases

@joshuahannan joshuahannan self-assigned this Feb 1, 2023
@joshuahannan joshuahannan added good first issue Good for newcomers help wanted Extra attention is needed SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board and removed Feature labels Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback good first issue Good for newcomers help wanted Extra attention is needed SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board
Projects
Status: 🧊 Backlog
Development

No branches or pull requests

1 participant