diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index 1b38591aa..75a34bd8a 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -56,9 +56,9 @@ EIP6110_FORK_EPOCH: 18446744073709551615 # EIP7002 EIP7002_FORK_VERSION: 0x05000000 # temporary stub EIP7002_FORK_EPOCH: 18446744073709551615 -# EIP7668 -EIP7668_FORK_VERSION: 0x05000000 # temporary stub -EIP7668_FORK_EPOCH: 18446744073709551615 +# EIP7514 +EIP7514_FORK_VERSION: 0x05000000 # temporary stub +EIP7514_FORK_EPOCH: 18446744073709551615 # WHISK WHISK_FORK_VERSION: 0x06000000 # temporary stub WHISK_FORK_EPOCH: 18446744073709551615 @@ -150,5 +150,5 @@ WHISK_EPOCHS_PER_SHUFFLING_PHASE: 256 # `Epoch(2)` WHISK_PROPOSER_SELECTION_GAP: 2 -# EIP7668 +# EIP7514 MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 12 diff --git a/configs/minimal.yaml b/configs/minimal.yaml index edfb0f7e8..368e71c17 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -55,9 +55,9 @@ EIP6110_FORK_EPOCH: 18446744073709551615 # EIP7002 EIP7002_FORK_VERSION: 0x05000001 EIP7002_FORK_EPOCH: 18446744073709551615 -# EIP7668 -EIP7668_FORK_VERSION: 0x05000001 # temporary stub -EIP7668_FORK_EPOCH: 18446744073709551615 +# EIP7514 +EIP7514_FORK_VERSION: 0x05000001 # temporary stub +EIP7514_FORK_EPOCH: 18446744073709551615 # WHISK WHISK_FORK_VERSION: 0x06000001 WHISK_FORK_EPOCH: 18446744073709551615 @@ -149,6 +149,6 @@ BLOB_SIDECAR_SUBNET_COUNT: 6 WHISK_EPOCHS_PER_SHUFFLING_PHASE: 4 WHISK_PROPOSER_SELECTION_GAP: 1 -# EIP7668 +# EIP7514 # [customized] MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 4 diff --git a/pysetup/constants.py b/pysetup/constants.py index f6f8ed8e4..765429e58 100644 --- a/pysetup/constants.py +++ b/pysetup/constants.py @@ -6,7 +6,7 @@ CAPELLA = 'capella' DENEB = 'deneb' EIP6110 = 'eip6110' EIP7002 = 'eip7002' -EIP7668 = 'eip7668' +EIP7514 = 'eip7514' WHISK = 'whisk' diff --git a/pysetup/md_doc_paths.py b/pysetup/md_doc_paths.py index 8031b0936..51dbfae25 100644 --- a/pysetup/md_doc_paths.py +++ b/pysetup/md_doc_paths.py @@ -9,7 +9,7 @@ from .constants import ( EIP6110, WHISK, EIP7002, - EIP7668, + EIP7514, ) @@ -22,7 +22,7 @@ PREVIOUS_FORK_OF = { EIP6110: DENEB, WHISK: CAPELLA, EIP7002: CAPELLA, - EIP7668: CAPELLA, + EIP7514: CAPELLA, } ALL_FORKS = list(PREVIOUS_FORK_OF.keys()) diff --git a/pysetup/spec_builders/__init__.py b/pysetup/spec_builders/__init__.py index 6f0f1d203..aa26b431f 100644 --- a/pysetup/spec_builders/__init__.py +++ b/pysetup/spec_builders/__init__.py @@ -5,7 +5,7 @@ from .capella import CapellaSpecBuilder from .deneb import DenebSpecBuilder from .eip6110 import EIP6110SpecBuilder from .eip7002 import EIP7002SpecBuilder -from .eip7668 import EIP7668SpecBuilder +from .eip7514 import EIP7514SpecBuilder from .whisk import WhiskSpecBuilder @@ -13,6 +13,6 @@ spec_builders = { builder.fork: builder for builder in ( Phase0SpecBuilder, AltairSpecBuilder, BellatrixSpecBuilder, CapellaSpecBuilder, DenebSpecBuilder, - EIP6110SpecBuilder, EIP7002SpecBuilder, EIP7668SpecBuilder, WhiskSpecBuilder, + EIP6110SpecBuilder, EIP7002SpecBuilder, EIP7514SpecBuilder, WhiskSpecBuilder, ) } diff --git a/pysetup/spec_builders/eip7668.py b/pysetup/spec_builders/eip7514 similarity index 67% rename from pysetup/spec_builders/eip7668.py rename to pysetup/spec_builders/eip7514 index 55332dd9e..280cd1199 100644 --- a/pysetup/spec_builders/eip7668.py +++ b/pysetup/spec_builders/eip7514 @@ -1,9 +1,9 @@ from .base import BaseSpecBuilder -from ..constants import EIP7668 +from ..constants import EIP7514 -class EIP7668SpecBuilder(BaseSpecBuilder): - fork: str = EIP7668 +class EIP7514SpecBuilder(BaseSpecBuilder): + fork: str = EIP7514 @classmethod def imports(cls, preset_name: str): diff --git a/specs/_features/eip7668/beacon_chain.md b/specs/_features/eip7514/beacon_chain.md similarity index 97% rename from specs/_features/eip7668/beacon_chain.md rename to specs/_features/eip7514/beacon_chain.md index a8952b93a..321596deb 100644 --- a/specs/_features/eip7668/beacon_chain.md +++ b/specs/_features/eip7514/beacon_chain.md @@ -1,4 +1,4 @@ -EIP-7668 -- The Beacon Chain +EIP-7514 -- The Beacon Chain ## Table of contents @@ -53,7 +53,7 @@ def get_validator_activation_churn_limit(state: BeaconState) -> uint64: #### Registry updates -Note: The function `process_registry_updates` is modified to utilize `get_validator_inbound_churn_limit()` the rate limit the activation queue for EIP-7668. +Note: The function `process_registry_updates` is modified to utilize `get_validator_inbound_churn_limit()` the rate limit the activation queue for EIP-7514. ```python def process_registry_updates(state: BeaconState) -> None: @@ -75,7 +75,7 @@ def process_registry_updates(state: BeaconState) -> None: # Order by the sequence of activation_eligibility_epoch setting and then index ], key=lambda index: (state.validators[index].activation_eligibility_epoch, index)) # Dequeued validators for activation up to churn limit - # [Modified in EIP7668] + # [Modified in EIP7514] for index in activation_queue[:get_validator_activation_churn_limit(state)]: validator = state.validators[index] validator.activation_epoch = compute_activation_exit_epoch(get_current_epoch(state)) diff --git a/specs/_features/eip7668/fork.md b/specs/_features/eip7514/fork.md similarity index 86% rename from specs/_features/eip7668/fork.md rename to specs/_features/eip7514/fork.md index 93d2a7d52..05924874b 100644 --- a/specs/_features/eip7668/fork.md +++ b/specs/_features/eip7514/fork.md @@ -1,4 +1,4 @@ -# EIP-7668 -- Fork Logic +# EIP-7514 -- Fork Logic **Notice**: This document is a work-in-progress for researchers and implementers. @@ -12,7 +12,7 @@ - [Helper functions](#helper-functions) - [Misc](#misc) - [Modified `compute_fork_version`](#modified-compute_fork_version) -- [Fork to EIP-7668](#fork-to-eip-7668) +- [Fork to EIP-7514](#fork-to-eip-7514) - [Fork trigger](#fork-trigger) - [Upgrading the state](#upgrading-the-state) @@ -20,7 +20,7 @@ ## Introduction -This document describes the process of EIP-7668 upgrade. +This document describes the process of EIP-7514 upgrade. ## Configuration @@ -28,8 +28,8 @@ Warning: this configuration is not definitive. | Name | Value | | - | - | -| `EIP7668_FORK_VERSION` | `Version('0x05000000')` | -| `EIP7668_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | +| `EIP7514_FORK_VERSION` | `Version('0x05000000')` | +| `EIP7514_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | ## Helper functions @@ -42,8 +42,8 @@ def compute_fork_version(epoch: Epoch) -> Version: """ Return the fork version at the given ``epoch``. """ - if epoch >= EIP7668_FORK_EPOCH: - return EIP7668_FORK_VERSION + if epoch >= EIP7514_FORK_EPOCH: + return EIP7514_FORK_VERSION if epoch >= CAPELLA_FORK_EPOCH: return CAPELLA_FORK_VERSION if epoch >= BELLATRIX_FORK_EPOCH: @@ -53,22 +53,22 @@ def compute_fork_version(epoch: Epoch) -> Version: return GENESIS_FORK_VERSION ``` -## Fork to EIP-7668 +## Fork to EIP-7514 ### Fork trigger TBD. This fork is defined for testing purposes, the EIP may be combined with other consensus-layer upgrade. -For now, we assume the condition will be triggered at epoch `EIP7668_FORK_EPOCH`. +For now, we assume the condition will be triggered at epoch `EIP7514_FORK_EPOCH`. -Note that for the pure EIP-7668 networks, we don't apply `upgrade_to_eip7668` since it starts with EIP-7668 version logic. +Note that for the pure EIP-7514 networks, we don't apply `upgrade_to_eip7514` since it starts with EIP-7514 version logic. ### Upgrading the state -If `state.slot % SLOTS_PER_EPOCH == 0` and `compute_epoch_at_slot(state.slot) == EIP7668_FORK_EPOCH`, -an irregular state change is made to upgrade to EIP-7668. +If `state.slot % SLOTS_PER_EPOCH == 0` and `compute_epoch_at_slot(state.slot) == EIP7514_FORK_EPOCH`, +an irregular state change is made to upgrade to EIP-7514. ```python -def upgrade_to_eip7668(pre: capella.BeaconState) -> BeaconState: +def upgrade_to_eip7514(pre: capella.BeaconState) -> BeaconState: epoch = capella.get_current_epoch(pre) latest_execution_payload_header = ExecutionPayloadHeader( parent_hash=pre.latest_execution_payload_header.parent_hash, @@ -94,7 +94,7 @@ def upgrade_to_eip7668(pre: capella.BeaconState) -> BeaconState: slot=pre.slot, fork=Fork( previous_version=pre.fork.current_version, - current_version=EIP7668_FORK_VERSION, # [Modified in EIP-7668] + current_version=EIP7514_FORK_VERSION, # [Modified in EIP-7514] epoch=epoch, ), # History diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index f1a1a7034..d646f08b9 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -10,13 +10,13 @@ from eth2spec.capella import mainnet as spec_capella_mainnet, minimal as spec_ca from eth2spec.deneb import mainnet as spec_deneb_mainnet, minimal as spec_deneb_minimal from eth2spec.eip6110 import mainnet as spec_eip6110_mainnet, minimal as spec_eip6110_minimal from eth2spec.eip7002 import mainnet as spec_eip7002_mainnet, minimal as spec_eip7002_minimal -from eth2spec.eip7668 import mainnet as spec_eip7668_mainnet, minimal as spec_eip7668_minimal +from eth2spec.eip7514 import mainnet as spec_eip7514_mainnet, minimal as spec_eip7514_minimal from eth2spec.utils import bls from .exceptions import SkippedTest from .helpers.constants import ( PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, - EIP6110, EIP7002, EIP7668, + EIP6110, EIP7002, EIP7514, MINIMAL, MAINNET, ALL_PHASES, ALL_FORK_UPGRADES, @@ -86,7 +86,7 @@ spec_targets: Dict[PresetBaseName, Dict[SpecForkName, Spec]] = { DENEB: spec_deneb_minimal, EIP6110: spec_eip6110_minimal, EIP7002: spec_eip7002_minimal, - EIP7668: spec_eip7668_minimal, + EIP7514: spec_eip7514_minimal, }, MAINNET: { PHASE0: spec_phase0_mainnet, @@ -96,7 +96,7 @@ spec_targets: Dict[PresetBaseName, Dict[SpecForkName, Spec]] = { DENEB: spec_deneb_mainnet, EIP6110: spec_eip6110_mainnet, EIP7002: spec_eip7002_mainnet, - EIP7668: spec_eip7668_mainnet, + EIP7514: spec_eip7514_mainnet, }, } @@ -568,7 +568,7 @@ with_capella_and_later = with_all_phases_from(CAPELLA) with_deneb_and_later = with_all_phases_from(DENEB) with_eip6110_and_later = with_all_phases_from(EIP6110) with_eip7002_and_later = with_all_phases_from(EIP7002) -with_eip7668_and_later = with_all_phases_from(EIP7668) +with_eip7514_and_later = with_all_phases_from(EIP7514) class quoted_str(str): diff --git a/tests/core/pyspec/eth2spec/test/eip7668/__init__.py b/tests/core/pyspec/eth2spec/test/eip7514/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7668/__init__.py rename to tests/core/pyspec/eth2spec/test/eip7514/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/eip7668/epoch_processing/__init__.py b/tests/core/pyspec/eth2spec/test/eip7514/epoch_processing/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7668/epoch_processing/__init__.py rename to tests/core/pyspec/eth2spec/test/eip7514/epoch_processing/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/eip7668/epoch_processing/test_process_registry_updates.py b/tests/core/pyspec/eth2spec/test/eip7514/epoch_processing/test_process_registry_updates.py similarity index 97% rename from tests/core/pyspec/eth2spec/test/eip7668/epoch_processing/test_process_registry_updates.py rename to tests/core/pyspec/eth2spec/test/eip7514/epoch_processing/test_process_registry_updates.py index d68a659ef..aa8e2c41b 100644 --- a/tests/core/pyspec/eth2spec/test/eip7668/epoch_processing/test_process_registry_updates.py +++ b/tests/core/pyspec/eth2spec/test/eip7514/epoch_processing/test_process_registry_updates.py @@ -1,7 +1,7 @@ from eth2spec.test.helpers.keys import pubkeys from eth2spec.test.helpers.constants import MINIMAL from eth2spec.test.context import ( - with_eip7668_and_later, + with_eip7514_and_later, spec_test, spec_state_test, single_phase, @@ -54,7 +54,7 @@ def run_test_inbound_churn_limit(spec, state): assert state.validators[index].activation_epoch == spec.FAR_FUTURE_EPOCH -@with_eip7668_and_later +@with_eip7514_and_later @with_presets([MINIMAL], reason="mainnet config leads to larger validator set than limit of public/private keys pre-generated") @spec_test @@ -67,7 +67,7 @@ def test_inbound_churn_limit__greater_than_inbound_limit(spec, state): yield from run_test_inbound_churn_limit(spec, state) -@with_eip7668_and_later +@with_eip7514_and_later @with_presets([MINIMAL], reason="mainnet config leads to larger validator set than limit of public/private keys pre-generated") @spec_test @@ -80,7 +80,7 @@ def test_inbound_churn_limit__equal_to_inbound_limit(spec, state): yield from run_test_inbound_churn_limit(spec, state) -@with_eip7668_and_later +@with_eip7514_and_later @with_presets([MINIMAL], reason="mainnet config leads to larger validator set than limit of public/private keys pre-generated") @spec_state_test diff --git a/tests/core/pyspec/eth2spec/test/helpers/constants.py b/tests/core/pyspec/eth2spec/test/helpers/constants.py index a90edb2ec..dff1ede20 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/constants.py +++ b/tests/core/pyspec/eth2spec/test/helpers/constants.py @@ -18,7 +18,7 @@ CUSTODY_GAME = SpecForkName('custody_game') DAS = SpecForkName('das') EIP6110 = SpecForkName('eip6110') EIP7002 = SpecForkName('eip7002') -EIP7668 = SpecForkName('eip7668') +EIP7514 = SpecForkName('eip7514') # # SpecFork settings @@ -35,7 +35,7 @@ ALL_PHASES = ( # Experimental patches EIP6110, EIP7002, - EIP7668, + EIP7514, ) # The forks that have light client specs LIGHT_CLIENT_TESTING_FORKS = (*[item for item in MAINNET_FORKS if item != PHASE0], DENEB) diff --git a/tests/core/pyspec/eth2spec/test/helpers/forks.py b/tests/core/pyspec/eth2spec/test/helpers/forks.py index 91434c0ca..4322e220a 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/forks.py +++ b/tests/core/pyspec/eth2spec/test/helpers/forks.py @@ -1,12 +1,12 @@ from .constants import ( PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, - EIP6110, EIP7002, EIP7668, + EIP6110, EIP7002, EIP7514, ) def is_post_fork(a, b): - if a == EIP7668: - return b in [PHASE0, ALTAIR, BELLATRIX, CAPELLA, EIP7668] + if a == EIP7514: + return b in [PHASE0, ALTAIR, BELLATRIX, CAPELLA, EIP7514] if a == EIP7002: return b in [PHASE0, ALTAIR, BELLATRIX, CAPELLA, EIP7002] if a == EIP6110: @@ -48,5 +48,5 @@ def is_post_eip7002(spec): return is_post_fork(spec.fork, EIP7002) -def is_post_eip7668(spec): - return is_post_fork(spec.fork, EIP7668) +def is_post_eip7514(spec): + return is_post_fork(spec.fork, EIP7514) diff --git a/tests/core/pyspec/eth2spec/test/helpers/genesis.py b/tests/core/pyspec/eth2spec/test/helpers/genesis.py index 4f2f0721f..8e01643bb 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/genesis.py +++ b/tests/core/pyspec/eth2spec/test/helpers/genesis.py @@ -1,5 +1,5 @@ from eth2spec.test.helpers.constants import ( - ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110, EIP7002, EIP7668, + ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110, EIP7002, EIP7514, ) from eth2spec.test.helpers.execution_payload import ( compute_el_header_block_hash, @@ -93,9 +93,9 @@ def create_genesis_state(spec, validator_balances, activation_threshold): elif spec.fork == EIP7002: previous_version = spec.config.CAPELLA_FORK_VERSION current_version = spec.config.EIP7002_FORK_VERSION - elif spec.fork == EIP7668: + elif spec.fork == EIP7514: previous_version = spec.config.CAPELLA_FORK_VERSION - current_version = spec.config.EIP7668_FORK_VERSION + current_version = spec.config.EIP7514_FORK_VERSION state = spec.BeaconState( genesis_time=0,