Skip to content

Commit 3b8fd86

Browse files
Bhargavasomuhwwhww
authored andcommitted
Update Constants as per updated eth2.0 spec (#1682)
* Remove MIN_VALIDATOR_REGISTRY_CHANGE_INTERVAL constant throughout * Update INACTIVITY_PENALTY_QUOTIENT to 2**24 * Update TARGET_COMMITTEE_SIZE to 128
1 parent a2f5785 commit 3b8fd86

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

eth/beacon/state_machines/configs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
('SLOT_DURATION', int),
3535
('MIN_ATTESTATION_INCLUSION_DELAY', int),
3636
('EPOCH_LENGTH', int),
37-
('MIN_VALIDATOR_REGISTRY_CHANGE_INTERVAL', int),
3837
('POW_RECEIPT_ROOT_VOTING_PERIOD', int),
3938
('SHARD_PERSISTENT_COMMITTEE_CHANGE_PERIOD', int),
4039
('COLLECTIVE_PENALTY_CALCULATION_PERIOD', int),

eth/beacon/state_machines/forks/serenity/configs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
SERENITY_CONFIG = BeaconConfig(
88
# Misc
99
SHARD_COUNT=2**10, # (= 1,024) shards
10-
TARGET_COMMITTEE_SIZE=2**8, # (= 256) validators
10+
TARGET_COMMITTEE_SIZE=2**7, # (= 128) validators
1111
EJECTION_BALANCE=2**4, # (= 16) ETH
1212
MAX_BALANCE_CHURN_QUOTIENT=2**5, # (= 32)
1313
BEACON_CHAIN_SHARD_NUMBER=2**64 - 1,
@@ -27,7 +27,6 @@
2727
SLOT_DURATION=6, # seconds
2828
MIN_ATTESTATION_INCLUSION_DELAY=2**2, # (= 4) slots
2929
EPOCH_LENGTH=2**6, # (= 64) slots
30-
MIN_VALIDATOR_REGISTRY_CHANGE_INTERVAL=2**8, # (= 256) slots
3130
POW_RECEIPT_ROOT_VOTING_PERIOD=2**10, # (= 1,024) slots
3231
SHARD_PERSISTENT_COMMITTEE_CHANGE_PERIOD=2**17, # (= 131,072) slots
3332
COLLECTIVE_PENALTY_CALCULATION_PERIOD=2**20, # (= 1,048,576) slots
@@ -36,7 +35,7 @@
3635
BASE_REWARD_QUOTIENT=2**10, # (= 1,024)
3736
WHISTLEBLOWER_REWARD_QUOTIENT=2**9, # (= 512)
3837
INCLUDER_REWARD_QUOTIENT=2**3, # (= 8)
39-
INACTIVITY_PENALTY_QUOTIENT=2**34, # (= 17,179,869,184)
38+
INACTIVITY_PENALTY_QUOTIENT=2**24, # (= 16,777,216)
4039
# Max operations per block
4140
MAX_PROPOSER_SLASHINGS=2**4, # (= 16)
4241
MAX_CASPER_SLASHINGS=2**4, # (= 16)

tests/beacon/conftest.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,6 @@ def epoch_length():
436436
return SERENITY_CONFIG.EPOCH_LENGTH
437437

438438

439-
@pytest.fixture
440-
def min_validator_registry_change_interval():
441-
return SERENITY_CONFIG.MIN_VALIDATOR_REGISTRY_CHANGE_INTERVAL
442-
443-
444439
@pytest.fixture
445440
def pow_receipt_root_voting_period():
446441
return SERENITY_CONFIG.POW_RECEIPT_ROOT_VOTING_PERIOD

tests/beacon/state_machines/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def config(
2626
slot_duration,
2727
min_attestation_inclusion_delay,
2828
epoch_length,
29-
min_validator_registry_change_interval,
3029
pow_receipt_root_voting_period,
3130
shard_persistent_committee_change_period,
3231
collective_penalty_calculation_period,
@@ -60,7 +59,6 @@ def config(
6059
SLOT_DURATION=slot_duration,
6160
MIN_ATTESTATION_INCLUSION_DELAY=min_attestation_inclusion_delay,
6261
EPOCH_LENGTH=epoch_length,
63-
MIN_VALIDATOR_REGISTRY_CHANGE_INTERVAL=min_validator_registry_change_interval,
6462
POW_RECEIPT_ROOT_VOTING_PERIOD=pow_receipt_root_voting_period,
6563
SHARD_PERSISTENT_COMMITTEE_CHANGE_PERIOD=shard_persistent_committee_change_period,
6664
COLLECTIVE_PENALTY_CALCULATION_PERIOD=collective_penalty_calculation_period,

0 commit comments

Comments
 (0)