mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 13:06:34 +00:00
minor comments resolved from hww
This commit is contained in:
parent
58c28349de
commit
d5a2535f98
@ -878,12 +878,10 @@ def get_beacon_committee(state: BeaconState, slot: Slot, index: CommitteeIndex)
|
||||
"""
|
||||
epoch = compute_epoch_at_slot(slot)
|
||||
committees_per_slot = get_committee_count_at_slot(state, slot)
|
||||
epoch_offset = index + (slot % SLOTS_PER_EPOCH) * committees_per_slot
|
||||
|
||||
return compute_committee(
|
||||
indices=get_active_validator_indices(state, epoch),
|
||||
seed=get_seed(state, epoch, DOMAIN_BEACON_ATTESTER),
|
||||
index=epoch_offset,
|
||||
index=(slot % SLOTS_PER_EPOCH) * committees_per_slot + index,
|
||||
count=committees_per_slot * SLOTS_PER_EPOCH,
|
||||
)
|
||||
```
|
||||
@ -1300,10 +1298,10 @@ def process_rewards_and_penalties(state: BeaconState) -> None:
|
||||
if get_current_epoch(state) == GENESIS_EPOCH:
|
||||
return
|
||||
|
||||
rewards1, penalties1 = get_attestation_deltas(state)
|
||||
rewards, penalties = get_attestation_deltas(state)
|
||||
for index in range(len(state.validators)):
|
||||
increase_balance(state, ValidatorIndex(index), rewards1[index])
|
||||
decrease_balance(state, ValidatorIndex(index), penalties1[index])
|
||||
increase_balance(state, ValidatorIndex(index), rewards[index])
|
||||
decrease_balance(state, ValidatorIndex(index), penalties[index])
|
||||
```
|
||||
|
||||
#### Registry updates
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
| Name | Value | Unit | Duration
|
||||
| - | - | - | - |
|
||||
| `MAX_EPOCHS_PER_CROSSLINK` | `2**6` (= 64) | epochs | ~7 hours |
|
||||
| `MAX_SHARD_RECEIPT_PROOFS` | `2**0` (= 1) | - | - |
|
||||
| `PERIOD_COMMITTEE_ROOT_LENGTH` | `2**8` (= 256) | periods | ~9 months |
|
||||
| `MINOR_REWARD_QUOTIENT` | `2**8` (=256) | - | - |
|
||||
|
Loading…
x
Reference in New Issue
Block a user