Add self-consistency check to attestation gossip validation

This commit is contained in:
lsankar4033 2020-07-28 17:51:32 -07:00
parent f6da7323fe
commit 3a0dd2b253
1 changed files with 2 additions and 0 deletions

View File

@ -403,6 +403,8 @@ The following validations MUST pass before forwarding the `attestation` on the s
- _[REJECT]_ The current `finalized_checkpoint` is an ancestor of the `block` defined by `attestation.data.beacon_block_root` -- i.e.
`get_ancestor(store, attestation.data.beacon_block_root, compute_start_slot_at_epoch(store.finalized_checkpoint.epoch))
== store.finalized_checkpoint.root`
- _[REJECT]_ The attestation's epoch matches its target -- i.e. `attestation.data.target.epoch ==
compute_epoch_at_slot(attestation.data.slot)`