Rename EIP6110 to Electra

This commit is contained in:
Hsiao-Wei Wang 2024-02-16 12:29:00 +08:00
parent 1a33bf8a00
commit 6ffd27bd60
No known key found for this signature in database
GPG Key ID: AE3D6B174F971DE4
37 changed files with 109 additions and 109 deletions

View File

@ -155,7 +155,7 @@ jobs:
command: make citest fork=deneb command: make citest fork=deneb
- store_test_results: - store_test_results:
path: tests/core/pyspec/test-reports path: tests/core/pyspec/test-reports
test-eip6110: test-electra:
docker: docker:
- image: circleci/python:3.9 - image: circleci/python:3.9
working_directory: ~/specs-repo working_directory: ~/specs-repo
@ -165,7 +165,7 @@ jobs:
- restore_pyspec_cached_venv - restore_pyspec_cached_venv
- run: - run:
name: Run py-tests name: Run py-tests
command: make citest fork=eip6110 command: make citest fork=electra
- store_test_results: - store_test_results:
path: tests/core/pyspec/test-reports path: tests/core/pyspec/test-reports
test-eip7002: test-eip7002:
@ -327,7 +327,7 @@ workflows:
- test-deneb: - test-deneb:
requires: requires:
- install_pyspec_test - install_pyspec_test
- test-eip6110: - test-electra:
requires: requires:
- install_pyspec_test - install_pyspec_test
- test-eip7002: - test-eip7002:

View File

@ -71,7 +71,7 @@ jobs:
needs: [preclear,lint,codespell,table_of_contents] needs: [preclear,lint,codespell,table_of_contents]
strategy: strategy:
matrix: matrix:
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "eip6110", "eip7002", "whisk", "eip7594"] version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7002", "whisk", "eip7594"]
steps: steps:
- name: Checkout this repo - name: Checkout this repo
uses: actions/checkout@v3.2.0 uses: actions/checkout@v3.2.0

2
.gitignore vendored
View File

@ -21,7 +21,7 @@ tests/core/pyspec/eth2spec/altair/
tests/core/pyspec/eth2spec/bellatrix/ tests/core/pyspec/eth2spec/bellatrix/
tests/core/pyspec/eth2spec/capella/ tests/core/pyspec/eth2spec/capella/
tests/core/pyspec/eth2spec/deneb/ tests/core/pyspec/eth2spec/deneb/
tests/core/pyspec/eth2spec/eip6110/ tests/core/pyspec/eth2spec/electra/
tests/core/pyspec/eth2spec/eip7002/ tests/core/pyspec/eth2spec/eip7002/
tests/core/pyspec/eth2spec/whisk/ tests/core/pyspec/eth2spec/whisk/
tests/core/pyspec/eth2spec/eip7594/ tests/core/pyspec/eth2spec/eip7594/

View File

@ -35,7 +35,7 @@ MARKDOWN_FILES = $(wildcard $(SPEC_DIR)/*/*.md) \
$(wildcard $(SPEC_DIR)/_features/*/*/*.md) \ $(wildcard $(SPEC_DIR)/_features/*/*/*.md) \
$(wildcard $(SSZ_DIR)/*.md) $(wildcard $(SSZ_DIR)/*.md)
ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb eip6110 eip7002 whisk ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb electra eip7002 whisk
# The parameters for commands. Use `foreach` to avoid listing specs again. # The parameters for commands. Use `foreach` to avoid listing specs again.
COVERAGE_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), --cov=eth2spec.$S.$(TEST_PRESET_TYPE)) COVERAGE_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), --cov=eth2spec.$S.$(TEST_PRESET_TYPE))
PYLINT_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), ./eth2spec/$S) PYLINT_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), ./eth2spec/$S)

View File

@ -29,7 +29,7 @@ Features are researched and developed in parallel, and then consolidated into se
| Sharding (outdated) | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/sharding/beacon-chain.md)</li></ul><li>Additions</li><ul><li>[P2P networking](specs/_features/sharding/p2p-interface.md)</li></ul></ul> | | Sharding (outdated) | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/sharding/beacon-chain.md)</li></ul><li>Additions</li><ul><li>[P2P networking](specs/_features/sharding/p2p-interface.md)</li></ul></ul> |
| Custody Game (outdated) | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/custody_game/beacon-chain.md)</li></ul><li>Additions</li><ul><li>[Honest validator guide changes](specs/_features/custody_game/validator.md)</li></ul></ul> | Dependent on sharding | | Custody Game (outdated) | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/custody_game/beacon-chain.md)</li></ul><li>Additions</li><ul><li>[Honest validator guide changes](specs/_features/custody_game/validator.md)</li></ul></ul> | Dependent on sharding |
| Data Availability Sampling (outdated) | <ul><li>Core</li><ul><li>[Core types and functions](specs/_features/das/das-core.md)</li><li>[Fork choice changes](specs/_features/das/fork-choice.md)</li></ul><li>Additions</li><ul><li>[P2P Networking](specs/_features/das/p2p-interface.md)</li><li>[Sampling process](specs/_features/das/sampling.md)</li></ul></ul> | <ul><li> Dependent on sharding</li><li>[Technical explainer](https://hackmd.io/@HWeNw8hNRimMm2m2GH56Cw/B1YJPGkpD)</li></ul> | | Data Availability Sampling (outdated) | <ul><li>Core</li><ul><li>[Core types and functions](specs/_features/das/das-core.md)</li><li>[Fork choice changes](specs/_features/das/fork-choice.md)</li></ul><li>Additions</li><ul><li>[P2P Networking](specs/_features/das/p2p-interface.md)</li><li>[Sampling process](specs/_features/das/sampling.md)</li></ul></ul> | <ul><li> Dependent on sharding</li><li>[Technical explainer](https://hackmd.io/@HWeNw8hNRimMm2m2GH56Cw/B1YJPGkpD)</li></ul> |
| EIP-6110 | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/eip6110//beacon-chain.md)</li><li>[EIP-6110 fork](specs/_features/eip6110/fork.md)</li></ul><li>Additions</li><ul><li>[Honest validator guide changes](specs/_features/eip6110/validator.md)</li></ul></ul> | | EIP-6110 | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/electra//beacon-chain.md)</li><li>[EIP-6110 fork](specs/_features/electra/fork.md)</li></ul><li>Additions</li><ul><li>[Honest validator guide changes](specs/_features/electra/validator.md)</li></ul></ul> |
### Accompanying documents can be found in [specs](specs) and include: ### Accompanying documents can be found in [specs](specs) and include:

View File

@ -50,9 +50,9 @@ CAPELLA_FORK_EPOCH: 194048 # April 12, 2023, 10:27:35pm UTC
# Deneb # Deneb
DENEB_FORK_VERSION: 0x04000000 DENEB_FORK_VERSION: 0x04000000
DENEB_FORK_EPOCH: 269568 # March 13, 2024, 01:55:35pm UTC DENEB_FORK_EPOCH: 269568 # March 13, 2024, 01:55:35pm UTC
# EIP6110 # Electra
EIP6110_FORK_VERSION: 0x05000000 # temporary stub ELECTRA_FORK_VERSION: 0x05000000 # temporary stub
EIP6110_FORK_EPOCH: 18446744073709551615 ELECTRA_FORK_EPOCH: 18446744073709551615
# EIP7002 # EIP7002
EIP7002_FORK_VERSION: 0x05000000 # temporary stub EIP7002_FORK_VERSION: 0x05000000 # temporary stub
EIP7002_FORK_EPOCH: 18446744073709551615 EIP7002_FORK_EPOCH: 18446744073709551615

View File

@ -49,9 +49,9 @@ CAPELLA_FORK_EPOCH: 18446744073709551615
# DENEB # DENEB
DENEB_FORK_VERSION: 0x04000001 DENEB_FORK_VERSION: 0x04000001
DENEB_FORK_EPOCH: 18446744073709551615 DENEB_FORK_EPOCH: 18446744073709551615
# EIP6110 # ELECTRA
EIP6110_FORK_VERSION: 0x05000001 ELECTRA_FORK_VERSION: 0x05000001
EIP6110_FORK_EPOCH: 18446744073709551615 ELECTRA_FORK_EPOCH: 18446744073709551615
# EIP7002 # EIP7002
EIP7002_FORK_VERSION: 0x05000001 EIP7002_FORK_VERSION: 0x05000001
EIP7002_FORK_EPOCH: 18446744073709551615 EIP7002_FORK_EPOCH: 18446744073709551615

View File

@ -1,4 +1,4 @@
# Mainnet preset - EIP6110 # Mainnet preset - ELECTRA
# Execution # Execution
# --------------------------------------------------------------- # ---------------------------------------------------------------

View File

@ -1,4 +1,4 @@
# Minimal preset - EIP6110 # Minimal preset - Electra
# Execution # Execution
# --------------------------------------------------------------- # ---------------------------------------------------------------

View File

@ -4,7 +4,7 @@ ALTAIR = 'altair'
BELLATRIX = 'bellatrix' BELLATRIX = 'bellatrix'
CAPELLA = 'capella' CAPELLA = 'capella'
DENEB = 'deneb' DENEB = 'deneb'
EIP6110 = 'eip6110' ELECTRA = 'electra'
EIP7002 = 'eip7002' EIP7002 = 'eip7002'
WHISK = 'whisk' WHISK = 'whisk'
EIP7594 = 'eip7594' EIP7594 = 'eip7594'

View File

@ -6,7 +6,7 @@ from .constants import (
BELLATRIX, BELLATRIX,
CAPELLA, CAPELLA,
DENEB, DENEB,
EIP6110, ELECTRA,
WHISK, WHISK,
EIP7002, EIP7002,
EIP7594, EIP7594,
@ -19,7 +19,7 @@ PREVIOUS_FORK_OF = {
BELLATRIX: ALTAIR, BELLATRIX: ALTAIR,
CAPELLA: BELLATRIX, CAPELLA: BELLATRIX,
DENEB: CAPELLA, DENEB: CAPELLA,
EIP6110: DENEB, ELECTRA: DENEB,
WHISK: CAPELLA, WHISK: CAPELLA,
EIP7002: CAPELLA, EIP7002: CAPELLA,
EIP7594: DENEB, EIP7594: DENEB,

View File

@ -3,7 +3,7 @@ from .altair import AltairSpecBuilder
from .bellatrix import BellatrixSpecBuilder from .bellatrix import BellatrixSpecBuilder
from .capella import CapellaSpecBuilder from .capella import CapellaSpecBuilder
from .deneb import DenebSpecBuilder from .deneb import DenebSpecBuilder
from .eip6110 import EIP6110SpecBuilder from .electra import ElectraSpecBuilder
from .eip7002 import EIP7002SpecBuilder from .eip7002 import EIP7002SpecBuilder
from .whisk import WhiskSpecBuilder from .whisk import WhiskSpecBuilder
from .eip7594 import EIP7594SpecBuilder from .eip7594 import EIP7594SpecBuilder
@ -13,6 +13,6 @@ spec_builders = {
builder.fork: builder builder.fork: builder
for builder in ( for builder in (
Phase0SpecBuilder, AltairSpecBuilder, BellatrixSpecBuilder, CapellaSpecBuilder, DenebSpecBuilder, Phase0SpecBuilder, AltairSpecBuilder, BellatrixSpecBuilder, CapellaSpecBuilder, DenebSpecBuilder,
EIP6110SpecBuilder, EIP7002SpecBuilder, WhiskSpecBuilder, EIP7594SpecBuilder, ElectraSpecBuilder, EIP7002SpecBuilder, WhiskSpecBuilder, EIP7594SpecBuilder,
) )
} }

View File

@ -1,9 +1,9 @@
from .base import BaseSpecBuilder from .base import BaseSpecBuilder
from ..constants import EIP6110 from ..constants import ELECTRA
class EIP6110SpecBuilder(BaseSpecBuilder): class ElectraSpecBuilder(BaseSpecBuilder):
fork: str = EIP6110 fork: str = ELECTRA
@classmethod @classmethod
def imports(cls, preset_name: str): def imports(cls, preset_name: str):

View File

@ -10,7 +10,7 @@
# Set variables # Set variables
ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "eip6110" "whisk") ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "electra" "whisk")
TEST_PRESET_TYPE=minimal TEST_PRESET_TYPE=minimal
FORK_TO_TEST=phase0 FORK_TO_TEST=phase0
NUMBER_OF_CORES=4 NUMBER_OF_CORES=4

View File

@ -284,7 +284,7 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi
*Note*: The function `initialize_beacon_state_from_eth1` is modified for pure EIP-6110 testing only. *Note*: The function `initialize_beacon_state_from_eth1` is modified for pure EIP-6110 testing only.
Modifications include: Modifications include:
1. Use `EIP6110_FORK_VERSION` as the previous and current fork version. 1. Use `ELECTRA_FORK_VERSION` as the previous and current fork version.
2. Utilize the EIP-6110 `BeaconBlockBody` when constructing the initial `latest_block_header`. 2. Utilize the EIP-6110 `BeaconBlockBody` when constructing the initial `latest_block_header`.
3. Add `deposit_receipts_start_index` variable to the genesis state initialization. 3. Add `deposit_receipts_start_index` variable to the genesis state initialization.
@ -295,8 +295,8 @@ def initialize_beacon_state_from_eth1(eth1_block_hash: Hash32,
execution_payload_header: ExecutionPayloadHeader=ExecutionPayloadHeader() execution_payload_header: ExecutionPayloadHeader=ExecutionPayloadHeader()
) -> BeaconState: ) -> BeaconState:
fork = Fork( fork = Fork(
previous_version=EIP6110_FORK_VERSION, # [Modified in EIP6110] for testing only previous_version=ELECTRA_FORK_VERSION, # [Modified in EIP6110] for testing only
current_version=EIP6110_FORK_VERSION, # [Modified in EIP6110] current_version=ELECTRA_FORK_VERSION, # [Modified in EIP6110]
epoch=GENESIS_EPOCH, epoch=GENESIS_EPOCH,
) )
state = BeaconState( state = BeaconState(

View File

@ -28,8 +28,8 @@ Warning: this configuration is not definitive.
| Name | Value | | Name | Value |
| - | - | | - | - |
| `EIP6110_FORK_VERSION` | `Version('0x05000000')` | | `ELECTRA_FORK_VERSION` | `Version('0x05000000')` |
| `EIP6110_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | | `ELECTRA_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** |
## Helper functions ## Helper functions
@ -42,8 +42,8 @@ def compute_fork_version(epoch: Epoch) -> Version:
""" """
Return the fork version at the given ``epoch``. Return the fork version at the given ``epoch``.
""" """
if epoch >= EIP6110_FORK_EPOCH: if epoch >= ELECTRA_FORK_EPOCH:
return EIP6110_FORK_VERSION return ELECTRA_FORK_VERSION
if epoch >= DENEB_FORK_EPOCH: if epoch >= DENEB_FORK_EPOCH:
return DENEB_FORK_VERSION return DENEB_FORK_VERSION
if epoch >= CAPELLA_FORK_EPOCH: if epoch >= CAPELLA_FORK_EPOCH:
@ -60,17 +60,17 @@ def compute_fork_version(epoch: Epoch) -> Version:
### Fork trigger ### Fork trigger
TBD. This fork is defined for testing purposes, the EIP may be combined with other consensus-layer upgrade. 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 `EIP6110_FORK_EPOCH`. For now, we assume the condition will be triggered at epoch `ELECTRA_FORK_EPOCH`.
Note that for the pure EIP-6110 networks, we don't apply `upgrade_to_eip6110` since it starts with EIP-6110 version logic. Note that for the pure EIP-6110 networks, we don't apply `upgrade_to_electra` since it starts with EIP-6110 version logic.
### Upgrading the state ### Upgrading the state
If `state.slot % SLOTS_PER_EPOCH == 0` and `compute_epoch_at_slot(state.slot) == EIP6110_FORK_EPOCH`, If `state.slot % SLOTS_PER_EPOCH == 0` and `compute_epoch_at_slot(state.slot) == ELECTRA_FORK_EPOCH`,
an irregular state change is made to upgrade to EIP-6110. an irregular state change is made to upgrade to EIP-6110.
```python ```python
def upgrade_to_eip6110(pre: deneb.BeaconState) -> BeaconState: def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState:
epoch = deneb.get_current_epoch(pre) epoch = deneb.get_current_epoch(pre)
latest_execution_payload_header = ExecutionPayloadHeader( latest_execution_payload_header = ExecutionPayloadHeader(
parent_hash=pre.latest_execution_payload_header.parent_hash, parent_hash=pre.latest_execution_payload_header.parent_hash,
@ -99,7 +99,7 @@ def upgrade_to_eip6110(pre: deneb.BeaconState) -> BeaconState:
slot=pre.slot, slot=pre.slot,
fork=Fork( fork=Fork(
previous_version=pre.fork.current_version, previous_version=pre.fork.current_version,
current_version=EIP6110_FORK_VERSION, # [Modified in EIP-6110] current_version=ELECTRA_FORK_VERSION, # [Modified in EIP-6110]
epoch=epoch, epoch=epoch,
), ),
# History # History

View File

@ -7,8 +7,8 @@ from eth2spec.utils import bls
from .exceptions import SkippedTest from .exceptions import SkippedTest
from .helpers.constants import ( from .helpers.constants import (
PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA,
EIP6110, EIP7002, EIP7594, EIP7002, EIP7594,
WHISK, WHISK,
MINIMAL, MINIMAL,
ALL_PHASES, ALL_PHASES,
@ -507,7 +507,7 @@ with_altair_and_later = with_all_phases_from(ALTAIR)
with_bellatrix_and_later = with_all_phases_from(BELLATRIX) with_bellatrix_and_later = with_all_phases_from(BELLATRIX)
with_capella_and_later = with_all_phases_from(CAPELLA) with_capella_and_later = with_all_phases_from(CAPELLA)
with_deneb_and_later = with_all_phases_from(DENEB) with_deneb_and_later = with_all_phases_from(DENEB)
with_eip6110_and_later = with_all_phases_from(EIP6110) with_electra_and_later = with_all_phases_from(ELECTRA)
with_eip7002_and_later = with_all_phases_from(EIP7002) with_eip7002_and_later = with_all_phases_from(EIP7002)
with_whisk_and_later = with_all_phases_from(WHISK, all_phases=ALLOWED_TEST_RUNNER_FORKS) with_whisk_and_later = with_all_phases_from(WHISK, all_phases=ALLOWED_TEST_RUNNER_FORKS)
with_eip7594_and_later = with_all_phases_from(EIP7594, all_phases=ALLOWED_TEST_RUNNER_FORKS) with_eip7594_and_later = with_all_phases_from(EIP7594, all_phases=ALLOWED_TEST_RUNNER_FORKS)

View File

@ -1,4 +1,4 @@
from eth2spec.test.context import spec_state_test, always_bls, with_eip6110_and_later from eth2spec.test.context import spec_state_test, always_bls, with_electra_and_later
from eth2spec.test.helpers.deposits import ( from eth2spec.test.helpers.deposits import (
prepare_deposit_receipt, prepare_deposit_receipt,
run_deposit_receipt_processing, run_deposit_receipt_processing,
@ -8,7 +8,7 @@ from eth2spec.test.helpers.state import next_epoch_via_block
from eth2spec.test.helpers.withdrawals import set_validator_fully_withdrawable from eth2spec.test.helpers.withdrawals import set_validator_fully_withdrawable
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_new_deposit_under_max(spec, state): def test_new_deposit_under_max(spec, state):
# fresh deposit = next validator index = validator appended to registry # fresh deposit = next validator index = validator appended to registry
@ -20,7 +20,7 @@ def test_new_deposit_under_max(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_new_deposit_max(spec, state): def test_new_deposit_max(spec, state):
# fresh deposit = next validator index = validator appended to registry # fresh deposit = next validator index = validator appended to registry
@ -32,7 +32,7 @@ def test_new_deposit_max(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_new_deposit_over_max(spec, state): def test_new_deposit_over_max(spec, state):
# fresh deposit = next validator index = validator appended to registry # fresh deposit = next validator index = validator appended to registry
@ -44,7 +44,7 @@ def test_new_deposit_over_max(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_new_deposit_eth1_withdrawal_credentials(spec, state): def test_new_deposit_eth1_withdrawal_credentials(spec, state):
# fresh deposit = next validator index = validator appended to registry # fresh deposit = next validator index = validator appended to registry
@ -66,7 +66,7 @@ def test_new_deposit_eth1_withdrawal_credentials(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_new_deposit_non_versioned_withdrawal_credentials(spec, state): def test_new_deposit_non_versioned_withdrawal_credentials(spec, state):
# fresh deposit = next validator index = validator appended to registry # fresh deposit = next validator index = validator appended to registry
@ -87,7 +87,7 @@ def test_new_deposit_non_versioned_withdrawal_credentials(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
@always_bls @always_bls
def test_correct_sig_but_forked_state(spec, state): def test_correct_sig_but_forked_state(spec, state):
@ -99,7 +99,7 @@ def test_correct_sig_but_forked_state(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
@always_bls @always_bls
def test_incorrect_sig_new_deposit(spec, state): def test_incorrect_sig_new_deposit(spec, state):
@ -110,7 +110,7 @@ def test_incorrect_sig_new_deposit(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index, effective=False) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index, effective=False)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_top_up__max_effective_balance(spec, state): def test_top_up__max_effective_balance(spec, state):
validator_index = 0 validator_index = 0
@ -126,7 +126,7 @@ def test_top_up__max_effective_balance(spec, state):
assert state.validators[validator_index].effective_balance == spec.MAX_EFFECTIVE_BALANCE assert state.validators[validator_index].effective_balance == spec.MAX_EFFECTIVE_BALANCE
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_top_up__less_effective_balance(spec, state): def test_top_up__less_effective_balance(spec, state):
validator_index = 0 validator_index = 0
@ -145,7 +145,7 @@ def test_top_up__less_effective_balance(spec, state):
assert state.validators[validator_index].effective_balance == initial_effective_balance assert state.validators[validator_index].effective_balance == initial_effective_balance
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_top_up__zero_balance(spec, state): def test_top_up__zero_balance(spec, state):
validator_index = 0 validator_index = 0
@ -164,7 +164,7 @@ def test_top_up__zero_balance(spec, state):
assert state.validators[validator_index].effective_balance == initial_effective_balance assert state.validators[validator_index].effective_balance == initial_effective_balance
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
@always_bls @always_bls
def test_incorrect_sig_top_up(spec, state): def test_incorrect_sig_top_up(spec, state):
@ -176,7 +176,7 @@ def test_incorrect_sig_top_up(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_incorrect_withdrawal_credentials_top_up(spec, state): def test_incorrect_withdrawal_credentials_top_up(spec, state):
validator_index = 0 validator_index = 0
@ -193,7 +193,7 @@ def test_incorrect_withdrawal_credentials_top_up(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_key_validate_invalid_subgroup(spec, state): def test_key_validate_invalid_subgroup(spec, state):
validator_index = len(state.validators) validator_index = len(state.validators)
@ -207,7 +207,7 @@ def test_key_validate_invalid_subgroup(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_key_validate_invalid_decompression(spec, state): def test_key_validate_invalid_decompression(spec, state):
validator_index = len(state.validators) validator_index = len(state.validators)
@ -223,7 +223,7 @@ def test_key_validate_invalid_decompression(spec, state):
yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index)
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
@always_bls @always_bls
def test_ineffective_deposit_with_previous_fork_version(spec, state): def test_ineffective_deposit_with_previous_fork_version(spec, state):
@ -240,7 +240,7 @@ def test_ineffective_deposit_with_previous_fork_version(spec, state):
) )
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
@always_bls @always_bls
def test_effective_deposit_with_genesis_fork_version(spec, state): def test_effective_deposit_with_genesis_fork_version(spec, state):
@ -253,7 +253,7 @@ def test_effective_deposit_with_genesis_fork_version(spec, state):
) )
@with_eip6110_and_later @with_electra_and_later
@spec_state_test @spec_state_test
def test_success_top_up_to_withdrawn_validator(spec, state): def test_success_top_up_to_withdrawn_validator(spec, state):
validator_index = 0 validator_index = 0

View File

@ -4,7 +4,7 @@ from eth2spec.test.helpers.block import (
from eth2spec.test.context import ( from eth2spec.test.context import (
spec_state_test, spec_state_test,
with_phases, with_phases,
EIP6110, ELECTRA,
) )
from eth2spec.test.helpers.deposits import ( from eth2spec.test.helpers.deposits import (
build_deposit_data, build_deposit_data,
@ -108,7 +108,7 @@ def prepare_state_and_block(spec,
return state, block return state, block
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__start_index_is_set(spec, state): def test_deposit_transition__start_index_is_set(spec, state):
# 0 deposits, 2 deposit receipts, unset deposit_receipts_start_index # 0 deposits, 2 deposit receipts, unset deposit_receipts_start_index
@ -123,7 +123,7 @@ def test_deposit_transition__start_index_is_set(spec, state):
assert state.deposit_receipts_start_index == block.body.execution_payload.deposit_receipts[0].index assert state.deposit_receipts_start_index == block.body.execution_payload.deposit_receipts[0].index
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__process_eth1_deposits(spec, state): def test_deposit_transition__process_eth1_deposits(spec, state):
# 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.deposit_receipts_start_index # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.deposit_receipts_start_index
@ -136,7 +136,7 @@ def test_deposit_transition__process_eth1_deposits(spec, state):
yield from run_deposit_transition_block(spec, state, block) yield from run_deposit_transition_block(spec, state, block)
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__process_max_eth1_deposits(spec, state): def test_deposit_transition__process_max_eth1_deposits(spec, state):
# spec.MAX_DEPOSITS deposits, 1 deposit receipt, state.eth1_data.deposit_count > state.deposit_receipts_start_index # spec.MAX_DEPOSITS deposits, 1 deposit receipt, state.eth1_data.deposit_count > state.deposit_receipts_start_index
@ -151,7 +151,7 @@ def test_deposit_transition__process_max_eth1_deposits(spec, state):
yield from run_deposit_transition_block(spec, state, block) yield from run_deposit_transition_block(spec, state, block)
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__process_eth1_deposits_up_to_start_index(spec, state): def test_deposit_transition__process_eth1_deposits_up_to_start_index(spec, state):
# 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count == state.deposit_receipts_start_index # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count == state.deposit_receipts_start_index
@ -164,7 +164,7 @@ def test_deposit_transition__process_eth1_deposits_up_to_start_index(spec, state
yield from run_deposit_transition_block(spec, state, block) yield from run_deposit_transition_block(spec, state, block)
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__invalid_not_enough_eth1_deposits(spec, state): def test_deposit_transition__invalid_not_enough_eth1_deposits(spec, state):
# 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.deposit_receipts_start_index # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.deposit_receipts_start_index
@ -178,7 +178,7 @@ def test_deposit_transition__invalid_not_enough_eth1_deposits(spec, state):
yield from run_deposit_transition_block(spec, state, block, valid=False) yield from run_deposit_transition_block(spec, state, block, valid=False)
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__invalid_too_many_eth1_deposits(spec, state): def test_deposit_transition__invalid_too_many_eth1_deposits(spec, state):
# 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.eth1_data_index # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.eth1_data_index
@ -192,7 +192,7 @@ def test_deposit_transition__invalid_too_many_eth1_deposits(spec, state):
yield from run_deposit_transition_block(spec, state, block, valid=False) yield from run_deposit_transition_block(spec, state, block, valid=False)
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__invalid_eth1_deposits_overlap_in_protocol_deposits(spec, state): def test_deposit_transition__invalid_eth1_deposits_overlap_in_protocol_deposits(spec, state):
# spec.MAX_DEPOSITS deposits, 1 deposit receipt, state.eth1_data.deposit_count > state.deposit_receipts_start_index # spec.MAX_DEPOSITS deposits, 1 deposit receipt, state.eth1_data.deposit_count > state.deposit_receipts_start_index
@ -207,7 +207,7 @@ def test_deposit_transition__invalid_eth1_deposits_overlap_in_protocol_deposits(
yield from run_deposit_transition_block(spec, state, block, valid=False) yield from run_deposit_transition_block(spec, state, block, valid=False)
@with_phases([EIP6110]) @with_phases([ELECTRA])
@spec_state_test @spec_state_test
def test_deposit_transition__deposit_and_top_up_same_block(spec, state): def test_deposit_transition__deposit_and_top_up_same_block(spec, state):
# 1 deposit, 1 deposit receipt that top ups deposited validator # 1 deposit, 1 deposit receipt that top ups deposited validator

View File

@ -16,7 +16,7 @@ DENEB = SpecForkName('deneb')
SHARDING = SpecForkName('sharding') SHARDING = SpecForkName('sharding')
CUSTODY_GAME = SpecForkName('custody_game') CUSTODY_GAME = SpecForkName('custody_game')
DAS = SpecForkName('das') DAS = SpecForkName('das')
EIP6110 = SpecForkName('eip6110') ELECTRA = SpecForkName('electra')
EIP7002 = SpecForkName('eip7002') EIP7002 = SpecForkName('eip7002')
WHISK = SpecForkName('whisk') WHISK = SpecForkName('whisk')
EIP7594 = SpecForkName('eip7594') EIP7594 = SpecForkName('eip7594')
@ -35,15 +35,15 @@ ALL_PHASES = (
# Formal forks # Formal forks
*MAINNET_FORKS, *MAINNET_FORKS,
DENEB, DENEB,
ELECTRA,
# Experimental patches # Experimental patches
EIP6110,
EIP7002, EIP7002,
EIP7594, EIP7594,
) )
# The forks that have light client specs # The forks that have light client specs
LIGHT_CLIENT_TESTING_FORKS = (*[item for item in MAINNET_FORKS if item != PHASE0], DENEB) LIGHT_CLIENT_TESTING_FORKS = (*[item for item in MAINNET_FORKS if item != PHASE0], DENEB)
# The forks that output to the test vectors. # The forks that output to the test vectors.
TESTGEN_FORKS = (*MAINNET_FORKS, DENEB, EIP6110, WHISK) TESTGEN_FORKS = (*MAINNET_FORKS, DENEB, ELECTRA, WHISK)
# Forks allowed in the test runner `--fork` flag, to fail fast in case of typos # Forks allowed in the test runner `--fork` flag, to fail fast in case of typos
ALLOWED_TEST_RUNNER_FORKS = (*ALL_PHASES, WHISK) ALLOWED_TEST_RUNNER_FORKS = (*ALL_PHASES, WHISK)
@ -55,8 +55,8 @@ PREVIOUS_FORK_OF = {
BELLATRIX: ALTAIR, BELLATRIX: ALTAIR,
CAPELLA: BELLATRIX, CAPELLA: BELLATRIX,
DENEB: CAPELLA, DENEB: CAPELLA,
ELECTRA: DENEB,
# Experimental patches # Experimental patches
EIP6110: DENEB,
WHISK: CAPELLA, WHISK: CAPELLA,
EIP7002: CAPELLA, EIP7002: CAPELLA,
EIP7594: DENEB, EIP7594: DENEB,
@ -69,7 +69,7 @@ POST_FORK_OF = {
ALTAIR: BELLATRIX, ALTAIR: BELLATRIX,
BELLATRIX: CAPELLA, BELLATRIX: CAPELLA,
CAPELLA: DENEB, CAPELLA: DENEB,
DENEB: EIP6110, DENEB: ELECTRA,
} }
ALL_PRE_POST_FORKS = POST_FORK_OF.items() ALL_PRE_POST_FORKS = POST_FORK_OF.items()

View File

@ -7,7 +7,7 @@ from eth2spec.debug.random_value import get_random_bytes_list
from eth2spec.test.helpers.forks import ( from eth2spec.test.helpers.forks import (
is_post_capella, is_post_capella,
is_post_deneb, is_post_deneb,
is_post_eip6110, is_post_electra,
is_post_eip7002, is_post_eip7002,
) )
@ -34,7 +34,7 @@ def get_execution_payload_header(spec, execution_payload):
if is_post_deneb(spec): if is_post_deneb(spec):
payload_header.blob_gas_used = execution_payload.blob_gas_used payload_header.blob_gas_used = execution_payload.blob_gas_used
payload_header.excess_blob_gas = execution_payload.excess_blob_gas payload_header.excess_blob_gas = execution_payload.excess_blob_gas
if is_post_eip6110(spec): if is_post_electra(spec):
payload_header.deposit_receipts_root = spec.hash_tree_root(execution_payload.deposit_receipts) payload_header.deposit_receipts_root = spec.hash_tree_root(execution_payload.deposit_receipts)
if is_post_eip7002(spec): if is_post_eip7002(spec):
payload_header.exits_root = spec.hash_tree_root(execution_payload.exits) payload_header.exits_root = spec.hash_tree_root(execution_payload.exits)
@ -105,7 +105,7 @@ def compute_el_header_block_hash(spec,
# excess_blob_gas # excess_blob_gas
execution_payload_header_rlp.append((big_endian_int, payload_header.blob_gas_used)) execution_payload_header_rlp.append((big_endian_int, payload_header.blob_gas_used))
execution_payload_header_rlp.append((big_endian_int, payload_header.excess_blob_gas)) execution_payload_header_rlp.append((big_endian_int, payload_header.excess_blob_gas))
if is_post_eip6110(spec): if is_post_electra(spec):
# deposit_receipts_root # deposit_receipts_root
assert deposit_receipts_trie_root is not None assert deposit_receipts_trie_root is not None
execution_payload_header_rlp.append((Binary(32, 32), deposit_receipts_trie_root)) execution_payload_header_rlp.append((Binary(32, 32), deposit_receipts_trie_root))
@ -181,7 +181,7 @@ def compute_el_block_hash(spec, payload):
if is_post_capella(spec): if is_post_capella(spec):
withdrawals_encoded = [get_withdrawal_rlp(withdrawal) for withdrawal in payload.withdrawals] withdrawals_encoded = [get_withdrawal_rlp(withdrawal) for withdrawal in payload.withdrawals]
withdrawals_trie_root = compute_trie_root_from_indexed_data(withdrawals_encoded) withdrawals_trie_root = compute_trie_root_from_indexed_data(withdrawals_encoded)
if is_post_eip6110(spec): if is_post_electra(spec):
deposit_receipts_encoded = [get_deposit_receipt_rlp(spec, receipt) for receipt in payload.deposit_receipts] deposit_receipts_encoded = [get_deposit_receipt_rlp(spec, receipt) for receipt in payload.deposit_receipts]
deposit_receipts_trie_root = compute_trie_root_from_indexed_data(deposit_receipts_encoded) deposit_receipts_trie_root = compute_trie_root_from_indexed_data(deposit_receipts_encoded)
if is_post_eip7002(spec): if is_post_eip7002(spec):
@ -231,7 +231,7 @@ def build_empty_execution_payload(spec, state, randao_mix=None):
if is_post_deneb(spec): if is_post_deneb(spec):
payload.blob_gas_used = 0 payload.blob_gas_used = 0
payload.excess_blob_gas = 0 payload.excess_blob_gas = 0
if is_post_eip6110(spec): if is_post_electra(spec):
# just to be clear # just to be clear
payload.deposit_receipts = [] payload.deposit_receipts = []

View File

@ -1,6 +1,6 @@
from .constants import ( from .constants import (
PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB,
EIP6110, EIP7002, WHISK, ELECTRA, EIP7002, WHISK,
PREVIOUS_FORK_OF, PREVIOUS_FORK_OF,
) )
@ -37,8 +37,8 @@ def is_post_deneb(spec):
return is_post_fork(spec.fork, DENEB) return is_post_fork(spec.fork, DENEB)
def is_post_eip6110(spec): def is_post_electra(spec):
return is_post_fork(spec.fork, EIP6110) return is_post_fork(spec.fork, ELECTRA)
def is_post_eip7002(spec): def is_post_eip7002(spec):

View File

@ -6,7 +6,7 @@ from eth2spec.test.helpers.execution_payload import (
compute_el_header_block_hash, compute_el_header_block_hash,
) )
from eth2spec.test.helpers.forks import ( from eth2spec.test.helpers.forks import (
is_post_altair, is_post_bellatrix, is_post_capella, is_post_eip6110, is_post_eip7002, is_post_whisk, is_post_altair, is_post_bellatrix, is_post_capella, is_post_electra, is_post_eip7002, is_post_whisk,
) )
from eth2spec.test.helpers.keys import pubkeys from eth2spec.test.helpers.keys import pubkeys
from eth2spec.test.helpers.whisk import compute_whisk_initial_tracker_cached, compute_whisk_initial_k_commitment_cached from eth2spec.test.helpers.whisk import compute_whisk_initial_tracker_cached, compute_whisk_initial_k_commitment_cached
@ -55,7 +55,7 @@ def get_sample_genesis_execution_payload_header(spec,
if is_post_capella(spec): if is_post_capella(spec):
withdrawals_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") withdrawals_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
if is_post_eip6110(spec): if is_post_electra(spec):
deposit_receipts_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") deposit_receipts_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
if is_post_eip7002(spec): if is_post_eip7002(spec):
exits_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") exits_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
@ -134,7 +134,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold):
eth1_block_hash=eth1_block_hash, eth1_block_hash=eth1_block_hash,
) )
if is_post_eip6110(spec): if is_post_electra(spec):
state.deposit_receipts_start_index = spec.UNSET_DEPOSIT_RECEIPTS_START_INDEX state.deposit_receipts_start_index = spec.UNSET_DEPOSIT_RECEIPTS_START_INDEX
if is_post_whisk(spec): if is_post_whisk(spec):

View File

@ -45,7 +45,7 @@ Operations:
| `execution_payload` | `BeaconBlockBody` | **`body`** | `process_execution_payload(state, body)` (new in Bellatrix) | | `execution_payload` | `BeaconBlockBody` | **`body`** | `process_execution_payload(state, body)` (new in Bellatrix) |
| `withdrawals` | `ExecutionPayload` | `execution_payload` | `process_withdrawals(state, execution_payload)` (new in Capella) | | `withdrawals` | `ExecutionPayload` | `execution_payload` | `process_withdrawals(state, execution_payload)` (new in Capella) |
| `bls_to_execution_change` | `SignedBLSToExecutionChange` | `address_change` | `process_bls_to_execution_change(state, address_change)` (new in Capella) | | `bls_to_execution_change` | `SignedBLSToExecutionChange` | `address_change` | `process_bls_to_execution_change(state, address_change)` (new in Capella) |
| `deposit_receipt` | `DepositReceipt` | `deposit_receipt` | `process_deposit_receipt(state, deposit_receipt)` (new in EIP6110) | | `deposit_receipt` | `DepositReceipt` | `deposit_receipt` | `process_deposit_receipt(state, deposit_receipt)` (new in Electra) |
Note that `block_header` is not strictly an operation (and is a full `Block`), but processed in the same manner, and hence included here. Note that `block_header` is not strictly an operation (and is a full `Block`), but processed in the same manner, and hence included here.

View File

@ -1,5 +1,5 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA
if __name__ == "__main__": if __name__ == "__main__":
@ -37,7 +37,7 @@ if __name__ == "__main__":
]} ]}
deneb_mods = combine_mods(_new_deneb_mods, capella_mods) deneb_mods = combine_mods(_new_deneb_mods, capella_mods)
eip6110_mods = deneb_mods electra_mods = deneb_mods
# TODO Custody Game testgen is disabled for now # TODO Custody Game testgen is disabled for now
# custody_game_mods = {**{key: 'eth2spec.test.custody_game.epoch_processing.test_process_' + key for key in [ # custody_game_mods = {**{key: 'eth2spec.test.custody_game.epoch_processing.test_process_' + key for key in [
@ -52,7 +52,7 @@ if __name__ == "__main__":
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="epoch_processing", all_mods=all_mods) run_state_test_generators(runner_name="epoch_processing", all_mods=all_mods)

View File

@ -1,5 +1,5 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA
if __name__ == "__main__": if __name__ == "__main__":
@ -8,7 +8,7 @@ if __name__ == "__main__":
bellatrix_mods = altair_mods # No additional Bellatrix specific finality tests bellatrix_mods = altair_mods # No additional Bellatrix specific finality tests
capella_mods = bellatrix_mods # No additional Capella specific finality tests capella_mods = bellatrix_mods # No additional Capella specific finality tests
deneb_mods = capella_mods # No additional Deneb specific finality tests deneb_mods = capella_mods # No additional Deneb specific finality tests
eip6110_mods = deneb_mods # No additional EIP6110 specific finality tests electra_mods = deneb_mods # No additional Electra specific finality tests
all_mods = { all_mods = {
PHASE0: phase_0_mods, PHASE0: phase_0_mods,
@ -16,7 +16,7 @@ if __name__ == "__main__":
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="finality", all_mods=all_mods) run_state_test_generators(runner_name="finality", all_mods=all_mods)

View File

@ -1,5 +1,5 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods
from eth2spec.test.helpers.constants import ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA
if __name__ == "__main__": if __name__ == "__main__":
@ -28,14 +28,14 @@ if __name__ == "__main__":
]} ]}
deneb_mods = combine_mods(_new_deneb_mods, capella_mods) deneb_mods = combine_mods(_new_deneb_mods, capella_mods)
eip6110_mods = deneb_mods # No additional EIP6110 specific fork choice tests electra_mods = deneb_mods # No additional Electra specific fork choice tests
all_mods = { all_mods = {
ALTAIR: altair_mods, ALTAIR: altair_mods,
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="fork_choice", all_mods=all_mods) run_state_test_generators(runner_name="fork_choice", all_mods=all_mods)

View File

@ -1,5 +1,5 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA
if __name__ == "__main__": if __name__ == "__main__":
@ -17,14 +17,14 @@ if __name__ == "__main__":
bellatrix_mods = combine_mods(_new_bellatrix_mods, altair_mods) bellatrix_mods = combine_mods(_new_bellatrix_mods, altair_mods)
capella_mods = bellatrix_mods # No additional Capella specific genesis tests capella_mods = bellatrix_mods # No additional Capella specific genesis tests
deneb_mods = capella_mods # No additional Deneb specific genesis tests deneb_mods = capella_mods # No additional Deneb specific genesis tests
eip6110_mods = deneb_mods # No additional EIP6110 specific genesis tests electra_mods = deneb_mods # No additional Electra specific genesis tests
all_mods = { all_mods = {
PHASE0: phase_0_mods, PHASE0: phase_0_mods,
ALTAIR: altair_mods, ALTAIR: altair_mods,
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="genesis", all_mods=all_mods) run_state_test_generators(runner_name="genesis", all_mods=all_mods)

View File

@ -1,5 +1,5 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA
if __name__ == "__main__": if __name__ == "__main__":
@ -43,10 +43,10 @@ if __name__ == "__main__":
]} ]}
deneb_mods = combine_mods(_new_deneb_mods, capella_mods) deneb_mods = combine_mods(_new_deneb_mods, capella_mods)
_new_eip6110_mods = {key: 'eth2spec.test.eip6110.block_processing.test_process_' + key for key in [ _new_electra_mods = {key: 'eth2spec.test.electra.block_processing.test_process_' + key for key in [
'deposit_receipt', 'deposit_receipt',
]} ]}
eip6110_mods = combine_mods(_new_eip6110_mods, deneb_mods) electra_mods = combine_mods(_new_electra_mods, deneb_mods)
# TODO Custody Game testgen is disabled for now # TODO Custody Game testgen is disabled for now
# _new_custody_game_mods = {key: 'eth2spec.test.custody_game.block_processing.test_process_' + key for key in [ # _new_custody_game_mods = {key: 'eth2spec.test.custody_game.block_processing.test_process_' + key for key in [
@ -64,7 +64,7 @@ if __name__ == "__main__":
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="operations", all_mods=all_mods) run_state_test_generators(runner_name="operations", all_mods=all_mods)

View File

@ -1,5 +1,5 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA
if __name__ == "__main__": if __name__ == "__main__":
@ -17,7 +17,7 @@ if __name__ == "__main__":
bellatrix_mods = altair_mods bellatrix_mods = altair_mods
capella_mods = bellatrix_mods capella_mods = bellatrix_mods
deneb_mods = capella_mods deneb_mods = capella_mods
eip6110_mods = deneb_mods electra_mods = deneb_mods
all_mods = { all_mods = {
PHASE0: phase_0_mods, PHASE0: phase_0_mods,
@ -25,7 +25,7 @@ if __name__ == "__main__":
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="rewards", all_mods=all_mods) run_state_test_generators(runner_name="rewards", all_mods=all_mods)

View File

@ -1,4 +1,4 @@
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods
@ -28,10 +28,10 @@ if __name__ == "__main__":
]} ]}
deneb_mods = combine_mods(_new_deneb_mods, capella_mods) deneb_mods = combine_mods(_new_deneb_mods, capella_mods)
_new_eip6110_mods = {key: 'eth2spec.test.eip6110.sanity.' + key for key in [ _new_electra_mods = {key: 'eth2spec.test.electra.sanity.' + key for key in [
'blocks', 'blocks',
]} ]}
eip6110_mods = combine_mods(_new_eip6110_mods, deneb_mods) electra_mods = combine_mods(_new_electra_mods, deneb_mods)
all_mods = { all_mods = {
PHASE0: phase_0_mods, PHASE0: phase_0_mods,
@ -39,7 +39,7 @@ if __name__ == "__main__":
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="sanity", all_mods=all_mods) run_state_test_generators(runner_name="sanity", all_mods=all_mods)

View File

@ -1,5 +1,5 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators
from eth2spec.test.helpers.constants import BELLATRIX, CAPELLA, DENEB, EIP6110 from eth2spec.test.helpers.constants import BELLATRIX, CAPELLA, DENEB, ELECTRA
if __name__ == "__main__": if __name__ == "__main__":
@ -8,13 +8,13 @@ if __name__ == "__main__":
]} ]}
capella_mods = bellatrix_mods capella_mods = bellatrix_mods
deneb_mods = capella_mods deneb_mods = capella_mods
eip6110_mods = deneb_mods electra_mods = deneb_mods
all_mods = { all_mods = {
BELLATRIX: bellatrix_mods, BELLATRIX: bellatrix_mods,
CAPELLA: capella_mods, CAPELLA: capella_mods,
DENEB: deneb_mods, DENEB: deneb_mods,
EIP6110: eip6110_mods, ELECTRA: electra_mods,
} }
run_state_test_generators(runner_name="sync", all_mods=all_mods) run_state_test_generators(runner_name="sync", all_mods=all_mods)