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

Fix calculation of total network power in small networks #266

Closed
anorth opened this issue Apr 2, 2020 · 1 comment · Fixed by #615
Closed

Fix calculation of total network power in small networks #266

anorth opened this issue Apr 2, 2020 · 1 comment · Fixed by #615
Assignees
Labels
bug Something isn't working P1 High priority, required for basic network functionality and growth

Comments

@anorth
Copy link
Member

anorth commented Apr 2, 2020

#236 and #238 changed the value of the power actor's TotalNetworkPower to be only the sum of power of those actors that individually meet the consensus power minimum (b/c that's the denominator desired for elections, etc). This breaks calculations when no miner is above the minimum and hence total power is zero.

By chance, things are working at the moment because both implementations write non-zero total power into the power actor state in genesis even when no miner meets the minimum, and both also fail to validate that block miners have power exceeding this minimum. See minerNominalPowerMeetsConsensusMinimum for how that was intended to work.

Two possible solution paths:

  • track both the total power of above-threshold actors and the total sum of claims, and use the "right" one as denominator depending on whether some small number of miners have crossed the threshold
  • detect the threshold crossing on-chain and recalculate the total network power when that threshold is crossed, excluding the below-threshold power
@anorth
Copy link
Member Author

anorth commented Jun 29, 2020

Consider also tracking the count of all miners and miners above the threshold separately.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 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