mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 06:13:31 +00:00
Apply suggestions from code review
Co-authored-by: danny <dannyjryan@gmail.com>
This commit is contained in:
parent
e5e50e3e40
commit
26d3fa3efd
@ -87,7 +87,7 @@ EJECTION_BALANCE: 16000000000
|
|||||||
MIN_PER_EPOCH_CHURN_LIMIT: 4
|
MIN_PER_EPOCH_CHURN_LIMIT: 4
|
||||||
# 2**16 (= 65,536)
|
# 2**16 (= 65,536)
|
||||||
CHURN_LIMIT_QUOTIENT: 65536
|
CHURN_LIMIT_QUOTIENT: 65536
|
||||||
# [New in Deneb:EIP7514] 2**3 (=8)
|
# [New in Deneb:EIP7514] 2**3 (= 8)
|
||||||
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8
|
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8
|
||||||
|
|
||||||
# Fork choice
|
# Fork choice
|
||||||
|
@ -82,7 +82,7 @@ INACTIVITY_SCORE_BIAS: 4
|
|||||||
INACTIVITY_SCORE_RECOVERY_RATE: 16
|
INACTIVITY_SCORE_RECOVERY_RATE: 16
|
||||||
# 2**4 * 10**9 (= 16,000,000,000) Gwei
|
# 2**4 * 10**9 (= 16,000,000,000) Gwei
|
||||||
EJECTION_BALANCE: 16000000000
|
EJECTION_BALANCE: 16000000000
|
||||||
# [customized]
|
# [customized] more easily demonstrate the difference between this value and the activation churn limit
|
||||||
MIN_PER_EPOCH_CHURN_LIMIT: 2
|
MIN_PER_EPOCH_CHURN_LIMIT: 2
|
||||||
# [customized] scale queue churn at much lower validator counts for testing
|
# [customized] scale queue churn at much lower validator counts for testing
|
||||||
CHURN_LIMIT_QUOTIENT: 32
|
CHURN_LIMIT_QUOTIENT: 32
|
||||||
|
@ -440,7 +440,7 @@ def process_voluntary_exit(state: BeaconState, signed_voluntary_exit: SignedVolu
|
|||||||
|
|
||||||
#### Registry updates
|
#### Registry updates
|
||||||
|
|
||||||
*Note*: The function `process_registry_updates` is modified to utilize `get_validator_activation_churn_limit()` the rate limit the activation queue for EIP-7514.
|
*Note*: The function `process_registry_updates` is modified to utilize `get_validator_activation_churn_limit()` to rate limit the activation queue for EIP-7514.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def process_registry_updates(state: BeaconState) -> None:
|
def process_registry_updates(state: BeaconState) -> None:
|
||||||
@ -461,7 +461,7 @@ def process_registry_updates(state: BeaconState) -> None:
|
|||||||
if is_eligible_for_activation(state, validator)
|
if is_eligible_for_activation(state, validator)
|
||||||
# Order by the sequence of activation_eligibility_epoch setting and then index
|
# Order by the sequence of activation_eligibility_epoch setting and then index
|
||||||
], key=lambda index: (state.validators[index].activation_eligibility_epoch, index))
|
], key=lambda index: (state.validators[index].activation_eligibility_epoch, index))
|
||||||
# Dequeued validators for activation up to churn limit
|
# Dequeued validators for activation up to activation churn limit
|
||||||
# [Modified in Deneb:EIP7514]
|
# [Modified in Deneb:EIP7514]
|
||||||
for index in activation_queue[:get_validator_activation_churn_limit(state)]:
|
for index in activation_queue[:get_validator_activation_churn_limit(state)]:
|
||||||
validator = state.validators[index]
|
validator = state.validators[index]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user