Add EIP6110 operations gen, and to fork upgrades list

This commit is contained in:
Mikhail Kalinin 2023-04-06 17:39:05 +06:00
parent 3e7e780b77
commit 389b79408b
3 changed files with 9 additions and 2 deletions

View File

@ -27,13 +27,13 @@ ALL_PHASES = (
# The forks that output to the test vectors. # The forks that output to the test vectors.
TESTGEN_FORKS = (PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110) TESTGEN_FORKS = (PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110)
# TODO: no EIP6110 fork tests now.
ALL_FORK_UPGRADES = { ALL_FORK_UPGRADES = {
# pre_fork_name: post_fork_name # pre_fork_name: post_fork_name
PHASE0: ALTAIR, PHASE0: ALTAIR,
ALTAIR: BELLATRIX, ALTAIR: BELLATRIX,
BELLATRIX: CAPELLA, BELLATRIX: CAPELLA,
CAPELLA: DENEB, CAPELLA: DENEB,
DENEB: EIP6110,
} }
ALL_PRE_POST_FORKS = ALL_FORK_UPGRADES.items() ALL_PRE_POST_FORKS = ALL_FORK_UPGRADES.items()
AFTER_BELLATRIX_UPGRADES = {key: value for key, value in ALL_FORK_UPGRADES.items() if key != PHASE0} AFTER_BELLATRIX_UPGRADES = {key: value for key, value in ALL_FORK_UPGRADES.items() if key != PHASE0}
@ -42,7 +42,7 @@ AFTER_CAPELLA_UPGRADES = {key: value for key, value in ALL_FORK_UPGRADES.items()
if key not in [PHASE0, ALTAIR]} if key not in [PHASE0, ALTAIR]}
AFTER_CAPELLA_PRE_POST_FORKS = AFTER_CAPELLA_UPGRADES.items() AFTER_CAPELLA_PRE_POST_FORKS = AFTER_CAPELLA_UPGRADES.items()
AFTER_DENEB_UPGRADES = {key: value for key, value in ALL_FORK_UPGRADES.items() AFTER_DENEB_UPGRADES = {key: value for key, value in ALL_FORK_UPGRADES.items()
if key not in [PHASE0, ALTAIR, BELLATRIX, EIP6110]} if key not in [PHASE0, ALTAIR, BELLATRIX]}
AFTER_DENEB_PRE_POST_FORKS = AFTER_DENEB_UPGRADES.items() AFTER_DENEB_PRE_POST_FORKS = AFTER_DENEB_UPGRADES.items()
# #

View File

@ -45,6 +45,7 @@ Operations:
| `execution_payload` | `ExecutionPayload` | `execution_payload` | `process_execution_payload(state, execution_payload)` (new in Bellatrix) | | `execution_payload` | `ExecutionPayload` | `execution_payload` | `process_execution_payload(state, execution_payload)` (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) |
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

@ -38,6 +38,11 @@ if __name__ == "__main__":
deneb_mods = capella_mods deneb_mods = capella_mods
_new_eip6110_mods = {key: 'eth2spec.test.eip6110.block_processing.test_process_' + key for key in [
'deposit_receipt',
]}
eip6110_mods = combine_mods(_new_eip6110_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 [
# 'attestation', # 'attestation',
@ -54,6 +59,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,
} }
run_state_test_generators(runner_name="operations", all_mods=all_mods) run_state_test_generators(runner_name="operations", all_mods=all_mods)