mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 06:13:31 +00:00
Merge pull request #2925 from fradamt/patch-3
fix typo and specify something
This commit is contained in:
commit
0ba5b3b5c5
@ -260,7 +260,7 @@ A validator should plan for future assignments by noting their assigned attestat
|
|||||||
slot and joining the committee index attestation subnet related to their committee assignment.
|
slot and joining the committee index attestation subnet related to their committee assignment.
|
||||||
|
|
||||||
Specifically a validator should:
|
Specifically a validator should:
|
||||||
* Call `get_committee_assignment(state, next_epoch, validator_index)` when checking for next epoch assignments.
|
* Call `_, committee_index, _ = get_committee_assignment(state, next_epoch, validator_index)` when checking for next epoch assignments.
|
||||||
* Calculate the committees per slot for the next epoch: `committees_per_slot = get_committee_count_per_slot(state, next_epoch)`
|
* Calculate the committees per slot for the next epoch: `committees_per_slot = get_committee_count_per_slot(state, next_epoch)`
|
||||||
* Calculate the subnet index: `subnet_id = compute_subnet_for_attestation(committees_per_slot, slot, committee_index)`
|
* Calculate the subnet index: `subnet_id = compute_subnet_for_attestation(committees_per_slot, slot, committee_index)`
|
||||||
* Find peers of the pubsub topic `beacon_attestation_{subnet_id}`.
|
* Find peers of the pubsub topic `beacon_attestation_{subnet_id}`.
|
||||||
@ -510,7 +510,7 @@ Finally, the validator broadcasts `attestation` to the associated attestation su
|
|||||||
|
|
||||||
The `subnet_id` for the `attestation` is calculated with:
|
The `subnet_id` for the `attestation` is calculated with:
|
||||||
- Let `committees_per_slot = get_committee_count_per_slot(state, attestation.data.target.epoch)`.
|
- Let `committees_per_slot = get_committee_count_per_slot(state, attestation.data.target.epoch)`.
|
||||||
- Let `subnet_id = compute_subnet_for_attestation(committees_per_slot, attestation.data.slot, attestation.data.committee_index)`.
|
- Let `subnet_id = compute_subnet_for_attestation(committees_per_slot, attestation.data.slot, attestation.data.index)`.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def compute_subnet_for_attestation(committees_per_slot: uint64, slot: Slot, committee_index: CommitteeIndex) -> uint64:
|
def compute_subnet_for_attestation(committees_per_slot: uint64, slot: Slot, committee_index: CommitteeIndex) -> uint64:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user