diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index f204d1746..e62108b0a 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -50,8 +50,9 @@ CAPELLA_FORK_EPOCH: 194048 # April 12, 2023, 10:27:35pm UTC # Deneb DENEB_FORK_VERSION: 0x04000000 DENEB_FORK_EPOCH: 18446744073709551615 - - +# EIP6110 +EIP6110_FORK_VERSION: 0x04000001 +EIP6110_FORK_EPOCH: 18446744073709551615 # Time parameters diff --git a/configs/minimal.yaml b/configs/minimal.yaml index abecb1881..271a0c14a 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -49,6 +49,9 @@ CAPELLA_FORK_EPOCH: 18446744073709551615 # DENEB DENEB_FORK_VERSION: 0x04000001 DENEB_FORK_EPOCH: 18446744073709551615 +# EIP6110 +EIP6110_FORK_VERSION: 0x04000001 +EIP6110_FORK_EPOCH: 18446744073709551615 # Time parameters diff --git a/presets/mainnet/eip6110.yaml b/presets/mainnet/eip6110.yaml new file mode 100644 index 000000000..16bf787d0 --- /dev/null +++ b/presets/mainnet/eip6110.yaml @@ -0,0 +1,6 @@ +# Mainnet preset - EIP6110 + +# Execution +# --------------------------------------------------------------- +# 2**13 (= 8192) receipts +MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 8192 diff --git a/presets/minimal/eip6110.yaml b/presets/minimal/eip6110.yaml new file mode 100644 index 000000000..7486aa16e --- /dev/null +++ b/presets/minimal/eip6110.yaml @@ -0,0 +1,6 @@ +# Minimal preset - EIP6110 + +# Execution +# --------------------------------------------------------------- +# [customized] +MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 4 diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index 38e7f0b71..b859bf27c 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -8,11 +8,13 @@ from eth2spec.altair import mainnet as spec_altair_mainnet, minimal as spec_alta from eth2spec.bellatrix import mainnet as spec_bellatrix_mainnet, minimal as spec_bellatrix_minimal from eth2spec.capella import mainnet as spec_capella_mainnet, minimal as spec_capella_minimal 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.utils import bls from .exceptions import SkippedTest from .helpers.constants import ( PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, + EIP6110, MINIMAL, MAINNET, ALL_PHASES, ALL_FORK_UPGRADES, @@ -79,13 +81,15 @@ spec_targets: Dict[PresetBaseName, Dict[SpecForkName, Spec]] = { BELLATRIX: spec_bellatrix_minimal, CAPELLA: spec_capella_minimal, DENEB: spec_deneb_minimal, + EIP6110: spec_eip6110_minimal, }, MAINNET: { PHASE0: spec_phase0_mainnet, ALTAIR: spec_altair_mainnet, BELLATRIX: spec_bellatrix_mainnet, CAPELLA: spec_capella_mainnet, - DENEB: spec_deneb_mainnet + DENEB: spec_deneb_mainnet, + EIP6110: spec_eip6110_mainnet, }, } diff --git a/tests/core/pyspec/eth2spec/test/helpers/constants.py b/tests/core/pyspec/eth2spec/test/helpers/constants.py index 0d31adb43..83e7e40db 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/constants.py +++ b/tests/core/pyspec/eth2spec/test/helpers/constants.py @@ -9,24 +9,25 @@ PHASE0 = SpecForkName('phase0') ALTAIR = SpecForkName('altair') BELLATRIX = SpecForkName('bellatrix') CAPELLA = SpecForkName('capella') +DENEB = SpecForkName('deneb') # Experimental phases (not included in default "ALL_PHASES"): SHARDING = SpecForkName('sharding') CUSTODY_GAME = SpecForkName('custody_game') DAS = SpecForkName('das') -DENEB = SpecForkName('deneb') +EIP6110 = SpecForkName('eip6110') # The forks that pytest can run with. ALL_PHASES = ( # Formal forks - PHASE0, ALTAIR, BELLATRIX, CAPELLA, + PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, # Experimental patches - DENEB, + EIP6110, ) # The forks that output to the test vectors. -TESTGEN_FORKS = (PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB) +TESTGEN_FORKS = (PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110) -# TODO: no DENEB fork tests now. Should add when we figure out the content of Capella. +# TODO: no EIP6110 fork tests now. ALL_FORK_UPGRADES = { # pre_fork_name: post_fork_name PHASE0: ALTAIR, @@ -41,7 +42,7 @@ AFTER_CAPELLA_UPGRADES = {key: value for key, value in ALL_FORK_UPGRADES.items() if key not in [PHASE0, ALTAIR]} AFTER_CAPELLA_PRE_POST_FORKS = AFTER_CAPELLA_UPGRADES.items() AFTER_DENEB_UPGRADES = {key: value for key, value in ALL_FORK_UPGRADES.items() - if key not in [PHASE0, ALTAIR, BELLATRIX]} + if key not in [PHASE0, ALTAIR, BELLATRIX, EIP6110]} AFTER_DENEB_PRE_POST_FORKS = AFTER_DENEB_UPGRADES.items() # diff --git a/tests/core/pyspec/eth2spec/test/helpers/forks.py b/tests/core/pyspec/eth2spec/test/helpers/forks.py index be3103e67..e6320cc9b 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/forks.py +++ b/tests/core/pyspec/eth2spec/test/helpers/forks.py @@ -1,9 +1,12 @@ from .constants import ( PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, + EIP6110, ) def is_post_fork(a, b): + if a == EIP6110: + return b in [PHASE0, ALTAIR, BELLATRIX, CAPELLA, EIP6110] if a == DENEB: return b in [PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB] if a == CAPELLA: @@ -31,3 +34,7 @@ def is_post_capella(spec): def is_post_deneb(spec): return is_post_fork(spec.fork, DENEB) + + +def is_post_eip6110(spec): + return is_post_fork(spec.fork, EIP6110)