Fix comments in j/f tests + add a readme for scaled image

This commit is contained in:
Mamy André-Ratsimbazafy 2019-08-28 16:22:48 +02:00
parent ca4f29caca
commit cfcdfff54a
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
2 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1,5 @@
# Epoch state transition
## Finalization and justification
![](eth2-finalization.png)

View File

@ -115,7 +115,7 @@ proc finalizeOn23(state: var BeaconState, epoch: Epoch, sufficient_support: bool
doAssert state.finalized_checkpoint == old_finalized # no new finalized checkpoint
proc finalizeOn123(state: var BeaconState, epoch: Epoch, sufficient_support: bool) =
## Check finalization on rule 2 "23"
## Check finalization on rule 3 "123"
doAssert epoch > 5
state.slot = Slot((epoch * SLOTS_PER_EPOCH) - 1) # Skip ahead to just before epoch
@ -168,7 +168,7 @@ proc finalizeOn123(state: var BeaconState, epoch: Epoch, sufficient_support: boo
doAssert state.finalized_checkpoint == old_finalized # no new finalized checkpoint
proc finalizeOn12(state: var BeaconState, epoch: Epoch, sufficient_support: bool) =
## Check finalization on rule 2 "23"
## Check finalization on rule 4 "12"
doAssert epoch > 2
state.slot = Slot((epoch * SLOTS_PER_EPOCH) - 1) # Skip ahead to just before epoch