Add a SlotUpkeep
type to enforce dependencies between rules
#75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to ensure that the
Slot
rule only fires if all our block production duties are completed. To do this, I've added a set that keeps track of these to the state and adjusted the rules so that they can only fire one per slot. Then,Slot
checks that all duties are indeed completed. This means that if we can't produce anything, we still need to update the state to not get stuck, which is why there are now negative versions of some rules.While doing this, I noticed that we're not keeping the state of the base chain in our state and instead always universally quantifying over all those states. I fixed that too.