You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current honest validator spec's attester section, we see the following:
Epoch boundary root
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(head.slot).
Note: This can be looked up in the state using get_block_root(state, get_epoch_start_slot(head.slot)).
Justified block root
Set attestation_data.justified_block_root = hash_tree_root(justified_block) where justified_block is the block at state.justified_epoch in the chain defined by head.
Note: This can be looked up in the state using get_block_root(state, justified_epoch).
The above does not make much sense, as get_epoch_start_slot is defined in terms of epochs, not slots, as epoch * EPOCH_LENGTH, but want we want here instead is to get the start slot of the epoch boundary defined by the canonical head, so instead we can do get_epoch_start_slot(closest_epoch_boundary(head.Slot)). Similarly for the justified block root, it should be get_epoch_start_slot(state.justified_epoch) instead.
See our Github gist for our implementation of this logic in Prysm.
Right, we changed get_epoch_start_slot to take an epoch instead of a slot when we moved epochs to being more important. Looks like this can be fixed by ensuring we get the epoch of the slot in question and pass it to get_epoch_start_slot in both cases, correct?
In the current honest validator spec's attester section, we see the following:
Epoch boundary root
Set
attestation_data.epoch_boundary_root = hash_tree_root(epoch_boundary)
whereepoch_boundary
is the block at the most recent epoch boundary in the chain defined byhead
-- i.e. theBeaconBlock
whereblock.slot == get_epoch_start_slot(head.slot)
.Note: This can be looked up in the state using
get_block_root(state, get_epoch_start_slot(head.slot))
.Justified block root
Set
attestation_data.justified_block_root = hash_tree_root(justified_block)
wherejustified_block
is the block atstate.justified_epoch
in the chain defined byhead
.Note: This can be looked up in the state using
get_block_root(state, justified_epoch)
.The above does not make much sense, as get_epoch_start_slot is defined in terms of epochs, not slots, as
epoch * EPOCH_LENGTH
, but want we want here instead is to get the start slot of the epoch boundary defined by the canonical head, so instead we can doget_epoch_start_slot(closest_epoch_boundary(head.Slot))
. Similarly for the justified block root, it should beget_epoch_start_slot(state.justified_epoch)
instead.See our Github gist for our implementation of this logic in Prysm.
https://gist.github.com/rauljordan/d4e57afb63e8caea4333ebe3e4d3588c
The text was updated successfully, but these errors were encountered: