Problem
When writing tipset-class vectors that include null rounds and verify proper reward application, we are confronted with a catch-22.
Say my starting epoch is 1, and I’m modelling the following chain history:
- epoch 1: tipset A.
- epochs 2-10: null rounds.
- epoch 11: tipset B.
To verify the rewards applied at epoch 11 (tipset B), one needs to load the state of the reward actor at epoch 10, which is a null round. This state is an intermediate state, but is not explicitly linked to a block. It must exist in the CBOR store, but it is not referenceable or discoverable.
The state of the actor at that point is generated by the StateManager
ticking cron for null rounds, and the cron jobs updating the reward policy in the reward actor.
Not even the StateGetActor
RPC call allows you to access the state of an actor in a null round.
There are ways to work around this, e.g. intercept calls to CBORStore#Put
and track the ones that carry a reward.State
argument. But ideally they'd be a higher-level solution here.
Impact
Until this is solved, it is impossible to test proper reward application in a tipset that immediately succeeds a null round.