onflow / onflow/flow-core-contracts

Staking Auctions: Add pre-conditions to candidate limits and slot limits enforcing size

Open
#341 3 comments 0 reactions 1 assignee View on GitHub

@joshuahannan is already working on this.

Since Feb 1, 2023.

Feedback good first issue help wanted SC-Eng
Dominant language
Cadence
Stars
93
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Issue To Be Solved

With staking auctions, we expect that:

  • The candidate limit exceeds the slot limit by a large margin (probably about an order of magnitude) because we want many node operators to be able to compete for slots each epoch when staking auctions are enabled
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.