From a8567cafb57edcdf5152c08f27128f5e8cb56cd8 Mon Sep 17 00:00:00 2001 From: Dustin Brody Date: Fri, 21 Feb 2020 15:06:52 +0100 Subject: [PATCH] mark out where/how AttestationData and Attestation construction are honest validator-compliant --- beacon_chain/attestation_pool.nim | 1 + beacon_chain/spec/beaconstate.nim | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_chain/attestation_pool.nim b/beacon_chain/attestation_pool.nim index e535295d5..2dbc4ee9c 100644 --- a/beacon_chain/attestation_pool.nim +++ b/beacon_chain/attestation_pool.nim @@ -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, diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index a166df490..2ba21e968 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -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,