Check MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD < MAX_WITHDRAWALS_PER_PAYLOAD

This commit is contained in:
Mikhail Kalinin 2024-03-20 14:38:07 +06:00
parent 6d140cd6ea
commit b02c3e59d3
2 changed files with 9 additions and 1 deletions

View File

@ -8,7 +8,7 @@ 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,
EIP6110, EIP7002, EIP7594, EIP6110, EIP7002, EIP7594, EIP7251,
WHISK, WHISK,
MINIMAL, MINIMAL,
ALL_PHASES, ALL_PHASES,
@ -511,6 +511,7 @@ with_eip6110_and_later = with_all_phases_from(EIP6110)
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)
with_eip7251_and_later = with_all_phases_from(EIP7251, all_phases=ALLOWED_TEST_RUNNER_FORKS)
class quoted_str(str): class quoted_str(str):

View File

@ -1,6 +1,7 @@
from eth2spec.test.context import ( from eth2spec.test.context import (
spec_state_test, spec_state_test,
with_all_phases, with_all_phases,
with_eip7251_and_later,
) )
from eth2spec.test.helpers.constants import UINT64_MAX from eth2spec.test.helpers.constants import UINT64_MAX
from eth2spec.test.helpers.forks import ( from eth2spec.test.helpers.forks import (
@ -91,3 +92,9 @@ def test_networking(spec, state):
def test_fork_choice(spec, state): def test_fork_choice(spec, state):
assert spec.INTERVALS_PER_SLOT < spec.config.SECONDS_PER_SLOT assert spec.INTERVALS_PER_SLOT < spec.config.SECONDS_PER_SLOT
assert spec.config.PROPOSER_SCORE_BOOST <= 100 assert spec.config.PROPOSER_SCORE_BOOST <= 100
@with_eip7251_and_later
@spec_state_test
def test_withdrawals(spec, state):
assert spec.MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD < spec.MAX_WITHDRAWALS_PER_PAYLOAD