clean up state transition notes

This commit is contained in:
Danny Ryan
2019-03-07 13:36:22 -07:00
parent d00353534d
commit e57bfaab7c

View File

@@ -1667,14 +1667,15 @@ We now define the state transition function. At a high level the state transitio
3. The per-slot transitions, which happens at every slot.
4. The per-block transitions, which happens at every block.
The state-root caching, caches the state root of the previous slot;
The per-epoch transitions focus on the [validator](#dfn-validator) registry, including adjusting balances and activating and exiting [validators](#dfn-validator), as well as processing crosslinks and managing block justification/finalization;
The per-slot transitions focus on the slot counter and block roots records updates;
The per-block transitions generally focus on verifying aggregate signatures and saving temporary records relating to the per-block activity in the `BeaconState`.
Transition section notes:
* The state-root caching, caches the state root of the previous slot;
* The per-epoch transitions focus on the [validator](#dfn-validator) registry, including adjusting balances and activating and exiting [validators](#dfn-validator), as well as processing crosslinks and managing block justification/finalization;
* The per-slot transitions focus on the slot counter and block roots records updates;
* The per-block transitions generally focus on verifying aggregate signatures and saving temporary records relating to the per-block activity in the `BeaconState`.
Beacon blocks that trigger unhandled Python exceptions (e.g. out-of-range list accesses) and failed `assert`s during the state transition are considered invalid.
_Note_: If there are skipped slots between a block and its parent block, run the steps in the [per-epoch](#per-epoch-processing) and [per-slot](#per-slot-processing) sections once for each skipped slot and then once for the slot containing the new block.
_Note_: If there are skipped slots between a block and its parent block, run the steps in the [state-root](#state-root-caching), [per-epoch](#per-epoch-processing), and [per-slot](#per-slot-processing) sections once for each skipped slot and then once for the slot containing the new block.
### State-root caching