mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 04:24:05 +00:00
mark out where/how AttestationData and Attestation construction are honest validator-compliant
This commit is contained in:
parent
32872c7ee6
commit
a8567cafb5
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user