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

Miner eligibility check does not check for min miner size #1102

Closed
nicola opened this issue Sep 5, 2020 · 1 comment · Fixed by #1122
Closed

Miner eligibility check does not check for min miner size #1102

nicola opened this issue Sep 5, 2020 · 1 comment · Fixed by #1122
Assignees
Labels
P1 High priority, required for basic network functionality and growth
Milestone

Comments

@nicola
Copy link
Contributor

nicola commented Sep 5, 2020

As I explain in this comment filecoin-project/lotus#3378 (comment), there are three checks to be done by lotus:

  • Check that miner is valid at current epoch
  • Check that miner is eligible at current epoch
  • Check that miner had min miner size at WinningPoStSectorSet lookback

Check 1 and 3 are currently already integrated in lotus, check 2 must be added (filecoin-project/lotus#3378 is tracking this addition).

Check 2 should not check min miner size (hence these lines should be removed)

Why? Eligibility and validity check are not related to power accounting, but to debts and faults. Anything related to power accounting must happen with the lookback.

@anorth anorth added the P1 High priority, required for basic network functionality and growth label Sep 7, 2020
@anorth
Copy link
Member

anorth commented Sep 7, 2020

@nicola expresses this slightly differently to how I think we should implement it. We want to abstract the details of which checks are required at which epoch. I don't understand the difference between "validity" and "eligibility", and suggest that there isn't one worth making.

Implement two functions:

  • MinerEligibleForElection that tests all the predicates relevant at the epoch of the election
    • Remove the call to MinerNominalPowerMeetsConsensusMinimum
    • Add a check that the miner has a non-empty claim
    • Retain checks on debt, consensus-fault-free etc
  • MinerEligibleAtElectionLookback that tests all predicates relevant at the WinningPoSt lookback
    • Implement a new function
    • Call MinerNominalPowerMeetsConsensusMinimum

See also this spec draft.

@anorth anorth added this to the 💙 Mainnet milestone Sep 7, 2020
@anorth anorth assigned anorth and unassigned acruikshank Sep 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 High priority, required for basic network functionality and growth
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants