mark out where/how AttestationData and Attestation construction are honest validator-compliant

This commit is contained in:
Dustin Brody 2020-02-21 15:06:52 +01:00 committed by tersec
parent 32872c7ee6
commit a8567cafb5
2 changed files with 2 additions and 2 deletions

View File

@ -306,6 +306,7 @@ proc getAttestationsForBlock*(
for a in slotData.attestations:
var
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/specs/phase0/validator.md#construct-attestation
attestation = Attestation(
aggregation_bits: a.validations[0].aggregation_bits,
data: a.data,

View File

@ -553,8 +553,6 @@ func makeAttestationData*(
## `state` is the state corresponding to the `beacon_block_root` advanced to
## the slot we're attesting to.
## https://github.com/ethereum/eth2.0-specs/blob/v0.8.4/specs/validator/0_beacon-chain-validator.md#construct-attestation
let
current_epoch = get_current_epoch(state)
start_slot = compute_start_slot_at_epoch(current_epoch)
@ -564,6 +562,7 @@ func makeAttestationData*(
doAssert slot.compute_epoch_at_slot == current_epoch
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/specs/phase0/validator.md#attestation-data
AttestationData(
slot: slot,
index: committee_index,