Skip to content

Commit

Permalink
Merge pull request #502 from ethereum/hwwhww/per_block
Browse files Browse the repository at this point in the history
Update `Beacon chain state transition function` chapter intro
  • Loading branch information
djrtwo authored Jan 28, 2019
2 parents a249ab4 + 6bad4ed commit d703eb3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,12 +779,13 @@ def lmd_ghost(store: Store, start_state: BeaconState, start_block: BeaconBlock)

## Beacon chain state transition function

We now define the state transition function. At a high level the state transition is made up of two parts:
We now define the state transition function. At a high level the state transition is made up of three parts:

1. The per-slot transitions, which happens every slot, and only affects a parts of the `state`.
2. The per-epoch transitions, which happens in the last slot of every epoch (i.e. `(state.slot + 1) % EPOCH_LENGTH == 0`), and affects the entire `state`.
1. The per-slot transitions, which happens every slot.
2. The per-block transitions, which happens at every block.
3. The per-epoch transitions, which happens at every epoch boundary (i.e. `(state.slot + 1) % EPOCH_LENGTH == 0`).

The per-slot transitions generally focus on verifying aggregate signatures and saving temporary records relating to the per-slot activity in the `BeaconState`. 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`; 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.

### Helper functions

Expand Down

0 comments on commit d703eb3

Please sign in to comment.