filecoin-project / filecoin-project/specs

Execute cron actor for empty tipsets

Open
#968 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
SCSS
Stars
363
Forks
164
PR merge metrics
No merged PRs in 30d

Description

The cron actor is invoked by an implicit message at the end of every tipset, after all the messages in all the blocks in the tipset have been invoked. If there are no blocks in the tipset it is not invoked.

This non-invocation on empty tipsets is unexpected to developers who are not extremely on the ball. There have been multiple errors in the initial actors implementation that trace back to not handling non-invocation of cron on empty tipsets, including broken block reward calculations and broken miner state. While formulations that are robust to that behaviour may be desirable anyway, it will very likely be a source of bugs. Critical filecoin behaviour depends on the cron-triggered actions happening reliably. Testing all the possible states in which a non-invocation of cron could affect is a very tall order.

I propose instead that cron is invoked for each empty tipset before the blocks in a non-empty one. This will make some formulations simpler in implementation or state, and reduce the chance of bugs in others.

It would mean that a large gap in the chain would require some processing work to validate, where it currently requires nothing (although almost all work "deferred" by the gap ends up being done in the first non-empty tipset anyway, when implementations correctly handle this case).

FYI @whyrusleeping

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating the specification and implementation of cron invocation and empty-tipset validation, then trace the affected reward and miner-state behavior. Done means the proposed invocation semantics are defined and their chain-validation consequences are addressed.

Written by the indexing model from the issue text.

Assessment

Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.