Skip to content

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

Open
@joshuahannan

Description

@joshuahannan

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

Metadata

Metadata

Assignees

Labels

FeedbackSC-EngIssues that we want to see surfaced in SC-Eng ZH Boardgood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

Status

🧊 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions