fix epoch boundary root per #652

This commit is contained in:
Danny Ryan 2019-02-21 15:14:59 -07:00
parent f8d073c099
commit 0f222171ca
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 3 additions and 1 deletions

View File

@ -262,7 +262,9 @@ Set `attestation_data.beacon_block_root = hash_tree_root(head)` where `head` is
Set `attestation_data.epoch_boundary_root = hash_tree_root(epoch_boundary)` where `epoch_boundary` is the block at the most recent epoch boundary in the chain defined by `head` -- i.e. the `BeaconBlock` where `block.slot == get_epoch_start_slot(slot_to_epoch(head.slot))`.
_Note:_ This can be looked up in the state using `get_block_root(state, get_epoch_start_slot(slot_to_epoch(head.slot)))`.
_Note:_ This can be looked up in the state using:
* Let `epoch_start_slot = get_epoch_start_slot(slot_to_epoch(head.slot))`. `get_block_root(state, get_epoch_start_slot(slot_to_epoch(head.slot)))`.
* Set `epoch_boundary_root = hash_tree_root(head) if epoch_start_slot == head.slot else get_block_root(state, epoch_start_slot)`.
##### Shard block root