mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 19:54:34 +00:00
proto pr feedback
This commit is contained in:
parent
fbcc2a4870
commit
58c28349de
@ -192,8 +192,7 @@ def on_attestation(store: Store, attestation: Attestation) -> None:
|
|||||||
|
|
||||||
# Attestations can only affect the fork choice of subsequent slots.
|
# Attestations can only affect the fork choice of subsequent slots.
|
||||||
# Delay consideration in the fork choice until their slot is in the past.
|
# Delay consideration in the fork choice until their slot is in the past.
|
||||||
attestation_slot = attestation.data.slot
|
assert store.time >= (attestation.data.slot + 1) * SECONDS_PER_SLOT
|
||||||
assert store.time >= (attestation_slot + 1) * SECONDS_PER_SLOT
|
|
||||||
|
|
||||||
# Get state at the `target` to validate attestation and calculate the committees
|
# Get state at the `target` to validate attestation and calculate the committees
|
||||||
indexed_attestation = get_indexed_attestation(target_state, attestation)
|
indexed_attestation = get_indexed_attestation(target_state, attestation)
|
||||||
|
@ -285,6 +285,11 @@ First, the validator should construct `attestation_data`, an [`AttestationData`]
|
|||||||
- Let `head_block` be the result of running the fork choice during the assigned slot.
|
- Let `head_block` be the result of running the fork choice during the assigned slot.
|
||||||
- Let `head_state` be the state of `head_block` processed through any empty slots up to the assigned slot using `process_slots(state, slot)`.
|
- Let `head_state` be the state of `head_block` processed through any empty slots up to the assigned slot using `process_slots(state, slot)`.
|
||||||
|
|
||||||
|
##### General
|
||||||
|
|
||||||
|
* Set `attestation_data.slot = slot` where `slot` is the assigned slot.
|
||||||
|
* Set `attestation_data.index = index` where `index` is the index associated with the validator's committee.
|
||||||
|
|
||||||
##### LMD GHOST vote
|
##### LMD GHOST vote
|
||||||
|
|
||||||
Set `attestation_data.beacon_block_root = signing_root(head_block)`.
|
Set `attestation_data.beacon_block_root = signing_root(head_block)`.
|
||||||
@ -299,10 +304,6 @@ Set `attestation_data.beacon_block_root = signing_root(head_block)`.
|
|||||||
- Let `start_slot = compute_start_slot_of_epoch(get_current_epoch(head_state))`.
|
- Let `start_slot = compute_start_slot_of_epoch(get_current_epoch(head_state))`.
|
||||||
- Let `epoch_boundary_block_root = signing_root(head_block) if start_slot == head_state.slot else get_block_root(state, start_slot)`.
|
- Let `epoch_boundary_block_root = signing_root(head_block) if start_slot == head_state.slot else get_block_root(state, start_slot)`.
|
||||||
|
|
||||||
##### Index
|
|
||||||
|
|
||||||
Set `attestation_data.index = index` where `index` is the index associated with the validator's committee.
|
|
||||||
|
|
||||||
#### Construct attestation
|
#### Construct attestation
|
||||||
|
|
||||||
Next, the validator creates `attestation`, an [`Attestation`](../core/0_beacon-chain.md#attestation) object.
|
Next, the validator creates `attestation`, an [`Attestation`](../core/0_beacon-chain.md#attestation) object.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user