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

Simplify miner deadline state to rely on cron every epoch #992

Open
anorth opened this issue Aug 18, 2020 · 1 comment
Open

Simplify miner deadline state to rely on cron every epoch #992

anorth opened this issue Aug 18, 2020 · 1 comment
Labels
change-state Changes state schema, necessitating major version upgrade/migration cleanup Technical debt recovery and other cleanup work P2 Medium priority, beneficial for network functionality and growth robustness Related to correctness

Comments

@anorth
Copy link
Member

anorth commented Aug 18, 2020

The miner actor maintains a deadline index in state, but the current deadline can also be inferred from the current epoch. The deadline exists in state because previously, when cron was not invoked for empty tipsets, the miner needed to track which deadline had been processed by cron (e.g. to detect a missed PoSt). With a reliable cron, the miner can instead assume that cron is for the "current" deadline. While this extra robusness isn't bad, it is confusing, especially to people not familiar with the old behaviour. I propose we remove the unnecessary complexity.

Related to #877, simplifying the power actor. After this, the power actor can reject events "in the past".

Doing this will make #658 redundant.

@anorth anorth added cleanup Technical debt recovery and other cleanup work P2 Medium priority, beneficial for network functionality and growth robustness Related to correctness labels Aug 18, 2020
@anorth anorth added the change-state Changes state schema, necessitating major version upgrade/migration label Oct 18, 2020
@ZenGround0 ZenGround0 added this to the 🧡 v3 milestone Oct 28, 2020
@anorth anorth removed this from the 🧡 v3 milestone Jan 19, 2021
@ZenGround0 ZenGround0 mentioned this issue Apr 8, 2021
28 tasks
@ZenGround0
Copy link
Contributor

ZenGround0 commented Apr 14, 2021

Similarly we can rename ProvingPeriodStart to something like "FirstProvingPeriodStart" and stop updating it since only this value mod the ProvingPeriod is needed for fully deriving the current deadline.

Counter argument against doing this: it can be nice for more advanced users of miner state to look at these numbers to follow along with deadline progress. For example @acruikshank and I found them useful when debugging the CC upgrade and fault cron failures during space race.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
change-state Changes state schema, necessitating major version upgrade/migration cleanup Technical debt recovery and other cleanup work P2 Medium priority, beneficial for network functionality and growth robustness Related to correctness
Projects
None yet
Development

No branches or pull requests

2 participants