From da1ca7ebf1d4ce3b5789ee0fbee2a986dc51e575 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 17:44:44 -0500 Subject: [PATCH 01/17] Move specs from features to core --- specs/{_features/eip7732 => gloas}/beacon-chain.md | 0 specs/{_features/eip7732 => gloas}/builder.md | 0 specs/{_features/eip7732 => gloas}/fork-choice.md | 0 specs/{_features/eip7732 => gloas}/fork.md | 0 specs/{_features/eip7732 => gloas}/p2p-interface.md | 0 specs/{_features/eip7732 => gloas}/validator.md | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename specs/{_features/eip7732 => gloas}/beacon-chain.md (100%) rename specs/{_features/eip7732 => gloas}/builder.md (100%) rename specs/{_features/eip7732 => gloas}/fork-choice.md (100%) rename specs/{_features/eip7732 => gloas}/fork.md (100%) rename specs/{_features/eip7732 => gloas}/p2p-interface.md (100%) rename specs/{_features/eip7732 => gloas}/validator.md (100%) diff --git a/specs/_features/eip7732/beacon-chain.md b/specs/gloas/beacon-chain.md similarity index 100% rename from specs/_features/eip7732/beacon-chain.md rename to specs/gloas/beacon-chain.md diff --git a/specs/_features/eip7732/builder.md b/specs/gloas/builder.md similarity index 100% rename from specs/_features/eip7732/builder.md rename to specs/gloas/builder.md diff --git a/specs/_features/eip7732/fork-choice.md b/specs/gloas/fork-choice.md similarity index 100% rename from specs/_features/eip7732/fork-choice.md rename to specs/gloas/fork-choice.md diff --git a/specs/_features/eip7732/fork.md b/specs/gloas/fork.md similarity index 100% rename from specs/_features/eip7732/fork.md rename to specs/gloas/fork.md diff --git a/specs/_features/eip7732/p2p-interface.md b/specs/gloas/p2p-interface.md similarity index 100% rename from specs/_features/eip7732/p2p-interface.md rename to specs/gloas/p2p-interface.md diff --git a/specs/_features/eip7732/validator.md b/specs/gloas/validator.md similarity index 100% rename from specs/_features/eip7732/validator.md rename to specs/gloas/validator.md From c0ae1acc684ec1062c81a7634019c550b6572c10 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 17:48:26 -0500 Subject: [PATCH 02/17] Rename variables --- .github/workflows/nightly-tests.yml | 2 +- .github/workflows/run-tests.yml | 2 +- .gitignore | 2 +- Makefile | 2 +- configs/mainnet.yaml | 28 +++++++++---------- configs/minimal.yaml | 28 +++++++++---------- presets/mainnet/eip7732.yaml | 2 +- presets/minimal/eip7732.yaml | 2 +- specs/gloas/builder.md | 2 +- specs/gloas/fork-choice.md | 2 +- specs/gloas/fork.md | 14 +++++----- specs/gloas/p2p-interface.md | 16 +++++------ specs/gloas/validator.md | 12 ++++---- .../unittests/test_config_invariants.py | 2 +- .../test/phase0/fork_choice/test_on_block.py | 6 ++-- 15 files changed, 61 insertions(+), 61 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 711a6845b3..264fca6374 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -31,7 +31,7 @@ jobs: - deneb - electra - fulu - - eip7732 + - gloas - eip7805 steps: - name: Checkout repository diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bbc2bc6f01..703ee0f2b0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -66,7 +66,7 @@ jobs: - deneb - electra - fulu - - eip7732 + - gloas - eip7805 steps: - name: Checkout repository diff --git a/.gitignore b/.gitignore index d9e8151b3a..4a60aeaa14 100644 --- a/.gitignore +++ b/.gitignore @@ -24,9 +24,9 @@ tests/core/pyspec/eth2spec/capella/ tests/core/pyspec/eth2spec/deneb/ tests/core/pyspec/eth2spec/electra/ tests/core/pyspec/eth2spec/fulu/ +tests/core/pyspec/eth2spec/gloas/ tests/core/pyspec/eth2spec/eip6800/ tests/core/pyspec/eth2spec/eip7441/ -tests/core/pyspec/eth2spec/eip7732/ tests/core/pyspec/eth2spec/eip7805/ # coverage reports diff --git a/Makefile b/Makefile index ecb58c1b68..b44ad116e1 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,9 @@ ALL_EXECUTABLE_SPEC_NAMES = \ deneb \ electra \ fulu \ + gloas \ eip6800 \ eip7441 \ - eip7732 \ eip7805 # A list of fake targets. diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index 2958d13abc..dbb020c138 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -55,12 +55,12 @@ ELECTRA_FORK_EPOCH: 364032 # May 7, 2025, 10:05:11am UTC # Fulu FULU_FORK_VERSION: 0x06000000 FULU_FORK_EPOCH: 18446744073709551615 # temporary stub +# Gloas +GLOAS_FORK_VERSION: 0x07000000 # temporary stub +GLOAS_FORK_EPOCH: 18446744073709551615 # EIP7441 EIP7441_FORK_VERSION: 0x08000000 # temporary stub EIP7441_FORK_EPOCH: 18446744073709551615 -# EIP7732 -EIP7732_FORK_VERSION: 0x09000000 # temporary stub -EIP7732_FORK_EPOCH: 18446744073709551615 # EIP7805 EIP7805_FORK_VERSION: 0x0a000000 # temporary stub EIP7805_FORK_EPOCH: 18446744073709551615 @@ -92,15 +92,15 @@ SYNC_MESSAGE_DUE_BPS: 3333 # 6667 basis points, ~67% of SLOT_DURATION_MS CONTRIBUTION_DUE_BPS: 6667 -# EIP7732 +# Gloas # 2500 basis points, 25% of SLOT_DURATION_MS -ATTESTATION_DUE_BPS_EIP7732: 2500 +ATTESTATION_DUE_BPS_GLOAS: 2500 # 5000 basis points, 50% of SLOT_DURATION_MS -AGGREGRATE_DUE_BPS_EIP7732: 5000 +AGGREGRATE_DUE_BPS_GLOAS: 5000 # 2500 basis points, 25% of SLOT_DURATION_MS -SYNC_MESSAGE_DUE_BPS_EIP7732: 2500 +SYNC_MESSAGE_DUE_BPS_GLOAS: 2500 # 5000 basis points, 50% of SLOT_DURATION_MS -CONTRIBUTION_DUE_BPS_EIP7732: 5000 +CONTRIBUTION_DUE_BPS_GLOAS: 5000 # 7500 basis points, 75% of SLOT_DURATION_MS PAYLOAD_ATTESTATION_DUE_BPS: 7500 @@ -220,18 +220,18 @@ BALANCE_PER_ADDITIONAL_CUSTODY_GROUP: 32000000000 # 2**12 (= 4,096) epochs MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096 +# Gloas +# 2**7 (= 128) payloads +MAX_REQUEST_PAYLOADS: 128 +# 20% +PROPOSER_SCORE_BOOST_GLOAS: 20 + # EIP7441 # 2**8 (= 256) epochs EPOCHS_PER_SHUFFLING_PHASE: 256 # 2**1 (= 2) epochs PROPOSER_SELECTION_GAP: 2 -# EIP7732 -# 2**7 (= 128) payloads -MAX_REQUEST_PAYLOADS: 128 -# 20% -PROPOSER_SCORE_BOOST_EIP7732: 20 - # EIP7805 # 2**4 (= 16) inclusion lists MAX_REQUEST_INCLUSION_LIST: 16 diff --git a/configs/minimal.yaml b/configs/minimal.yaml index eb812bc2f4..c40aa433a7 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -51,12 +51,12 @@ ELECTRA_FORK_EPOCH: 18446744073709551615 # [customized] Fulu FULU_FORK_VERSION: 0x06000001 FULU_FORK_EPOCH: 18446744073709551615 +# [customized] Gloas +GLOAS_FORK_VERSION: 0x09000001 +GLOAS_FORK_EPOCH: 18446744073709551615 # [customized] EIP7441 EIP7441_FORK_VERSION: 0x08000001 EIP7441_FORK_EPOCH: 18446744073709551615 -# [customized] EIP7732 -EIP7732_FORK_VERSION: 0x09000001 -EIP7732_FORK_EPOCH: 18446744073709551615 # [customized] EIP7805 EIP7805_FORK_VERSION: 0x0a000001 EIP7805_FORK_EPOCH: 18446744073709551615 @@ -88,15 +88,15 @@ SYNC_MESSAGE_DUE_BPS: 3333 # 6667 basis points, ~67% of SLOT_DURATION_MS CONTRIBUTION_DUE_BPS: 6667 -# EIP7732 +# Gloas # 2500 basis points, 25% of SLOT_DURATION_MS -ATTESTATION_DUE_BPS_EIP7732: 2500 +ATTESTATION_DUE_BPS_GLOAS: 2500 # 5000 basis points, 50% of SLOT_DURATION_MS -AGGREGRATE_DUE_BPS_EIP7732: 5000 +AGGREGRATE_DUE_BPS_GLOAS: 5000 # 2500 basis points, 25% of SLOT_DURATION_MS -SYNC_MESSAGE_DUE_BPS_EIP7732: 2500 +SYNC_MESSAGE_DUE_BPS_GLOAS: 2500 # 5000 basis points, 50% of SLOT_DURATION_MS -CONTRIBUTION_DUE_BPS_EIP7732: 5000 +CONTRIBUTION_DUE_BPS_GLOAS: 5000 # 7500 basis points, 75% of SLOT_DURATION_MS PAYLOAD_ATTESTATION_DUE_BPS: 7500 @@ -217,18 +217,18 @@ BALANCE_PER_ADDITIONAL_CUSTODY_GROUP: 32000000000 # 2**12 (= 4,096) epochs MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096 +# Gloas +# 2**7 (= 128) payloads +MAX_REQUEST_PAYLOADS: 128 +# 20% +PROPOSER_SCORE_BOOST_GLOAS: 20 + # EIP7441 # [customized] 2**2 (= 4) epochs EPOCHS_PER_SHUFFLING_PHASE: 4 # [customized] 2**0 (= 1) epochs PROPOSER_SELECTION_GAP: 1 -# EIP7732 -# 2**7 (= 128) payloads -MAX_REQUEST_PAYLOADS: 128 -# 20% -PROPOSER_SCORE_BOOST_EIP7732: 20 - # EIP7805 # 2**4 (= 16) inclusion lists MAX_REQUEST_INCLUSION_LIST: 16 diff --git a/presets/mainnet/eip7732.yaml b/presets/mainnet/eip7732.yaml index b8d67f747c..32928edb11 100644 --- a/presets/mainnet/eip7732.yaml +++ b/presets/mainnet/eip7732.yaml @@ -3,7 +3,7 @@ # Networking # --------------------------------------------------------------- # floorlog2(get_generalized_index(BeaconBlockBody, "signed_execution_payload_header", "message", "blob_kzg_commitments_root")) (= 9) -KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_EIP7732: 9 +KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS: 9 # Execution # --------------------------------------------------------------- diff --git a/presets/minimal/eip7732.yaml b/presets/minimal/eip7732.yaml index 5505d53852..1c39c5ca9b 100644 --- a/presets/minimal/eip7732.yaml +++ b/presets/minimal/eip7732.yaml @@ -3,7 +3,7 @@ # Networking # --------------------------------------------------------------- # floorlog2(get_generalized_index(BeaconBlockBody, "signed_execution_payload_header", "message", "blob_kzg_commitments_root")) (= 9) -KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_EIP7732: 9 +KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS: 9 # Execution # --------------------------------------------------------------- diff --git a/specs/gloas/builder.md b/specs/gloas/builder.md index 431731c962..8a78ae6fe8 100644 --- a/specs/gloas/builder.md +++ b/specs/gloas/builder.md @@ -150,7 +150,7 @@ def get_data_column_sidecars( signed_block_header: SignedBeaconBlockHeader, kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK], # [Modified in EIP7732] - kzg_commitments_inclusion_proof: Vector[Bytes32, KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_EIP7732], + kzg_commitments_inclusion_proof: Vector[Bytes32, KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS], cells_and_kzg_proofs: Sequence[ Tuple[Vector[Cell, CELLS_PER_EXT_BLOB], Vector[KZGProof, CELLS_PER_EXT_BLOB]] ], diff --git a/specs/gloas/fork-choice.md b/specs/gloas/fork-choice.md index ab969d49a8..5f37dfe522 100644 --- a/specs/gloas/fork-choice.md +++ b/specs/gloas/fork-choice.md @@ -487,7 +487,7 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None: seconds_since_genesis = store.time - store.genesis_time time_into_slot_ms = seconds_to_milliseconds(seconds_since_genesis) % SLOT_DURATION_MS # [Modified in EIP7732] - attestation_threshold_ms = get_slot_component_duration_ms(ATTESTATION_DUE_BPS_EIP7732) + attestation_threshold_ms = get_slot_component_duration_ms(ATTESTATION_DUE_BPS_GLOAS) is_before_attesting_interval = time_into_slot_ms < attestation_threshold_ms is_timely = get_current_slot(store) == block.slot and is_before_attesting_interval store.block_timeliness[hash_tree_root(block)] = is_timely diff --git a/specs/gloas/fork.md b/specs/gloas/fork.md index f36e5b4479..6c8db01624 100644 --- a/specs/gloas/fork.md +++ b/specs/gloas/fork.md @@ -25,8 +25,8 @@ Warning: this configuration is not definitive. | Name | Value | | ---------------------- | ------------------------------------- | -| `EIP7732_FORK_VERSION` | `Version('0x09000000')` | -| `EIP7732_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | +| `GLOAS_FORK_VERSION` | `Version('0x09000000')` | +| `GLOAS_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | ## Helper functions @@ -39,8 +39,8 @@ def compute_fork_version(epoch: Epoch) -> Version: """ Return the fork version at the given ``epoch``. """ - if epoch >= EIP7732_FORK_EPOCH: - return EIP7732_FORK_VERSION + if epoch >= GLOAS_FORK_EPOCH: + return GLOAS_FORK_VERSION if epoch >= FULU_FORK_EPOCH: return FULU_FORK_VERSION if epoch >= ELECTRA_FORK_EPOCH: @@ -60,13 +60,13 @@ def compute_fork_version(epoch: Epoch) -> Version: ### Fork trigger -The fork is triggered at epoch `EIP7732_FORK_EPOCH`. The EIP may be combined +The fork is triggered at epoch `GLOAS_FORK_EPOCH`. The EIP may be combined with other consensus-layer upgrade. ### Upgrading the state If `state.slot % SLOTS_PER_EPOCH == 0` and -`compute_epoch_at_slot(state.slot) == EIP7732_FORK_EPOCH`, an irregular state +`compute_epoch_at_slot(state.slot) == GLOAS_FORK_EPOCH`, an irregular state change is made to upgrade to EIP-7732. ```python @@ -80,7 +80,7 @@ def upgrade_to_eip7732(pre: fulu.BeaconState) -> BeaconState: fork=Fork( previous_version=pre.fork.current_version, # [Modified in EIP7732] - current_version=EIP7732_FORK_VERSION, + current_version=GLOAS_FORK_VERSION, epoch=epoch, ), latest_block_header=pre.latest_block_header, diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index ecf37f584d..f1c3877ded 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -47,7 +47,7 @@ specifications of previous upgrades, and assumes them as pre-requisite. | Name | Value | Description | | ----------------------------------------------- | ----- | ----------------------------------------------------------- | -| `KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_EIP7732` | `9` | Merkle proof depth for the `blob_kzg_commitments` list item | +| `KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS` | `9` | Merkle proof depth for the `blob_kzg_commitments` list item | ### Configuration @@ -72,7 +72,7 @@ class DataColumnSidecar(Container): kzg_proofs: List[KZGProof, MAX_BLOB_COMMITMENTS_PER_BLOCK] signed_block_header: SignedBeaconBlockHeader # [Modified in EIP7732] - kzg_commitments_inclusion_proof: Vector[Bytes32, KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_EIP7732] + kzg_commitments_inclusion_proof: Vector[Bytes32, KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS] ``` #### Helpers @@ -92,7 +92,7 @@ def verify_data_column_sidecar_inclusion_proof(sidecar: DataColumnSidecar) -> bo leaf=hash_tree_root(sidecar.kzg_commitments), branch=sidecar.kzg_commitments_inclusion_proof, # [Modified in EIP7732] - depth=KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_EIP7732, + depth=KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS, # [Modified in EIP7732] index=get_subtree_index( get_generalized_index( @@ -301,7 +301,7 @@ The following validations are removed: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | -| `EIP7732_FORK_VERSION` | `eip7732.SignedBeaconBlock` | +| `GLOAS_FORK_VERSION` | `eip7732.SignedBeaconBlock` | ##### BeaconBlocksByRoot v2 @@ -318,7 +318,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | -| `EIP7732_FORK_VERSION` | `eip7732.SignedBeaconBlock` | +| `GLOAS_FORK_VERSION` | `eip7732.SignedBeaconBlock` | ##### BlobSidecarsByRoot v1 @@ -329,7 +329,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `fork_version` | Chunk SSZ type | | ---------------------- | --------------------- | | `DENEB_FORK_VERSION` | `deneb.BlobSidecar` | -| `EIP7732_FORK_VERSION` | `eip7732.BlobSidecar` | +| `GLOAS_FORK_VERSION` | `eip7732.BlobSidecar` | ##### ExecutionPayloadEnvelopesByRange v1 @@ -369,7 +369,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `fork_version` | Chunk SSZ type | | ---------------------- | ---------------------------------------- | -| `EIP7732_FORK_VERSION` | `eip7732.SignedExecutionPayloadEnvelope` | +| `GLOAS_FORK_VERSION` | `eip7732.SignedExecutionPayloadEnvelope` | ##### ExecutionPayloadEnvelopesByRoot v1 @@ -382,7 +382,7 @@ The `` field is calculated as | `fork_version` | Chunk SSZ type | | ---------------------- | ---------------------------------------- | -| `EIP7732_FORK_VERSION` | `eip7732.SignedExecutionPayloadEnvelope` | +| `GLOAS_FORK_VERSION` | `eip7732.SignedExecutionPayloadEnvelope` | Request Content: diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index 08a4c5c014..909173e0e3 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -34,10 +34,10 @@ included in the EIP-7732 fork. | Name | Value | Unit | Duration | | ------------------------------ | -------------- | :----------: | :-----------------------: | -| `ATTESTATION_DUE_BPS_EIP7732` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | -| `AGGREGRATE_DUE_BPS_EIP7732` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | -| `SYNC_MESSAGE_DUE_BPS_EIP7732` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | -| `CONTRIBUTION_DUE_BPS_EIP7732` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | +| `ATTESTATION_DUE_BPS_GLOAS` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | +| `AGGREGRATE_DUE_BPS_GLOAS` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | +| `SYNC_MESSAGE_DUE_BPS_GLOAS` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | +| `CONTRIBUTION_DUE_BPS_GLOAS` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | | `PAYLOAD_ATTESTATION_DUE_BPS` | `uint64(7500)` | basis points | 75% of `SLOT_DURATION_MS` | ## Validator assignment @@ -89,7 +89,7 @@ All validator responsibilities remain unchanged other than the following: ### Attestation -The attestation deadline is changed with `ATTESTATION_DUE_BPS_EIP7732`. +The attestation deadline is changed with `ATTESTATION_DUE_BPS_GLOAS`. Moreover, the `attestation.data.index` field is now used to signal the payload status of the block being attested to (`attestation.data.beacon_block_root`). With the alias `data = attestation.data`, the validator should set this field as @@ -107,7 +107,7 @@ follows: ### Sync Committee participations Sync committee duties are not changed for validators, however the submission -deadline is changed with `SYNC_MESSAGE_DUE_BPS_EIP7732`. +deadline is changed with `SYNC_MESSAGE_DUE_BPS_GLOAS`. ### Block proposal diff --git a/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py index 7be2587fa1..9a36c15f25 100644 --- a/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py +++ b/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py @@ -15,4 +15,4 @@ def test_networking(spec): "message", "blob_kzg_commitments_root", ) - assert spec.floorlog2(gindex) == spec.KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_EIP7732 + assert spec.floorlog2(gindex) == spec.KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py index d30075e942..a9ae0d46f0 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py @@ -514,7 +514,7 @@ def test_proposer_boost(spec, state): # Round up to nearest second if is_post_eip7732(spec): late_block_cutoff_ms = spec.get_slot_component_duration_ms( - spec.config.ATTESTATION_DUE_BPS_EIP7732 + spec.config.ATTESTATION_DUE_BPS_GLOAS ) else: late_block_cutoff_ms = spec.get_slot_component_duration_ms(spec.config.ATTESTATION_DUE_BPS) @@ -619,7 +619,7 @@ def test_proposer_boost_root_same_slot_untimely_block(spec, state): # Round up to nearest second if is_post_eip7732(spec): late_block_cutoff_ms = spec.get_slot_component_duration_ms( - spec.config.ATTESTATION_DUE_BPS_EIP7732 + spec.config.ATTESTATION_DUE_BPS_GLOAS ) else: late_block_cutoff_ms = spec.get_slot_component_duration_ms(spec.config.ATTESTATION_DUE_BPS) @@ -665,7 +665,7 @@ def test_proposer_boost_is_first_block(spec, state): # Round up to nearest second if is_post_eip7732(spec): late_block_cutoff_ms = spec.get_slot_component_duration_ms( - spec.config.ATTESTATION_DUE_BPS_EIP7732 + spec.config.ATTESTATION_DUE_BPS_GLOAS ) else: late_block_cutoff_ms = spec.get_slot_component_duration_ms(spec.config.ATTESTATION_DUE_BPS) From e5a93064facff9cd1d50ed8611c2a174d71f3f29 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 17:49:48 -0500 Subject: [PATCH 03/17] Update fork comments --- specs/gloas/beacon-chain.md | 52 ++++++++++++++++++------------------ specs/gloas/builder.md | 6 ++--- specs/gloas/fork-choice.md | 10 +++---- specs/gloas/fork.md | 14 +++++----- specs/gloas/p2p-interface.md | 14 +++++----- specs/gloas/validator.md | 4 +-- 6 files changed, 50 insertions(+), 50 deletions(-) diff --git a/specs/gloas/beacon-chain.md b/specs/gloas/beacon-chain.md index 0e6cb34b37..aebceb59af 100644 --- a/specs/gloas/beacon-chain.md +++ b/specs/gloas/beacon-chain.md @@ -255,16 +255,16 @@ class BeaconBlockBody(Container): deposits: List[Deposit, MAX_DEPOSITS] voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS] sync_aggregate: SyncAggregate - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Removed `execution_payload` bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES] - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Removed `blob_kzg_commitments` - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Removed `execution_requests` - # [New in EIP7732] + # [New in Gloas:EIP7732] signed_execution_payload_header: SignedExecutionPayloadHeader - # [New in EIP7732] + # [New in Gloas:EIP7732] payload_attestations: List[PayloadAttestation, MAX_PAYLOAD_ATTESTATIONS] ``` @@ -336,15 +336,15 @@ class BeaconState(Container): pending_partial_withdrawals: List[PendingPartialWithdrawal, PENDING_PARTIAL_WITHDRAWALS_LIMIT] pending_consolidations: List[PendingConsolidation, PENDING_CONSOLIDATIONS_LIMIT] proposer_lookahead: Vector[ValidatorIndex, (MIN_SEED_LOOKAHEAD + 1) * SLOTS_PER_EPOCH] - # [New in EIP7732] + # [New in Gloas:EIP7732] execution_payload_availability: Bitvector[SLOTS_PER_HISTORICAL_ROOT] - # [New in EIP7732] + # [New in Gloas:EIP7732] builder_pending_payments: Vector[BuilderPendingPayment, 2 * SLOTS_PER_EPOCH] - # [New in EIP7732] + # [New in Gloas:EIP7732] builder_pending_withdrawals: List[BuilderPendingWithdrawal, BUILDER_PENDING_WITHDRAWALS_LIMIT] - # [New in EIP7732] + # [New in Gloas:EIP7732] latest_block_hash: Hash32 - # [New in EIP7732] + # [New in Gloas:EIP7732] latest_withdrawals_root: Root ``` @@ -669,7 +669,7 @@ def process_slot(state: BeaconState) -> None: # Cache block root previous_block_root = hash_tree_root(state.latest_block_header) state.block_roots[state.slot % SLOTS_PER_HISTORICAL_ROOT] = previous_block_root - # [New in EIP7732] + # [New in Gloas:EIP7732] # Unset the next payload availability state.execution_payload_availability[(state.slot + 1) % SLOTS_PER_HISTORICAL_ROOT] = 0b0 ``` @@ -698,7 +698,7 @@ def process_epoch(state: BeaconState) -> None: process_participation_flag_updates(state) process_sync_committee_updates(state) process_proposer_lookahead(state) - # [New in EIP7732] + # [New in Gloas:EIP7732] process_builder_pending_payments(state) ``` @@ -730,15 +730,15 @@ functions and removes the call to `process_execution_payload`. ```python def process_block(state: BeaconState, block: BeaconBlock) -> None: process_block_header(state, block) - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] process_withdrawals(state) - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Removed `process_execution_payload` - # [New in EIP7732] + # [New in Gloas:EIP7732] process_execution_payload_header(state, block) process_randao(state, block.body) process_eth1_data(state, block.body) - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] process_operations(state, block.body) process_sync_aggregate(state, block.body.sync_aggregate) ``` @@ -773,7 +773,7 @@ def get_expected_withdrawals(state: BeaconState) -> Tuple[Sequence[Withdrawal], processed_partial_withdrawals_count = 0 processed_builder_withdrawals_count = 0 - # [New in EIP7732] + # [New in Gloas:EIP7732] # Sweep for builder payments for withdrawal in state.builder_pending_withdrawals: if ( @@ -1027,18 +1027,18 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None: for_ops(body.proposer_slashings, process_proposer_slashing) for_ops(body.attester_slashings, process_attester_slashing) - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] for_ops(body.attestations, process_attestation) for_ops(body.deposits, process_deposit) for_ops(body.voluntary_exits, process_voluntary_exit) for_ops(body.bls_to_execution_changes, process_bls_to_execution_change) - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Removed `process_deposit_request` - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Removed `process_withdrawal_request` - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Removed `process_consolidation_request` - # [New in EIP7732] + # [New in Gloas:EIP7732] for_ops(body.payload_attestations, process_payload_attestation) ``` @@ -1057,7 +1057,7 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None: assert data.target.epoch == compute_epoch_at_slot(data.slot) assert data.slot + MIN_ATTESTATION_INCLUSION_DELAY <= state.slot - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] assert data.index < 2 committee_indices = get_committee_indices(attestation.committee_bits) committee_offset = 0 @@ -1095,7 +1095,7 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None: proposer_reward_numerator = 0 for index in get_attesting_indices(state, attestation): - # [New in EIP7732] + # [New in Gloas:EIP7732] # For same-slot attestations, check if we're setting any new flags # If we are, this validator hasn't contributed to this slot's quorum yet will_set_new_flag = False @@ -1108,7 +1108,7 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None: proposer_reward_numerator += get_base_reward(state, index) * weight will_set_new_flag = True - # [New in EIP7732] + # [New in Gloas:EIP7732] # Add weight for same-slot attestations when any new flag is set # This ensures each validator contributes exactly once per slot if will_set_new_flag and is_attestation_same_slot(state, data): @@ -1186,7 +1186,7 @@ def validate_merge_block(block: BeaconBlock) -> None: ) return - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] pow_block = get_pow_block(block.body.signed_execution_payload_header.message.parent_block_hash) # Check if `pow_block` is available assert pow_block is not None diff --git a/specs/gloas/builder.md b/specs/gloas/builder.md index 8a78ae6fe8..9c266f67a2 100644 --- a/specs/gloas/builder.md +++ b/specs/gloas/builder.md @@ -149,7 +149,7 @@ blob KZG commitments inclusion proof type with a different length. def get_data_column_sidecars( signed_block_header: SignedBeaconBlockHeader, kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK], - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] kzg_commitments_inclusion_proof: Vector[Bytes32, KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS], cells_and_kzg_proofs: Sequence[ Tuple[Vector[Cell, CELLS_PER_EXT_BLOB], Vector[KZGProof, CELLS_PER_EXT_BLOB]] @@ -189,7 +189,7 @@ inclusion proof given that these are in the `ExecutionPayloadEnvelope` now. ```python def get_data_column_sidecars_from_block( signed_block: SignedBeaconBlock, - # [New in EIP7732] + # [New in Gloas:EIP7732] blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK], cells_and_kzg_proofs: Sequence[ Tuple[Vector[Cell, CELLS_PER_EXT_BLOB], Vector[KZGProof, CELLS_PER_EXT_BLOB]] @@ -200,7 +200,7 @@ def get_data_column_sidecars_from_block( block, assemble the sidecars which can be distributed to peers. """ signed_block_header = compute_signed_block_header(signed_block) - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] kzg_commitments_inclusion_proof = compute_merkle_proof( signed_block.message.body, get_generalized_index( diff --git a/specs/gloas/fork-choice.md b/specs/gloas/fork-choice.md index 5f37dfe522..9100af3e88 100644 --- a/specs/gloas/fork-choice.md +++ b/specs/gloas/fork-choice.md @@ -124,9 +124,9 @@ class Store(object): checkpoint_states: Dict[Checkpoint, BeaconState] = field(default_factory=dict) latest_messages: Dict[ValidatorIndex, LatestMessage] = field(default_factory=dict) unrealized_justifications: Dict[Root, Checkpoint] = field(default_factory=dict) - # [New in EIP7732] + # [New in Gloas:EIP7732] execution_payload_states: Dict[Root, BeaconState] = field(default_factory=dict) - # [New in EIP7732] + # [New in Gloas:EIP7732] ptc_vote: Dict[Root, Vector[boolean, PTC_SIZE]] = field(default_factory=dict) ``` @@ -153,7 +153,7 @@ def get_forkchoice_store(anchor_state: BeaconState, anchor_block: BeaconBlock) - block_states={anchor_root: copy(anchor_state)}, checkpoint_states={justified_checkpoint: copy(anchor_state)}, unrealized_justifications={anchor_root: justified_checkpoint}, - # [New in EIP7732] + # [New in Gloas:EIP7732] execution_payload_states={anchor_root: copy(anchor_state)}, ptc_vote={anchor_root: Vector[boolean, PTC_SIZE]()}, ) @@ -486,7 +486,7 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None: # Add proposer score boost if the block is timely seconds_since_genesis = store.time - store.genesis_time time_into_slot_ms = seconds_to_milliseconds(seconds_since_genesis) % SLOT_DURATION_MS - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] attestation_threshold_ms = get_slot_component_duration_ms(ATTESTATION_DUE_BPS_GLOAS) is_before_attesting_interval = time_into_slot_ms < attestation_threshold_ms is_timely = get_current_slot(store) == block.slot and is_before_attesting_interval @@ -599,7 +599,7 @@ def validate_on_attestation(store: Store, attestation: Attestation, is_from_bloc block_slot = store.blocks[attestation.data.beacon_block_root].slot assert block_slot <= attestation.data.slot - # [New in EIP7732] + # [New in Gloas:EIP7732] assert attestation.data.index in [0, 1] if block_slot == attestation.data.slot: assert attestation.data.index == 0 diff --git a/specs/gloas/fork.md b/specs/gloas/fork.md index 6c8db01624..306b123280 100644 --- a/specs/gloas/fork.md +++ b/specs/gloas/fork.md @@ -79,7 +79,7 @@ def upgrade_to_eip7732(pre: fulu.BeaconState) -> BeaconState: slot=pre.slot, fork=Fork( previous_version=pre.fork.current_version, - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] current_version=GLOAS_FORK_VERSION, epoch=epoch, ), @@ -103,7 +103,7 @@ def upgrade_to_eip7732(pre: fulu.BeaconState) -> BeaconState: inactivity_scores=pre.inactivity_scores, current_sync_committee=pre.current_sync_committee, next_sync_committee=pre.next_sync_committee, - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] latest_execution_payload_header=ExecutionPayloadHeader(), next_withdrawal_index=pre.next_withdrawal_index, next_withdrawal_validator_index=pre.next_withdrawal_validator_index, @@ -118,15 +118,15 @@ def upgrade_to_eip7732(pre: fulu.BeaconState) -> BeaconState: pending_partial_withdrawals=pre.pending_partial_withdrawals, pending_consolidations=pre.pending_consolidations, proposer_lookahead=pre.proposer_lookahead, - # [New in EIP7732] + # [New in Gloas:EIP7732] execution_payload_availability=[0b1 for _ in range(SLOTS_PER_HISTORICAL_ROOT)], - # [New in EIP7732] + # [New in Gloas:EIP7732] builder_pending_payments=[BuilderPendingPayment() for _ in range(2 * SLOTS_PER_EPOCH)], - # [New in EIP7732] + # [New in Gloas:EIP7732] builder_pending_withdrawals=[], - # [New in EIP7732] + # [New in Gloas:EIP7732] latest_block_hash=pre.latest_execution_payload_header.block_hash, - # [New in EIP7732] + # [New in Gloas:EIP7732] latest_withdrawals_root=Root(), ) diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index f1c3877ded..e08629b882 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -43,7 +43,7 @@ specifications of previous upgrades, and assumes them as pre-requisite. ### Preset -*[Modified in EIP7732]* +*[Modified in Gloas:EIP7732]* | Name | Value | Description | | ----------------------------------------------- | ----- | ----------------------------------------------------------- | @@ -51,7 +51,7 @@ specifications of previous upgrades, and assumes them as pre-requisite. ### Configuration -*[New in EIP7732]* +*[New in Gloas:EIP7732]* | Name | Value | Description | | ---------------------- | -------------- | ----------------------------------------------------------------- | @@ -71,7 +71,7 @@ class DataColumnSidecar(Container): kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] kzg_proofs: List[KZGProof, MAX_BLOB_COMMITMENTS_PER_BLOCK] signed_block_header: SignedBeaconBlockHeader - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] kzg_commitments_inclusion_proof: Vector[Bytes32, KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS] ``` @@ -91,9 +91,9 @@ def verify_data_column_sidecar_inclusion_proof(sidecar: DataColumnSidecar) -> bo return is_valid_merkle_branch( leaf=hash_tree_root(sidecar.kzg_commitments), branch=sidecar.kzg_commitments_inclusion_proof, - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] depth=KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS, - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] index=get_subtree_index( get_generalized_index( BeaconBlockBody, @@ -151,7 +151,7 @@ The following validations are removed: ###### `beacon_block` -*[Modified in EIP7732]* +*[Modified in Gloas:EIP7732]* The *type* of the payload of this topic changes to the (modified) `SignedBeaconBlock` found in [the Beacon Chain changes](./beacon-chain.md). @@ -336,7 +336,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: **Protocol ID:** `/eth2/beacon_chain/req/execution_payload_envelopes_by_range/1/` -*[New in EIP7732]* +*[New in Gloas:EIP7732]* Request Content: diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index 909173e0e3..d9da102724 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -69,7 +69,7 @@ def get_ptc_assignment( ### Lookahead -*[New in EIP7732]* +*[New in Gloas:EIP7732]* `get_ptc_assignment` should be called at the start of each epoch to get the assignment for the next epoch (`current_epoch + 1`). A validator should plan for @@ -232,7 +232,7 @@ def prepare_execution_payload( # Verify consistency of the parent hash with respect to the previous execution payload header parent_hash = state.latest_execution_payload_header.block_hash - # [Modified in EIP7732] + # [Modified in Gloas:EIP7732] # Set the forkchoice head and initiate the payload build process withdrawals, _, _ = get_expected_withdrawals(state) From 1d6709ac583e4fbb142daa7af01e6da1aad44353 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 17:51:47 -0500 Subject: [PATCH 04/17] Update references to EIP-7732 --- specs/gloas/beacon-chain.md | 4 ++-- specs/gloas/builder.md | 6 +++--- specs/gloas/fork-choice.md | 4 ++-- specs/gloas/fork.md | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/specs/gloas/beacon-chain.md b/specs/gloas/beacon-chain.md index aebceb59af..55ef9e54a3 100644 --- a/specs/gloas/beacon-chain.md +++ b/specs/gloas/beacon-chain.md @@ -1,4 +1,4 @@ -# EIP-7732 -- The Beacon Chain +# Gloas -- The Beacon Chain *Note*: This document is a work-in-progress for researchers and implementers. @@ -637,7 +637,7 @@ def get_builder_payment_quorum_threshold(state: BeaconState) -> uint64: ## Beacon chain state transition function -*Note*: state transition is fundamentally modified in EIP-7732. The full state +*Note*: state transition is fundamentally modified in Gloas. The full state transition is broken in two parts, first importing a signed block and then importing an execution payload. diff --git a/specs/gloas/builder.md b/specs/gloas/builder.md index 9c266f67a2..5589d6b534 100644 --- a/specs/gloas/builder.md +++ b/specs/gloas/builder.md @@ -1,4 +1,4 @@ -# EIP-7732 -- Honest Builder +# Gloas -- Honest Builder *Note*: This document is a work-in-progress for researchers and implementers. @@ -26,7 +26,7 @@ This is an accompanying document which describes the expected actions of a "builder" participating in the Ethereum proof-of-stake protocol. -With the EIP-7732 Fork, the protocol includes new staked participants of the +With the Gloas fork, the protocol includes new staked participants of the protocol called *Builders*. While Builders are a subset of the validator set, they have extra attributions that are optional. Validators may opt to not be builders and as such we collect the set of guidelines for those validators that @@ -38,7 +38,7 @@ want to act as builders in this document. The `withdrawal_credentials` field for builders has a specific format that identifies them as registered builders in the network. Builders must use the -`BUILDER_WITHDRAWAL_PREFIX` to participate in the EIP-7732 mechanism. +`BUILDER_WITHDRAWAL_PREFIX` to participate in the Gloas mechanism. The `withdrawal_credentials` field must be such that: diff --git a/specs/gloas/fork-choice.md b/specs/gloas/fork-choice.md index 9100af3e88..0bada22e22 100644 --- a/specs/gloas/fork-choice.md +++ b/specs/gloas/fork-choice.md @@ -1,4 +1,4 @@ -# EIP-7732 -- Fork Choice +# Gloas -- Fork Choice *Note*: This document is a work-in-progress for researchers and implementers. @@ -37,7 +37,7 @@ ## Introduction -This is the modification of the fork-choice accompanying the EIP-7732 upgrade. +This is the modification of the fork-choice accompanying the Gloas upgrade. ## Custom types diff --git a/specs/gloas/fork.md b/specs/gloas/fork.md index 306b123280..0b1c5da785 100644 --- a/specs/gloas/fork.md +++ b/specs/gloas/fork.md @@ -1,4 +1,4 @@ -# EIP-7732 -- Fork Logic +# Gloas -- Fork Logic *Note*: This document is a work-in-progress for researchers and implementers. @@ -17,7 +17,7 @@ ## Introduction -This document describes the process of the EIP-7732 upgrade. +This document describes the process of the Gloas upgrade. ## Configuration @@ -56,7 +56,7 @@ def compute_fork_version(epoch: Epoch) -> Version: return GENESIS_FORK_VERSION ``` -## Fork to EIP-7732 +## Fork to Gloas ### Fork trigger @@ -67,10 +67,10 @@ with other consensus-layer upgrade. If `state.slot % SLOTS_PER_EPOCH == 0` and `compute_epoch_at_slot(state.slot) == GLOAS_FORK_EPOCH`, an irregular state -change is made to upgrade to EIP-7732. +change is made to upgrade to Gloas. ```python -def upgrade_to_eip7732(pre: fulu.BeaconState) -> BeaconState: +def upgrade_to_gloas(pre: fulu.BeaconState) -> BeaconState: epoch = fulu.get_current_epoch(pre) post = BeaconState( From e938f8eb018b5bc52d10ea4a49faaffdb309809d Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 17:54:28 -0500 Subject: [PATCH 05/17] Update more references to EIP-7732 --- specs/gloas/fork.md | 3 +-- specs/gloas/p2p-interface.md | 12 ++++++------ specs/gloas/validator.md | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/specs/gloas/fork.md b/specs/gloas/fork.md index 0b1c5da785..af9e259bb0 100644 --- a/specs/gloas/fork.md +++ b/specs/gloas/fork.md @@ -60,8 +60,7 @@ def compute_fork_version(epoch: Epoch) -> Version: ### Fork trigger -The fork is triggered at epoch `GLOAS_FORK_EPOCH`. The EIP may be combined -with other consensus-layer upgrade. +The fork is triggered at epoch `GLOAS_FORK_EPOCH`. ### Upgrading the state diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index e08629b882..77c22fc08b 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -1,11 +1,11 @@ -# EIP-7732 -- Networking +# Gloas -- Networking *Note*: This document is a work-in-progress for researchers and implementers. - [Introduction](#introduction) -- [Modification in EIP-7732](#modification-in-eip-7732) +- [Modification in Gloas](#modification-in-gloas) - [Preset](#preset) - [Configuration](#configuration) - [Containers](#containers) @@ -39,7 +39,7 @@ This document contains the consensus-layer networking specification for EIP7732. The specification of these changes continues in the same format as the network specifications of previous upgrades, and assumes them as pre-requisite. -## Modification in EIP-7732 +## Modification in Gloas ### Preset @@ -79,7 +79,7 @@ class DataColumnSidecar(Container): ##### Modified `verify_data_column_sidecar_inclusion_proof` -`verify_data_column_sidecar_inclusion_proof` is modified in EIP-7732 to account +`verify_data_column_sidecar_inclusion_proof` is modified in Gloas to account for the fact that the KZG commitments are included in the `ExecutionPayloadEnvelope` and no longer in the beacon block body. @@ -108,7 +108,7 @@ def verify_data_column_sidecar_inclusion_proof(sidecar: DataColumnSidecar) -> bo ### The gossip domain: gossipsub -Some gossip meshes are upgraded in the fork of EIP-7732 to support upgraded +Some gossip meshes are upgraded in the fork of Gloas to support upgraded types. #### Topics and messages @@ -132,7 +132,7 @@ are given in this table: ##### Global topics -EIP-7732 introduces new global topics for execution header, execution payload +Gloas introduces new global topics for execution header, execution payload and payload attestation. ###### `beacon_aggregate_and_proof` diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index d9da102724..1f0620e249 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -1,4 +1,4 @@ -# EIP-7732 -- Honest Validator +# Gloas -- Honest Validator *Note*: This document is a work-in-progress for researchers and implementers. @@ -26,7 +26,7 @@ ## Introduction This document represents the changes and additions to the Honest validator guide -included in the EIP-7732 fork. +included in Gloas. ## Configuration From ee1b862375a0ffef771eb79c9258cac176119485 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 18:07:02 -0500 Subject: [PATCH 06/17] Rename remaining instances of EIP7732 --- configs/minimal.yaml | 2 +- presets/mainnet/eip7732.yaml | 13 ---- presets/minimal/eip7732.yaml | 13 ---- pysetup/constants.py | 2 +- pysetup/md_doc_paths.py | 4 +- pysetup/spec_builders/__init__.py | 4 +- pysetup/spec_builders/eip7732.py | 29 -------- specs/gloas/fork.md | 2 +- specs/gloas/p2p-interface.md | 12 +-- .../test_process_execution_payload.py | 48 ++++++------ .../test_should_override_forkchoice_update.py | 6 +- .../test/bellatrix/sanity/test_blocks.py | 6 +- .../test/bellatrix/sync/test_optimistic.py | 4 +- .../bellatrix/unittests/test_transition.py | 4 +- .../unittests/test_validate_merge_block.py | 16 ++-- .../block_processing/test_process_deposit.py | 4 +- .../test_process_withdrawals.py | 74 +++++++++---------- .../light_client/test_single_merkle_proof.py | 4 +- .../test/capella/sanity/test_blocks.py | 10 +-- tests/core/pyspec/eth2spec/test/context.py | 4 +- .../test_process_execution_payload.py | 62 ++++++++-------- .../eth2spec/test/deneb/sanity/test_blocks.py | 20 ++--- .../deneb/unittests/test_config_invariants.py | 4 +- .../test_process_execution_payload_header.py | 38 +++++----- .../test_process_payload_attestation.py | 18 ++--- .../unittests/test_config_invariants.py | 4 +- .../fork_choice/test_deposit_with_reorg.py | 6 +- .../test/electra/sanity/blocks/test_blocks.py | 34 ++++----- .../test/fulu/fork_choice/test_on_block.py | 38 +++++----- .../merkle_proof/test_single_merkle_proof.py | 8 +- .../test/fulu/unittests/test_networking.py | 4 +- .../eth2spec/test/helpers/attestations.py | 4 +- .../core/pyspec/eth2spec/test/helpers/blob.py | 6 +- .../pyspec/eth2spec/test/helpers/block.py | 4 +- .../pyspec/eth2spec/test/helpers/constants.py | 11 +-- .../test/helpers/execution_payload.py | 18 ++--- .../eth2spec/test/helpers/fork_choice.py | 16 ++-- .../eth2spec/test/helpers/fork_transition.py | 6 +- .../pyspec/eth2spec/test/helpers/forks.py | 10 +-- .../pyspec/eth2spec/test/helpers/genesis.py | 12 +-- .../pyspec/eth2spec/test/helpers/state.py | 6 +- .../eth2spec/test/helpers/withdrawals.py | 8 +- .../test_process_block_header.py | 6 +- .../test/phase0/fork_choice/test_ex_ante.py | 14 ++-- .../test/phase0/fork_choice/test_get_head.py | 16 ++-- .../fork_choice/test_get_proposer_head.py | 6 +- .../test/phase0/fork_choice/test_on_block.py | 34 ++++----- .../test/phase0/fork_choice/test_reorg.py | 6 +- .../test/phase0/sanity/test_blocks.py | 8 +- .../fork_choice/test_on_attestation.py | 4 +- tests/formats/operations/README.md | 2 +- 51 files changed, 320 insertions(+), 374 deletions(-) delete mode 100644 presets/mainnet/eip7732.yaml delete mode 100644 presets/minimal/eip7732.yaml delete mode 100644 pysetup/spec_builders/eip7732.py diff --git a/configs/minimal.yaml b/configs/minimal.yaml index c40aa433a7..51087116bd 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -52,7 +52,7 @@ ELECTRA_FORK_EPOCH: 18446744073709551615 FULU_FORK_VERSION: 0x06000001 FULU_FORK_EPOCH: 18446744073709551615 # [customized] Gloas -GLOAS_FORK_VERSION: 0x09000001 +GLOAS_FORK_VERSION: 0x07000001 GLOAS_FORK_EPOCH: 18446744073709551615 # [customized] EIP7441 EIP7441_FORK_VERSION: 0x08000001 diff --git a/presets/mainnet/eip7732.yaml b/presets/mainnet/eip7732.yaml deleted file mode 100644 index 32928edb11..0000000000 --- a/presets/mainnet/eip7732.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Mainnet preset - EIP7732 - -# Networking -# --------------------------------------------------------------- -# floorlog2(get_generalized_index(BeaconBlockBody, "signed_execution_payload_header", "message", "blob_kzg_commitments_root")) (= 9) -KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS: 9 - -# Execution -# --------------------------------------------------------------- -# 2**9 (= 512) validators -PTC_SIZE: 512 -# 2**2 (= 4) attestations -MAX_PAYLOAD_ATTESTATIONS: 4 diff --git a/presets/minimal/eip7732.yaml b/presets/minimal/eip7732.yaml deleted file mode 100644 index 1c39c5ca9b..0000000000 --- a/presets/minimal/eip7732.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Minimal preset - EIP7732 - -# Networking -# --------------------------------------------------------------- -# floorlog2(get_generalized_index(BeaconBlockBody, "signed_execution_payload_header", "message", "blob_kzg_commitments_root")) (= 9) -KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS: 9 - -# Execution -# --------------------------------------------------------------- -# [customized] 2**1 (= 2) validators -PTC_SIZE: 2 -# 2**2 (= 4) attestations -MAX_PAYLOAD_ATTESTATIONS: 4 diff --git a/pysetup/constants.py b/pysetup/constants.py index 05ec3fd1d5..693a98655b 100644 --- a/pysetup/constants.py +++ b/pysetup/constants.py @@ -8,7 +8,7 @@ FULU = "fulu" EIP6800 = "eip6800" EIP7441 = "eip7441" -EIP7732 = "eip7732" +GLOAS = "gloas" EIP7805 = "eip7805" diff --git a/pysetup/md_doc_paths.py b/pysetup/md_doc_paths.py index 7ae3e47292..303138eb75 100644 --- a/pysetup/md_doc_paths.py +++ b/pysetup/md_doc_paths.py @@ -7,10 +7,10 @@ DENEB, EIP6800, EIP7441, - EIP7732, EIP7805, ELECTRA, FULU, + GLOAS, PHASE0, ) @@ -22,9 +22,9 @@ DENEB: CAPELLA, ELECTRA: DENEB, FULU: ELECTRA, + GLOAS: FULU, EIP6800: DENEB, EIP7441: CAPELLA, - EIP7732: FULU, EIP7805: FULU, } diff --git a/pysetup/spec_builders/__init__.py b/pysetup/spec_builders/__init__.py index ba207753b5..316d16aafa 100644 --- a/pysetup/spec_builders/__init__.py +++ b/pysetup/spec_builders/__init__.py @@ -4,7 +4,7 @@ from .deneb import DenebSpecBuilder from .eip6800 import EIP6800SpecBuilder from .eip7441 import EIP7441SpecBuilder -from .eip7732 import EIP7732SpecBuilder +from .gloas import GloasSpecBuilder from .eip7805 import EIP7805SpecBuilder from .electra import ElectraSpecBuilder from .fulu import FuluSpecBuilder @@ -22,7 +22,7 @@ FuluSpecBuilder, EIP6800SpecBuilder, EIP7441SpecBuilder, - EIP7732SpecBuilder, + GloasSpecBuilder, EIP7805SpecBuilder, ) } diff --git a/pysetup/spec_builders/eip7732.py b/pysetup/spec_builders/eip7732.py deleted file mode 100644 index 0467356175..0000000000 --- a/pysetup/spec_builders/eip7732.py +++ /dev/null @@ -1,29 +0,0 @@ -from ..constants import EIP7732 -from .base import BaseSpecBuilder - - -class EIP7732SpecBuilder(BaseSpecBuilder): - fork: str = EIP7732 - - @classmethod - def imports(cls, preset_name: str): - return f""" -from eth2spec.fulu import {preset_name} as fulu -""" - - @classmethod - def deprecate_constants(cls) -> set[str]: - return set( - [ - "EXECUTION_PAYLOAD_GINDEX", - ] - ) - - @classmethod - def deprecate_presets(cls) -> set[str]: - return set( - [ - "KZG_COMMITMENT_INCLUSION_PROOF_DEPTH", - "KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH", - ] - ) diff --git a/specs/gloas/fork.md b/specs/gloas/fork.md index af9e259bb0..caa8d3594e 100644 --- a/specs/gloas/fork.md +++ b/specs/gloas/fork.md @@ -25,7 +25,7 @@ Warning: this configuration is not definitive. | Name | Value | | ---------------------- | ------------------------------------- | -| `GLOAS_FORK_VERSION` | `Version('0x09000000')` | +| `GLOAS_FORK_VERSION` | `Version('0x07000000')` | | `GLOAS_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | ## Helper functions diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index 77c22fc08b..a920896c32 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -34,7 +34,7 @@ ## Introduction -This document contains the consensus-layer networking specification for EIP7732. +This document contains the consensus-layer networking specification for GloasGloasGloasGloasGloasGloasGloasGloas. The specification of these changes continues in the same format as the network specifications of previous upgrades, and assumes them as pre-requisite. @@ -301,7 +301,7 @@ The following validations are removed: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | -| `GLOAS_FORK_VERSION` | `eip7732.SignedBeaconBlock` | +| `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | ##### BeaconBlocksByRoot v2 @@ -318,7 +318,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | -| `GLOAS_FORK_VERSION` | `eip7732.SignedBeaconBlock` | +| `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | ##### BlobSidecarsByRoot v1 @@ -329,7 +329,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `fork_version` | Chunk SSZ type | | ---------------------- | --------------------- | | `DENEB_FORK_VERSION` | `deneb.BlobSidecar` | -| `GLOAS_FORK_VERSION` | `eip7732.BlobSidecar` | +| `GLOAS_FORK_VERSION` | `gloas.BlobSidecar` | ##### ExecutionPayloadEnvelopesByRange v1 @@ -369,7 +369,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `fork_version` | Chunk SSZ type | | ---------------------- | ---------------------------------------- | -| `GLOAS_FORK_VERSION` | `eip7732.SignedExecutionPayloadEnvelope` | +| `GLOAS_FORK_VERSION` | `gloas.SignedExecutionPayloadEnvelope` | ##### ExecutionPayloadEnvelopesByRoot v1 @@ -382,7 +382,7 @@ The `` field is calculated as | `fork_version` | Chunk SSZ type | | ---------------------- | ---------------------------------------- | -| `GLOAS_FORK_VERSION` | `eip7732.SignedExecutionPayloadEnvelope` | +| `GLOAS_FORK_VERSION` | `gloas.SignedExecutionPayloadEnvelope` | Request Content: diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py index 44fae9da10..df95036806 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py @@ -9,7 +9,7 @@ ) from eth2spec.test.helpers.constants import ( BELLATRIX, - EIP7732, + GLOAS, ) from eth2spec.test.helpers.execution_payload import ( build_empty_execution_payload, @@ -19,7 +19,7 @@ compute_el_block_hash, get_execution_payload_header, ) -from eth2spec.test.helpers.forks import is_post_eip7732 +from eth2spec.test.helpers.forks import is_post_gloas from eth2spec.test.helpers.keys import privkeys from eth2spec.test.helpers.state import next_slot @@ -37,7 +37,7 @@ def run_execution_payload_processing( """ # Before Deneb, only `body.execution_payload` matters. `BeaconBlockBody` is just a wrapper. # after EIP-7732 the execution payload is no longer in the body - if is_post_eip7732(spec): + if is_post_gloas(spec): envelope = spec.ExecutionPayloadEnvelope( payload=execution_payload, beacon_block_root=state.latest_block_header.hash_tree_root(), @@ -60,7 +60,7 @@ def run_execution_payload_processing( yield "pre", state yield "execution", {"execution_valid": execution_valid} - if not is_post_eip7732(spec): + if not is_post_gloas(spec): yield "body", body called_new_block = False @@ -73,7 +73,7 @@ def verify_and_notify_new_payload(self, new_payload_request) -> bool: return execution_valid if not valid: - if is_post_eip7732(spec): + if is_post_gloas(spec): expect_assertion_error( lambda: spec.process_execution_payload(state, signed_envelope, TestEngine()) ) @@ -84,7 +84,7 @@ def verify_and_notify_new_payload(self, new_payload_request) -> bool: yield "post", None return - if is_post_eip7732(spec): + if is_post_gloas(spec): spec.process_execution_payload(state, signed_envelope, TestEngine()) else: spec.process_execution_payload(state, body, TestEngine()) @@ -94,7 +94,7 @@ def verify_and_notify_new_payload(self, new_payload_request) -> bool: yield "post", state - if is_post_eip7732(spec): + if is_post_gloas(spec): assert state.latest_block_hash == execution_payload.block_hash else: assert state.latest_execution_payload_header == get_execution_payload_header( @@ -109,7 +109,7 @@ def run_success_test(spec, state): yield from run_execution_payload_processing(spec, state, execution_payload) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_success_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) @@ -117,7 +117,7 @@ def test_success_first_payload(spec, state): yield from run_success_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_success_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -133,14 +133,14 @@ def run_gap_slot_test(spec, state): yield from run_execution_payload_processing(spec, state, execution_payload) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_success_first_payload_with_gap_slot(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_gap_slot_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_success_regular_payload_with_gap_slot(spec, state): state = build_state_with_complete_transition(spec, state) @@ -157,14 +157,14 @@ def run_bad_execution_test(spec, state): ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_invalid_bad_execution_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_bad_execution_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_invalid_bad_execution_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -301,14 +301,14 @@ def run_non_empty_extra_data_test(spec, state): assert state.latest_execution_payload_header.extra_data == execution_payload.extra_data -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_non_empty_extra_data_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_non_empty_extra_data_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_non_empty_extra_data_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -332,14 +332,14 @@ def run_non_empty_transactions_test(spec, state): ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_non_empty_transactions_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_non_empty_extra_data_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_non_empty_transactions_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -361,14 +361,14 @@ def run_zero_length_transaction_test(spec, state): ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_zero_length_transaction_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_zero_length_transaction_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_zero_length_transaction_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -379,7 +379,7 @@ def run_randomized_non_validated_execution_fields_test(spec, state, rng, executi next_slot(spec, state) execution_payload = build_randomized_execution_payload(spec, state, rng) - if is_post_eip7732(spec): + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash state.latest_execution_payload_header.gas_limit = execution_payload.gas_limit state.latest_block_hash = execution_payload.parent_hash @@ -389,7 +389,7 @@ def run_randomized_non_validated_execution_fields_test(spec, state, rng, executi ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_randomized_non_validated_execution_fields_first_payload__execution_valid(spec, state): rng = Random(1111) @@ -397,7 +397,7 @@ def test_randomized_non_validated_execution_fields_first_payload__execution_vali yield from run_randomized_non_validated_execution_fields_test(spec, state, rng) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_randomized_non_validated_execution_fields_regular_payload__execution_valid(spec, state): rng = Random(2222) @@ -405,7 +405,7 @@ def test_randomized_non_validated_execution_fields_regular_payload__execution_va yield from run_randomized_non_validated_execution_fields_test(spec, state, rng) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_invalid_randomized_non_validated_execution_fields_first_payload__execution_invalid( spec, state @@ -417,7 +417,7 @@ def test_invalid_randomized_non_validated_execution_fields_first_payload__execut ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_invalid_randomized_non_validated_execution_fields_regular_payload__execution_invalid( spec, state diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py b/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py index aa75db8ebe..d02986b0d5 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py @@ -11,7 +11,7 @@ ) from eth2spec.test.helpers.constants import ( BELLATRIX, - EIP7732, + GLOAS, MINIMAL, ) from eth2spec.test.helpers.fork_choice import ( @@ -30,7 +30,7 @@ ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test @with_presets([MINIMAL], reason="too slow") def test_should_override_forkchoice_update__false(spec, state): @@ -77,7 +77,7 @@ def test_should_override_forkchoice_update__false(spec, state): yield "steps", test_steps -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_should_override_forkchoice_update__true(spec, state): test_steps = [] diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py index 8e61c29a10..d402dd6750 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py @@ -8,7 +8,7 @@ from eth2spec.test.helpers.block import build_empty_block_for_next_slot from eth2spec.test.helpers.constants import ( BELLATRIX, - EIP7732, + GLOAS, ) from eth2spec.test.helpers.execution_payload import build_randomized_execution_payload from eth2spec.test.helpers.state import ( @@ -17,7 +17,7 @@ ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_empty_block_transition_no_tx(spec, state): yield "pre", state @@ -31,7 +31,7 @@ def test_empty_block_transition_no_tx(spec, state): yield "post", state -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_block_transition_randomized_payload(spec, state): yield "pre", state diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py b/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py index c83f3d291c..5bd8061976 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py @@ -10,7 +10,7 @@ ) from eth2spec.test.helpers.constants import ( BELLATRIX, - EIP7732, + GLOAS, ) from eth2spec.test.helpers.execution_payload import ( compute_el_block_hash, @@ -32,7 +32,7 @@ ) -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_from_syncing_to_invalid(spec, state): test_steps = [] diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py b/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py index f6b3bf4c41..461149dcf7 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py @@ -5,7 +5,7 @@ ) from eth2spec.test.helpers.constants import ( BELLATRIX, - EIP7732, + GLOAS, ) from eth2spec.test.helpers.execution_payload import ( build_empty_execution_payload, @@ -37,7 +37,7 @@ def test_success_merge_complete(spec, state): ] -@with_all_phases_from_except(BELLATRIX, [EIP7732]) +@with_all_phases_from_except(BELLATRIX, [GLOAS]) @spec_state_test def test_is_merge_block_and_is_execution_enabled(spec, state): for result in expected_results: diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_validate_merge_block.py b/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_validate_merge_block.py index 6cb6f9c9c0..a141f5498b 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_validate_merge_block.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_validate_merge_block.py @@ -10,7 +10,7 @@ build_empty_execution_payload, compute_el_block_hash, ) -from eth2spec.test.helpers.forks import is_post_eip7732 +from eth2spec.test.helpers.forks import is_post_gloas from eth2spec.test.helpers.pow_block import ( prepare_random_pow_chain, ) @@ -61,7 +61,7 @@ def test_validate_merge_block_success(spec, state): pow_chain.head(-1).total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY - uint256(1) pow_chain.head().total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY block = build_empty_block_for_next_slot(spec, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.parent_block_hash = ( pow_chain.head().block_hash @@ -94,7 +94,7 @@ def test_validate_merge_block_fail_parent_block_lookup(spec, state): pow_chain = prepare_random_pow_chain(spec, 1) pow_chain.head().total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY block = build_empty_block_for_next_slot(spec, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.parent_block_hash = ( pow_chain.head().block_hash @@ -118,7 +118,7 @@ def test_validate_merge_block_fail_after_terminal(spec, state): pow_chain.head(-1).total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY pow_chain.head().total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY + uint256(1) block = build_empty_block_for_next_slot(spec, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.parent_block_hash = ( pow_chain.head().block_hash @@ -149,7 +149,7 @@ def test_validate_merge_block_tbh_override_success(spec, state): pow_chain.head().total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY - uint256(1) pow_chain.head().block_hash = TERMINAL_BLOCK_HASH block = build_empty_block_for_next_slot(spec, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.parent_block_hash = ( pow_chain.head().block_hash @@ -179,7 +179,7 @@ def test_validate_merge_block_fail_parent_hash_is_not_tbh(spec, state): pow_chain.head(-1).total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY - uint256(1) pow_chain.head().total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY block = build_empty_block_for_next_slot(spec, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.parent_block_hash = ( pow_chain.head().block_hash @@ -210,7 +210,7 @@ def test_validate_merge_block_terminal_block_hash_fail_activation_not_reached(sp pow_chain.head().total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY pow_chain.head().block_hash = TERMINAL_BLOCK_HASH block = build_empty_block_for_next_slot(spec, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.parent_block_hash = ( pow_chain.head().block_hash @@ -240,7 +240,7 @@ def test_validate_merge_block_fail_activation_not_reached_parent_hash_is_not_tbh pow_chain.head(-1).total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY - uint256(1) pow_chain.head().total_difficulty = spec.config.TERMINAL_TOTAL_DIFFICULTY block = build_empty_block_for_next_slot(spec, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.parent_block_hash = ( pow_chain.head().block_hash diff --git a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py index a435697022..4665b6e83e 100644 --- a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py +++ b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py @@ -4,7 +4,7 @@ ) from eth2spec.test.helpers.constants import ( CAPELLA, - EIP7732, + GLOAS, ) from eth2spec.test.helpers.deposits import ( prepare_state_and_deposit, @@ -15,7 +15,7 @@ from eth2spec.test.helpers.withdrawals import set_validator_fully_withdrawable -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_success_top_up_to_withdrawn_validator(spec, state): validator_index = 0 diff --git a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py index 27763234e8..217148ea45 100644 --- a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py +++ b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py @@ -8,7 +8,7 @@ ) from eth2spec.test.helpers.constants import ( CAPELLA, - EIP7732, + GLOAS, MAINNET, MINIMAL, ) @@ -33,7 +33,7 @@ ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_success_zero_expected_withdrawals(spec, state): assert len(get_expected_withdrawals(spec, state)) == 0 @@ -44,7 +44,7 @@ def test_success_zero_expected_withdrawals(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_success_one_full_withdrawal(spec, state): fully_withdrawable_indices, partial_withdrawals_indices = prepare_expected_withdrawals( @@ -65,7 +65,7 @@ def test_success_one_full_withdrawal(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_success_one_partial_withdrawal(spec, state): fully_withdrawable_indices, partial_withdrawals_indices = prepare_expected_withdrawals( @@ -88,7 +88,7 @@ def test_success_one_partial_withdrawal(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_success_mixed_fully_and_partial_withdrawable(spec, state): num_full_withdrawals = spec.MAX_WITHDRAWALS_PER_PAYLOAD // 2 @@ -113,7 +113,7 @@ def test_success_mixed_fully_and_partial_withdrawable(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @with_presets([MAINNET], reason="too few validators with minimal config") @spec_state_test def test_success_all_fully_withdrawable_in_one_sweep(spec, state): @@ -136,7 +136,7 @@ def test_success_all_fully_withdrawable_in_one_sweep(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @with_presets([MINIMAL], reason="too many validators with mainnet config") @spec_state_test def test_success_all_fully_withdrawable(spec, state): @@ -159,7 +159,7 @@ def test_success_all_fully_withdrawable(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @with_presets([MAINNET], reason="too few validators with minimal config") @spec_state_test def test_success_all_partially_withdrawable_in_one_sweep(spec, state): @@ -182,7 +182,7 @@ def test_success_all_partially_withdrawable_in_one_sweep(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @with_presets([MINIMAL], reason="too many validators with mainnet config") @spec_state_test def test_success_all_partially_withdrawable(spec, state): @@ -210,7 +210,7 @@ def test_success_all_partially_withdrawable(spec, state): # -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_non_withdrawable_non_empty_withdrawals(spec, state): next_slot(spec, state) @@ -227,7 +227,7 @@ def test_invalid_non_withdrawable_non_empty_withdrawals(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_one_expected_full_withdrawal_and_none_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -240,7 +240,7 @@ def test_invalid_one_expected_full_withdrawal_and_none_in_withdrawals(spec, stat yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_one_expected_partial_withdrawal_and_none_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_partial_withdrawals=1) @@ -253,7 +253,7 @@ def test_invalid_one_expected_partial_withdrawal_and_none_in_withdrawals(spec, s yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_one_expected_full_withdrawal_and_duplicate_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=2) @@ -266,7 +266,7 @@ def test_invalid_one_expected_full_withdrawal_and_duplicate_in_withdrawals(spec, yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_two_expected_partial_withdrawal_and_duplicate_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_partial_withdrawals=2) @@ -279,7 +279,7 @@ def test_invalid_two_expected_partial_withdrawal_and_duplicate_in_withdrawals(sp yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_max_per_slot_full_withdrawals_and_one_less_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -294,7 +294,7 @@ def test_invalid_max_per_slot_full_withdrawals_and_one_less_in_withdrawals(spec, yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_max_per_slot_partial_withdrawals_and_one_less_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -309,7 +309,7 @@ def test_invalid_max_per_slot_partial_withdrawals_and_one_less_in_withdrawals(sp yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_a_lot_fully_withdrawable_too_few_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -327,7 +327,7 @@ def test_invalid_a_lot_fully_withdrawable_too_few_in_withdrawals(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_a_lot_partially_withdrawable_too_few_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -345,7 +345,7 @@ def test_invalid_a_lot_partially_withdrawable_too_few_in_withdrawals(spec, state yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_a_lot_mixed_withdrawable_in_queue_too_few_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -369,7 +369,7 @@ def test_invalid_a_lot_mixed_withdrawable_in_queue_too_few_in_withdrawals(spec, # -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_incorrect_withdrawal_index(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -382,7 +382,7 @@ def test_invalid_incorrect_withdrawal_index(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_incorrect_address_full(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -395,7 +395,7 @@ def test_invalid_incorrect_address_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_incorrect_address_partial(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_partial_withdrawals=1) @@ -408,7 +408,7 @@ def test_invalid_incorrect_address_partial(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_incorrect_amount_full(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -421,7 +421,7 @@ def test_invalid_incorrect_amount_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_incorrect_amount_partial(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -434,7 +434,7 @@ def test_invalid_incorrect_amount_partial(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_one_of_many_incorrectly_full(spec, state): prepare_expected_withdrawals( @@ -458,7 +458,7 @@ def test_invalid_one_of_many_incorrectly_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_one_of_many_incorrectly_partial(spec, state): prepare_expected_withdrawals( @@ -482,7 +482,7 @@ def test_invalid_one_of_many_incorrectly_partial(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_many_incorrectly_full(spec, state): prepare_expected_withdrawals( @@ -506,7 +506,7 @@ def test_invalid_many_incorrectly_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_many_incorrectly_partial(spec, state): prepare_expected_withdrawals( @@ -535,7 +535,7 @@ def test_invalid_many_incorrectly_partial(spec, state): # -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_withdrawable_epoch_but_0_balance(spec, state): current_epoch = spec.get_current_epoch(state) @@ -551,7 +551,7 @@ def test_withdrawable_epoch_but_0_balance(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_withdrawable_epoch_but_0_effective_balance_0_balance(spec, state): current_epoch = spec.get_current_epoch(state) @@ -567,7 +567,7 @@ def test_withdrawable_epoch_but_0_effective_balance_0_balance(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_withdrawable_epoch_but_0_effective_balance_nonzero_balance(spec, state): current_epoch = spec.get_current_epoch(state) @@ -583,7 +583,7 @@ def test_withdrawable_epoch_but_0_effective_balance_nonzero_balance(spec, state) ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_no_withdrawals_but_some_next_epoch(spec, state): current_epoch = spec.get_current_epoch(state) @@ -599,7 +599,7 @@ def test_no_withdrawals_but_some_next_epoch(spec, state): ) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_all_withdrawal(spec, state): # Make all validators withdrawable @@ -637,25 +637,25 @@ def run_random_full_withdrawals_test(spec, state, rng): yield from run_withdrawals_processing(spec, state, execution_payload) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_random_full_withdrawals_0(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(444)) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_random_full_withdrawals_1(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(420)) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_random_full_withdrawals_2(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(200)) -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_random_full_withdrawals_3(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(2000000)) diff --git a/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py b/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py index 5e45c169a7..3af2a9e7d7 100644 --- a/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py +++ b/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py @@ -8,12 +8,12 @@ ) from eth2spec.test.helpers.constants import ( CAPELLA, - EIP7732, + GLOAS, ) @with_test_suite_name("BeaconBlockBody") -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_execution_merkle_proof(spec, state): block = state_transition_with_full_block(spec, state, True, False) diff --git a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py index 31639f3aff..904d757672 100644 --- a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py @@ -16,13 +16,13 @@ from eth2spec.test.helpers.bls_to_execution_changes import get_signed_address_change from eth2spec.test.helpers.constants import ( CAPELLA, - EIP7732, + GLOAS, MINIMAL, ) from eth2spec.test.helpers.deposits import ( prepare_state_and_deposit, ) -from eth2spec.test.helpers.forks import is_post_eip7732, is_post_electra +from eth2spec.test.helpers.forks import is_post_gloas, is_post_electra from eth2spec.test.helpers.keys import pubkeys from eth2spec.test.helpers.state import ( next_epoch_via_block, @@ -44,7 +44,7 @@ # -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_invalid_is_execution_enabled_false(spec, state): # Set `latest_execution_payload_header` to empty @@ -210,7 +210,7 @@ def test_invalid_two_bls_changes_of_different_addresses_same_validator_same_bloc # -@with_all_phases_from_except(CAPELLA, [EIP7732]) +@with_all_phases_from_except(CAPELLA, [GLOAS]) @spec_state_test def test_full_withdrawal_in_epoch_transition(spec, state): index = 0 @@ -336,7 +336,7 @@ def test_withdrawal_success_two_blocks(spec, state): # after EIP-7732 the second block does not perform any withdrawals because # there was no payload processed - if is_post_eip7732(spec): + if is_post_gloas(spec): assert ( state.next_withdrawal_index == pre_next_withdrawal_index + spec.MAX_WITHDRAWALS_PER_PAYLOAD diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index 4abb01a961..057f46c6ae 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -19,7 +19,7 @@ CAPELLA, DENEB, EIP7441, - EIP7732, + GLOAS, EIP7805, ELECTRA, FULU, @@ -652,7 +652,7 @@ def wrapper(*args, spec: Spec, **kw): with_electra_and_later = with_all_phases_from(ELECTRA) with_fulu_and_later = with_all_phases_from(FULU, all_phases=ALLOWED_TEST_RUNNER_FORKS) with_eip7441_and_later = with_all_phases_from(EIP7441, all_phases=ALLOWED_TEST_RUNNER_FORKS) -with_eip7732_and_later = with_all_phases_from(EIP7732, all_phases=ALLOWED_TEST_RUNNER_FORKS) +with_gloas_and_later = with_all_phases_from(GLOAS, all_phases=ALLOWED_TEST_RUNNER_FORKS) with_eip7805_and_later = with_all_phases_from(EIP7805, all_phases=ALLOWED_TEST_RUNNER_FORKS) diff --git a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py index ed24263244..a9df399a0e 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py @@ -14,7 +14,7 @@ compute_el_block_hash, get_execution_payload_header, ) -from eth2spec.test.helpers.forks import is_post_eip7732 +from eth2spec.test.helpers.forks import is_post_gloas from eth2spec.test.helpers.keys import privkeys @@ -31,7 +31,7 @@ def run_execution_payload_processing( """ # after EIP-7732 the execution payload is no longer in the body - if is_post_eip7732(spec): + if is_post_gloas(spec): envelope = spec.ExecutionPayloadEnvelope( payload=execution_payload, blob_kzg_commitments=blob_kzg_commitments, @@ -97,7 +97,7 @@ def verify_and_notify_new_payload(self, new_payload_request) -> bool: return execution_valid if not valid: - if is_post_eip7732(spec): + if is_post_gloas(spec): expect_assertion_error( lambda: spec.process_execution_payload(state, signed_envelope, TestEngine()) ) @@ -108,7 +108,7 @@ def verify_and_notify_new_payload(self, new_payload_request) -> bool: yield "post", None return - if is_post_eip7732(spec): + if is_post_gloas(spec): spec.process_execution_payload(state, signed_envelope, TestEngine()) else: spec.process_execution_payload(state, body, TestEngine()) @@ -118,7 +118,7 @@ def verify_and_notify_new_payload(self, new_payload_request) -> bool: yield "post", state - if is_post_eip7732(spec): + if is_post_gloas(spec): assert ( state.execution_payload_availability[state.slot % spec.SLOTS_PER_HISTORICAL_ROOT] == 0b1 ) @@ -150,8 +150,8 @@ def test_incorrect_blob_tx_type(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( @@ -173,8 +173,8 @@ def test_incorrect_transaction_length_1_extra_byte(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -195,8 +195,8 @@ def test_incorrect_transaction_length_1_byte_short(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -217,8 +217,8 @@ def test_incorrect_transaction_length_empty(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -239,8 +239,8 @@ def test_incorrect_transaction_length_32_extra_bytes(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -260,8 +260,8 @@ def test_no_transactions_with_commitments(spec, state): execution_payload.transactions = [] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -282,8 +282,8 @@ def test_incorrect_commitment(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -304,7 +304,7 @@ def test_no_commitments_for_transactions(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( @@ -326,8 +326,8 @@ def test_incorrect_commitments_order(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -350,7 +350,7 @@ def test_incorrect_transaction_no_blobs_but_with_commitments(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - if is_post_eip7732(spec): + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash # the transaction doesn't contain any blob, but commitments are provided @@ -373,8 +373,8 @@ def test_incorrect_block_hash(spec, state): execution_payload.block_hash = b"\x12" * 32 # incorrect block hash # CL itself doesn't verify EL block hash - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -397,8 +397,8 @@ def test_zeroed_commitment(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments @@ -418,8 +418,8 @@ def test_invalid_correct_input__execution_invalid(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments, valid=False, execution_valid=False @@ -441,8 +441,8 @@ def test_invalid_exceed_max_blobs_per_block(spec, state): execution_payload.transactions = [opaque_tx] execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) - # Make the first block full in EIP7732 - if is_post_eip7732(spec): + # Make the first block full in Gloas + if is_post_gloas(spec): state.latest_execution_payload_header.block_hash = execution_payload.block_hash yield from run_execution_payload_processing( spec, state, execution_payload, blob_kzg_commitments, valid=False diff --git a/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py index 9d272a1790..a8b6e0624d 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py @@ -13,7 +13,7 @@ ) from eth2spec.test.helpers.constants import ( DENEB, - EIP7732, + GLOAS, ) from eth2spec.test.helpers.execution_payload import ( compute_el_block_hash, @@ -67,25 +67,25 @@ def run_block_with_blobs( yield "post", state if valid else None -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_zero_blob(spec, state): yield from run_block_with_blobs(spec, state, blob_count=0) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_one_blob(spec, state): yield from run_block_with_blobs(spec, state, blob_count=1) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_one_blob_two_txs(spec, state): yield from run_block_with_blobs(spec, state, blob_count=1, tx_count=2) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_one_blob_max_txs(spec, state): yield from run_block_with_blobs( @@ -93,7 +93,7 @@ def test_one_blob_max_txs(spec, state): ) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_invalid_one_blob_max_plus_one_txs(spec, state): yield from run_block_with_blobs( @@ -101,13 +101,13 @@ def test_invalid_one_blob_max_plus_one_txs(spec, state): ) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_max_blobs_per_block(spec, state): yield from run_block_with_blobs(spec, state, blob_count=get_max_blob_count(spec, state)) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_invalid_max_blobs_per_block_two_txs(spec, state): yield from run_block_with_blobs( @@ -115,7 +115,7 @@ def test_invalid_max_blobs_per_block_two_txs(spec, state): ) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_invalid_exceed_max_blobs_per_block(spec, state): yield from run_block_with_blobs( @@ -123,7 +123,7 @@ def test_invalid_exceed_max_blobs_per_block(spec, state): ) -@with_all_phases_from_except(DENEB, [EIP7732]) +@with_all_phases_from_except(DENEB, [GLOAS]) @spec_state_test def test_mix_blob_tx_and_non_blob_tx(spec, state): yield from run_block_with_blobs(spec, state, blob_count=1, tx_count=1, non_blob_tx_count=1) diff --git a/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py index caa0891be5..8f58b6a862 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py +++ b/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( DENEB, - EIP7732, + GLOAS, single_phase, spec_test, with_all_phases_from_to, @@ -15,7 +15,7 @@ def test_length(spec): assert spec.config.MAX_BLOBS_PER_BLOCK < spec.MAX_BLOB_COMMITMENTS_PER_BLOCK -@with_all_phases_from_to(DENEB, EIP7732) +@with_all_phases_from_to(DENEB, GLOAS) @spec_test @single_phase def test_networking(spec): diff --git a/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_execution_payload_header.py b/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_execution_payload_header.py index 8f8ddb12f0..bb6550a17b 100644 --- a/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_execution_payload_header.py +++ b/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_execution_payload_header.py @@ -1,7 +1,7 @@ from eth2spec.test.context import ( always_bls, spec_state_test, - with_eip7732_and_later, + with_gloas_and_later, ) from eth2spec.test.helpers.block import build_empty_block_for_next_slot from eth2spec.test.helpers.keys import privkeys @@ -166,7 +166,7 @@ def prepare_block_with_non_proposer_builder(spec, state): # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_valid_self_build(spec, state): """ @@ -179,7 +179,7 @@ def test_process_execution_payload_header_valid_self_build(spec, state): yield from run_execution_payload_header_processing(spec, state, block) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @always_bls def test_process_execution_payload_header_valid_builder(spec, state): @@ -232,7 +232,7 @@ def test_process_execution_payload_header_valid_builder(spec, state): assert post_pending_payments_len == pre_pending_payments_len + 1 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @always_bls def test_process_execution_payload_header_valid_builder_zero_value(spec, state): @@ -261,7 +261,7 @@ def test_process_execution_payload_header_valid_builder_zero_value(spec, state): # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_invalid_signature(spec, state): """ @@ -281,7 +281,7 @@ def test_process_execution_payload_header_invalid_signature(spec, state): # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_inactive_builder(spec, state): """ @@ -312,7 +312,7 @@ def test_process_execution_payload_header_inactive_builder(spec, state): yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_slashed_builder(spec, state): """ @@ -343,7 +343,7 @@ def test_process_execution_payload_header_slashed_builder(spec, state): yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_self_build_non_zero_value(spec, state): """ @@ -389,7 +389,7 @@ def test_process_execution_payload_header_self_build_non_zero_value(spec, state) yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_non_builder_non_zero_value(spec, state): """ @@ -413,7 +413,7 @@ def test_process_execution_payload_header_non_builder_non_zero_value(spec, state yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_non_builder_wrong_proposer(spec, state): """ @@ -435,7 +435,7 @@ def test_process_execution_payload_header_non_builder_wrong_proposer(spec, state # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_insufficient_balance(spec, state): """ @@ -462,7 +462,7 @@ def test_process_execution_payload_header_insufficient_balance(spec, state): yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @always_bls def test_process_execution_payload_header_excess_balance(spec, state): @@ -524,7 +524,7 @@ def test_process_execution_payload_header_excess_balance(spec, state): assert post_pending_payments_len == pre_pending_payments_len + 1 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_insufficient_balance_with_pending_payments(spec, state): """ @@ -567,7 +567,7 @@ def test_process_execution_payload_header_insufficient_balance_with_pending_paym yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_sufficient_balance_with_pending_payments(spec, state): """ @@ -634,7 +634,7 @@ def test_process_execution_payload_header_sufficient_balance_with_pending_paymen assert post_pending_payments_len == pre_pending_payments_len + 1 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_insufficient_balance_with_pending_withdrawals( spec, state @@ -677,7 +677,7 @@ def test_process_execution_payload_header_insufficient_balance_with_pending_with yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_sufficient_balance_with_pending_withdrawals(spec, state): """ @@ -752,7 +752,7 @@ def test_process_execution_payload_header_sufficient_balance_with_pending_withdr # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_wrong_slot(spec, state): """ @@ -777,7 +777,7 @@ def test_process_execution_payload_header_wrong_slot(spec, state): yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_wrong_parent_block_hash(spec, state): """ @@ -804,7 +804,7 @@ def test_process_execution_payload_header_wrong_parent_block_hash(spec, state): yield from run_execution_payload_header_processing(spec, state, block, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_execution_payload_header_wrong_parent_block_root(spec, state): """ diff --git a/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_payload_attestation.py b/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_payload_attestation.py index d116294442..447d8a9fbc 100644 --- a/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_payload_attestation.py +++ b/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_payload_attestation.py @@ -1,7 +1,7 @@ from eth2spec.test.context import ( always_bls, spec_state_test, - with_eip7732_and_later, + with_gloas_and_later, with_presets, ) from eth2spec.test.helpers.constants import MINIMAL @@ -106,7 +106,7 @@ def prepare_signed_payload_attestation( # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @always_bls @with_presets([MINIMAL], reason="broken on mainnet") @@ -121,7 +121,7 @@ def test_process_payload_attestation_payload_present(spec, state): yield from run_payload_attestation_processing(spec, state, payload_attestation) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @always_bls @with_presets([MINIMAL], reason="broken on mainnet") @@ -136,7 +136,7 @@ def test_process_payload_attestation_payload_not_present(spec, state): yield from run_payload_attestation_processing(spec, state, payload_attestation) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @always_bls @with_presets([MINIMAL], reason="broken on mainnet") @@ -162,7 +162,7 @@ def test_process_payload_attestation_partial_participation(spec, state): # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @with_presets([MINIMAL], reason="maybe broken on mainnet") def test_process_payload_attestation_invalid_beacon_block_root(spec, state): @@ -184,7 +184,7 @@ def test_process_payload_attestation_invalid_beacon_block_root(spec, state): # -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @with_presets([MINIMAL], reason="maybe broken on mainnet") def test_process_payload_attestation_future_slot(spec, state): @@ -199,7 +199,7 @@ def test_process_payload_attestation_future_slot(spec, state): yield from run_payload_attestation_processing(spec, state, payload_attestation, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @with_presets([MINIMAL], reason="maybe broken on mainnet") def test_process_payload_attestation_too_old_slot(spec, state): @@ -215,7 +215,7 @@ def test_process_payload_attestation_too_old_slot(spec, state): yield from run_payload_attestation_processing(spec, state, payload_attestation, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @with_presets([MINIMAL], reason="maybe broken on mainnet") def test_process_payload_attestation_invalid_signature(spec, state): @@ -230,7 +230,7 @@ def test_process_payload_attestation_invalid_signature(spec, state): yield from run_payload_attestation_processing(spec, state, payload_attestation, valid=False) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test @with_presets([MINIMAL], reason="maybe broken on mainnet") def test_process_payload_attestation_no_attesting_indices(spec, state): diff --git a/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py index 9a36c15f25..1b94360fd1 100644 --- a/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py +++ b/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py @@ -1,11 +1,11 @@ from eth2spec.test.context import ( single_phase, spec_test, - with_eip7732_and_later, + with_gloas_and_later, ) -@with_eip7732_and_later +@with_gloas_and_later @spec_test @single_phase def test_networking(spec): diff --git a/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py b/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py index 37b1c977aa..c9c7c39a01 100644 --- a/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py +++ b/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py @@ -7,7 +7,7 @@ build_empty_block_for_next_slot, ) from eth2spec.test.helpers.constants import ( - EIP7732, + GLOAS, ELECTRA, MINIMAL, ) @@ -28,8 +28,8 @@ ) -# TODO(jtraglia): In eip7732, how do we set execution requests in the payload envelope? -@with_all_phases_from_except(ELECTRA, [EIP7732]) +# TODO(jtraglia): In gloas, how do we set execution requests in the payload envelope? +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test @with_presets([MINIMAL], reason="too slow") def test_new_validator_deposit_with_multiple_epoch_transitions(spec, state): diff --git a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py index c5c8cf3f05..3c22fff7cd 100644 --- a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py @@ -16,7 +16,7 @@ get_signed_address_change, ) from eth2spec.test.helpers.constants import ( - EIP7732, + GLOAS, ELECTRA, MINIMAL, ) @@ -39,7 +39,7 @@ ) -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_basic_el_withdrawal_request(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -68,7 +68,7 @@ def test_basic_el_withdrawal_request(spec, state): assert state.validators[validator_index].exit_epoch < spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_basic_btec_and_el_withdrawal_request_in_same_block(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -113,7 +113,7 @@ def test_basic_btec_and_el_withdrawal_request_in_same_block(spec, state): assert is_execution_address and is_correct_source_address -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_basic_btec_before_el_withdrawal_request(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -162,7 +162,7 @@ def test_basic_btec_before_el_withdrawal_request(spec, state): assert state.validators[validator_index].exit_epoch < spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_cl_exit_and_el_withdrawal_request_in_same_block(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -195,7 +195,7 @@ def test_cl_exit_and_el_withdrawal_request_in_same_block(spec, state): assert state.validators[validator_index].exit_epoch < spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_multiple_el_partial_withdrawal_requests_same_validator(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -235,7 +235,7 @@ def test_multiple_el_partial_withdrawal_requests_same_validator(spec, state): assert state.validators[validator_index].exit_epoch == spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_multiple_el_partial_withdrawal_requests_different_validator(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -277,7 +277,7 @@ def test_multiple_el_partial_withdrawal_requests_different_validator(spec, state assert state.validators[validator_index].exit_epoch == spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_withdrawal_and_withdrawal_request_same_validator(spec, state): # Give a validator an excess balance @@ -321,7 +321,7 @@ def test_withdrawal_and_withdrawal_request_same_validator(spec, state): assert len(state.pending_partial_withdrawals) == 0 -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_withdrawal_and_switch_to_compounding_request_same_validator(spec, state): # Give a validator an excess balance @@ -369,7 +369,7 @@ def test_withdrawal_and_switch_to_compounding_request_same_validator(spec, state assert len(state.pending_deposits) == 0 -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_deposit_request_with_same_pubkey_different_withdrawal_credentials(spec, state): # signify the eth1 bridge deprecation @@ -427,7 +427,7 @@ def test_deposit_request_with_same_pubkey_different_withdrawal_credentials(spec, ) -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_deposit_request_max_per_payload(spec, state): # signify the eth1 bridge deprecation @@ -470,7 +470,7 @@ def test_deposit_request_max_per_payload(spec, state): ) -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, @@ -571,7 +571,7 @@ def test_withdrawal_and_consolidation_effective_balance_updates(spec, state): assert state.balances[b_index] < state.validators[b_index].effective_balance -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, @@ -632,7 +632,7 @@ def test_consolidation_requests_when_pending_consolidation_queue_is_full(spec, s assert len(state.pending_consolidations) == spec.PENDING_CONSOLIDATIONS_LIMIT -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, @@ -712,7 +712,7 @@ def test_switch_to_compounding_requests_when_pending_consolidation_queue_is_full assert spec.has_compounding_withdrawal_credential(state.validators[source_index]) -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @spec_state_test def test_switch_to_compounding_requests_when_too_little_consolidation_churn_limit(spec, state): # Move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -777,7 +777,7 @@ def test_switch_to_compounding_requests_when_too_little_consolidation_churn_limi assert spec.has_compounding_withdrawal_credential(state.validators[source_index]) -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @with_presets([MINIMAL], "Keep the size of the test reasonable") @spec_state_test def test_withdrawal_requests_when_pending_withdrawal_queue_is_full(spec, state): @@ -836,7 +836,7 @@ def test_withdrawal_requests_when_pending_withdrawal_queue_is_full(spec, state): assert withdrawal_request_1.amount != withdrawal_request_2.amount -@with_all_phases_from_except(ELECTRA, [EIP7732]) +@with_all_phases_from_except(ELECTRA, [GLOAS]) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, diff --git a/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py b/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py index 4ace5d1c93..8d04dfcfbc 100644 --- a/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py +++ b/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py @@ -1,4 +1,4 @@ -# TODO(jtraglia): for all tests in this file, consider adding support for EIP7732 later +# TODO(jtraglia): for all tests in this file, consider adding support for Gloas later from random import Random @@ -8,7 +8,7 @@ ) from eth2spec.test.helpers.blob import get_block_with_blob_and_sidecars from eth2spec.test.helpers.constants import ( - EIP7732, + GLOAS, FULU, ) from eth2spec.test.helpers.fork_choice import ( @@ -44,7 +44,7 @@ def get_alt_sidecars(spec, state): return alt_sidecars -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__ok(spec, state): """ @@ -116,7 +116,7 @@ def run_on_block_peerdas_invalid_test(spec, state, fn): yield "steps", test_steps -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__not_available(spec, state): """ @@ -130,7 +130,7 @@ def test_on_block_peerdas__not_available(spec, state): ) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_zero_blobs(spec, state): """ @@ -146,7 +146,7 @@ def invalid_zero_blobs(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_zero_blobs) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_index_1(spec, state): """ @@ -160,7 +160,7 @@ def invalid_index(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_index) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_index_2(spec, state): """ @@ -174,7 +174,7 @@ def invalid_index(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_index) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_column_1(spec, state): """ @@ -188,7 +188,7 @@ def invalid_mismatch_len_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_column) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_column_2(spec, state): """ @@ -202,7 +202,7 @@ def invalid_mismatch_len_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_column) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_commitments_1(spec, state): """ @@ -216,7 +216,7 @@ def invalid_mismatch_len_kzg_commitments(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_commitments) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_commitments_2(spec, state): """ @@ -230,7 +230,7 @@ def invalid_mismatch_len_kzg_commitments(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_commitments) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_proofs_1(spec, state): """ @@ -244,7 +244,7 @@ def invalid_mismatch_len_kzg_proofs(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_proofs) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_proofs_2(spec, state): """ @@ -258,7 +258,7 @@ def invalid_mismatch_len_kzg_proofs(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_proofs) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_wrong_column_1(spec, state): """ @@ -272,7 +272,7 @@ def invalid_wrong_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_column) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_wrong_column_2(spec, state): """ @@ -286,7 +286,7 @@ def invalid_wrong_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_column) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_wrong_commitment_1(spec, state): """ @@ -301,7 +301,7 @@ def invalid_wrong_commitment(sidecars, alt_sidecars=alt_sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_commitment) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_wrong_commitment_2(spec, state): """ @@ -316,7 +316,7 @@ def invalid_wrong_commitment(sidecars, alt_sidecars=alt_sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_commitment) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_wrong_proof_1(spec, state): """ @@ -331,7 +331,7 @@ def invalid_wrong_proof(sidecars, alt_sidecars=alt_sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_proof) -@with_all_phases_from_except(FULU, [EIP7732]) +@with_all_phases_from_except(FULU, [GLOAS]) @spec_state_test def test_on_block_peerdas__invalid_wrong_proof_2(spec, state): """ diff --git a/tests/core/pyspec/eth2spec/test/fulu/merkle_proof/test_single_merkle_proof.py b/tests/core/pyspec/eth2spec/test/fulu/merkle_proof/test_single_merkle_proof.py index 7f20561041..3485e157b5 100644 --- a/tests/core/pyspec/eth2spec/test/fulu/merkle_proof/test_single_merkle_proof.py +++ b/tests/core/pyspec/eth2spec/test/fulu/merkle_proof/test_single_merkle_proof.py @@ -20,7 +20,7 @@ compute_el_block_hash, ) from eth2spec.test.helpers.forks import ( - is_post_eip7732, + is_post_gloas, ) @@ -37,7 +37,7 @@ def _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=None, blob_coun mode=RandomizationMode, chaos=True, ) - if is_post_eip7732(spec): + if is_post_gloas(spec): blob_kzg_commitments = spec.List[spec.KZGCommitment, spec.MAX_BLOB_COMMITMENTS_PER_BLOCK]( blob_kzg_commitments ) @@ -51,7 +51,7 @@ def _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=None, blob_coun ) signed_block = sign_block(spec, state, block, proposer_index=0) cells_and_kzg_proofs = [spec.compute_cells_and_kzg_proofs(blob) for blob in blobs] - if is_post_eip7732(spec): + if is_post_gloas(spec): column_sidcars = spec.get_data_column_sidecars_from_block( signed_block, blob_kzg_commitments, cells_and_kzg_proofs ) @@ -63,7 +63,7 @@ def _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=None, blob_coun yield "object", block.body kzg_commitments_inclusion_proof = column_sidcar.kzg_commitments_inclusion_proof - if is_post_eip7732(spec): + if is_post_gloas(spec): gindex = spec.get_generalized_index( spec.BeaconBlockBody, "signed_execution_payload_header", diff --git a/tests/core/pyspec/eth2spec/test/fulu/unittests/test_networking.py b/tests/core/pyspec/eth2spec/test/fulu/unittests/test_networking.py index dcd3a451e7..5787a2fdb6 100644 --- a/tests/core/pyspec/eth2spec/test/fulu/unittests/test_networking.py +++ b/tests/core/pyspec/eth2spec/test/fulu/unittests/test_networking.py @@ -20,7 +20,7 @@ compute_el_block_hash, ) from eth2spec.test.helpers.forks import ( - is_post_eip7732, + is_post_gloas, ) # Helper functions @@ -40,7 +40,7 @@ def compute_data_column_sidecar(spec, state): opaque_tx, blobs, blob_kzg_commitments, _ = get_sample_blob_tx(spec, blob_count=2) cells_and_kzg_proofs = [spec.compute_cells_and_kzg_proofs(blob) for blob in blobs] - if is_post_eip7732(spec): + if is_post_gloas(spec): block.body.signed_execution_payload_header.message.blob_kzg_commitments_root = spec.List[ spec.KZGCommitment, spec.MAX_BLOB_COMMITMENTS_PER_BLOCK ](blob_kzg_commitments).hash_tree_root() diff --git a/tests/core/pyspec/eth2spec/test/helpers/attestations.py b/tests/core/pyspec/eth2spec/test/helpers/attestations.py index ad18d66621..8ddf18fc02 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/attestations.py +++ b/tests/core/pyspec/eth2spec/test/helpers/attestations.py @@ -5,7 +5,7 @@ from eth2spec.test.helpers.forks import ( is_post_altair, is_post_deneb, - is_post_eip7732, + is_post_gloas, is_post_electra, ) from eth2spec.test.helpers.keys import privkeys @@ -86,7 +86,7 @@ def build_attestation_data(spec, state, slot, index, beacon_block_root=None, sha if is_post_electra(spec): index = 0 - if is_post_eip7732(spec): + if is_post_gloas(spec): if slot >= 1 and beacon_block_root == spec.get_block_root_at_slot(state, slot - 1): index = 1 diff --git a/tests/core/pyspec/eth2spec/test/helpers/blob.py b/tests/core/pyspec/eth2spec/test/helpers/blob.py index 54d9b5ea16..6b0a2ab7b9 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/blob.py +++ b/tests/core/pyspec/eth2spec/test/helpers/blob.py @@ -8,7 +8,7 @@ from eth2spec.test.helpers.block import build_empty_block_for_next_slot from eth2spec.test.helpers.execution_payload import compute_el_block_hash from eth2spec.test.helpers.forks import ( - is_post_eip7732, + is_post_gloas, is_post_electra, is_post_fulu, ) @@ -144,7 +144,7 @@ def get_block_with_blob(spec, state, rng: Random | None = None, blob_count=1): opaque_tx, blobs, blob_kzg_commitments, blob_kzg_proofs = get_sample_blob_tx( spec, blob_count=blob_count, rng=rng or random.Random(5566) ) - if is_post_eip7732(spec): + if is_post_gloas(spec): blob_kzg_commitments = spec.List[spec.KZGCommitment, spec.MAX_BLOB_COMMITMENTS_PER_BLOCK]( blob_kzg_commitments ) @@ -175,7 +175,7 @@ def get_block_with_blob_and_sidecars(spec, state, rng=None, blob_count=1): # We need a signed block to call `get_data_column_sidecars_from_block` signed_block = state_transition_and_sign_block(spec, state, block) - if is_post_eip7732(spec): + if is_post_gloas(spec): sidecars = spec.get_data_column_sidecars_from_block( signed_block, blob_kzg_commitments, cells_and_kzg_proofs ) diff --git a/tests/core/pyspec/eth2spec/test/helpers/block.py b/tests/core/pyspec/eth2spec/test/helpers/block.py index b7e355c1aa..1af2732ce7 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/block.py +++ b/tests/core/pyspec/eth2spec/test/helpers/block.py @@ -24,7 +24,7 @@ is_post_altair, is_post_bellatrix, is_post_eip7441, - is_post_eip7732, + is_post_gloas, is_post_electra, ) from eth2spec.test.helpers.keys import privkeys, whisk_ks_final, whisk_ks_initial @@ -130,7 +130,7 @@ def build_empty_block(spec, state, slot=None, proposer_index=None): if is_post_altair(spec): empty_block.body.sync_aggregate.sync_committee_signature = spec.G2_POINT_AT_INFINITY - if is_post_eip7732(spec): + if is_post_gloas(spec): signed_header = build_empty_signed_execution_payload_header(spec, state) empty_block.body.signed_execution_payload_header = signed_header return empty_block diff --git a/tests/core/pyspec/eth2spec/test/helpers/constants.py b/tests/core/pyspec/eth2spec/test/helpers/constants.py index ccf3e47022..63e4cd2389 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/constants.py +++ b/tests/core/pyspec/eth2spec/test/helpers/constants.py @@ -15,7 +15,7 @@ # Experimental phases (not included in default "ALL_PHASES"): FULU = SpecForkName("fulu") EIP7441 = SpecForkName("eip7441") -EIP7732 = SpecForkName("eip7732") +GLOAS = SpecForkName("gloas") EIP7805 = SpecForkName("eip7805") # @@ -32,14 +32,14 @@ # Formal forks *MAINNET_FORKS, FULU, + GLOAS, # Experimental patches - EIP7732, EIP7805, ) # The forks that have light client specs LIGHT_CLIENT_TESTING_FORKS = [item for item in MAINNET_FORKS if item != PHASE0] # The forks that output to the test vectors. -TESTGEN_FORKS = (*MAINNET_FORKS, FULU, EIP7732, EIP7805) +TESTGEN_FORKS = (*MAINNET_FORKS, FULU, GLOAS, EIP7805) # Forks allowed in the test runner `--fork` flag, to fail fast in case of typos ALLOWED_TEST_RUNNER_FORKS = (*ALL_PHASES, EIP7441) @@ -52,10 +52,10 @@ CAPELLA: BELLATRIX, DENEB: CAPELLA, ELECTRA: DENEB, - # Experimental patches FULU: ELECTRA, + GLOAS: FULU, + # Experimental patches EIP7441: CAPELLA, - EIP7732: FULU, EIP7805: FULU, } @@ -68,6 +68,7 @@ CAPELLA: DENEB, DENEB: ELECTRA, ELECTRA: FULU, + FULU: GLOAS, } ALL_PRE_POST_FORKS = POST_FORK_OF.items() diff --git a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py index 86ab689f97..788e503fce 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py @@ -9,7 +9,7 @@ from eth2spec.test.helpers.forks import ( is_post_capella, is_post_deneb, - is_post_eip7732, + is_post_gloas, is_post_electra, ) from eth2spec.test.helpers.keys import privkeys @@ -18,7 +18,7 @@ def get_execution_payload_header(spec, state, execution_payload): - if is_post_eip7732(spec): + if is_post_gloas(spec): return spec.ExecutionPayloadHeader( parent_block_hash=execution_payload.parent_hash, parent_block_root=state.latest_block_header.hash_tree_root(), @@ -86,7 +86,7 @@ def compute_el_header_block_hash( """ Computes the RLP execution block hash described by an `ExecutionPayloadHeader`. """ - if is_post_eip7732(spec): + if is_post_gloas(spec): return spec.Hash32() execution_payload_header_rlp = [ @@ -269,8 +269,8 @@ def compute_el_block_hash_for_block(spec, block): ) -def build_empty_post_eip7732_execution_payload_header(spec, state): - if not is_post_eip7732(spec): +def build_empty_post_gloas_execution_payload_header(spec, state): + if not is_post_gloas(spec): return parent_block_root = hash_tree_root(state.latest_block_header) kzg_list = spec.List[spec.KZGCommitment, spec.MAX_BLOB_COMMITMENTS_PER_BLOCK]() @@ -289,9 +289,9 @@ def build_empty_post_eip7732_execution_payload_header(spec, state): def build_empty_signed_execution_payload_header(spec, state): - if not is_post_eip7732(spec): + if not is_post_gloas(spec): return - message = build_empty_post_eip7732_execution_payload_header(spec, state) + message = build_empty_post_gloas_execution_payload_header(spec, state) privkey = privkeys[message.builder_index] signature = spec.get_execution_payload_header_signature(state, message, privkey) return spec.SignedExecutionPayloadHeader( @@ -327,7 +327,7 @@ def build_empty_execution_payload(spec, state, randao_mix=None): extra_data=spec.ByteList[spec.MAX_EXTRA_DATA_BYTES](), transactions=empty_txs, ) - if not is_post_eip7732(spec): + if not is_post_gloas(spec): payload.state_root = latest.state_root # no changes to the state payload.block_number = latest.block_number + 1 payload.gas_limit = latest.gas_limit # retain same limit @@ -370,7 +370,7 @@ def build_randomized_execution_payload(spec, state, rng): def build_state_with_incomplete_transition(spec, state): header = spec.ExecutionPayloadHeader() - if is_post_eip7732(spec): + if is_post_gloas(spec): kzgs = spec.List[spec.KZGCommitment, spec.MAX_BLOB_COMMITMENTS_PER_BLOCK]() header.blob_kzg_commitments_root = kzgs.hash_tree_root() diff --git a/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py b/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py index 94f2d3932e..39670ed4fb 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py +++ b/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py @@ -10,7 +10,7 @@ next_slots_with_attestations, state_transition_with_full_block, ) -from eth2spec.test.helpers.forks import is_post_eip7732, is_post_fulu +from eth2spec.test.helpers.forks import is_post_gloas, is_post_fulu from eth2spec.test.helpers.state import ( payload_state_transition, payload_state_transition_no_store, @@ -19,7 +19,7 @@ def check_head_against_root(spec, store, root): head = spec.get_head(store) - if is_post_eip7732(spec): + if is_post_gloas(spec): assert head.root == root else: assert head == root @@ -211,12 +211,12 @@ def get_genesis_forkchoice_store(spec, genesis_state): def get_genesis_forkchoice_store_and_block(spec, genesis_state): assert genesis_state.slot == spec.GENESIS_SLOT genesis_block = spec.BeaconBlock(state_root=genesis_state.hash_tree_root()) - if is_post_eip7732(spec): + if is_post_gloas(spec): genesis_block.body.signed_execution_payload_header.message.block_hash = ( genesis_state.latest_block_hash ) store = spec.get_forkchoice_store(genesis_state, genesis_block) - if is_post_eip7732(spec): + if is_post_gloas(spec): store.execution_payload_states = store.block_states.copy() return store, genesis_block @@ -276,7 +276,7 @@ def run_on_block(spec, store, signed_block, valid=True): def get_store_full_state(spec, store, root): - if is_post_eip7732(spec): + if is_post_gloas(spec): return store.execution_payload_states[root] return store.block_states[root] @@ -405,7 +405,7 @@ def add_attester_slashing(spec, store, attester_slashing, test_steps, valid=True def get_formatted_head_output(spec, store): head = spec.get_head(store) - if is_post_eip7732(spec): + if is_post_gloas(spec): head_root = head.root else: head_root = head @@ -478,7 +478,7 @@ def apply_next_epoch_with_attestations( assert store.blocks[block_root] == block last_signed_block = signed_block - if is_post_eip7732(spec): + if is_post_gloas(spec): assert ( store.execution_payload_states[block_root].hash_tree_root() == post_state.hash_tree_root() @@ -503,7 +503,7 @@ def apply_next_slots_with_attestations( assert store.blocks[block_root] == block last_signed_block = signed_block - if is_post_eip7732(spec): + if is_post_gloas(spec): assert ( store.execution_payload_states[block_root].hash_tree_root() == post_state.hash_tree_root() diff --git a/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py b/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py index 856d655deb..14766c0ac0 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py +++ b/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py @@ -34,7 +34,7 @@ from eth2spec.test.helpers.forks import ( get_next_fork_transition, is_post_bellatrix, - is_post_eip7732, + is_post_gloas, is_post_electra, ) from eth2spec.test.helpers.proposer_slashings import ( @@ -64,7 +64,7 @@ class OperationType(Enum): CONSOLIDATION_REQUEST = auto() -# TODO(jtraglia): Pretty sure this doesn't play well with eip7732. Needs some work. +# TODO(jtraglia): Pretty sure this doesn't play well with Gloas. Needs some work. def _set_operations_by_dict(spec, block, operation_dict, state): for key, value in operation_dict.items(): # to handle e.g. `execution_requests.deposits` and `deposits` @@ -72,7 +72,7 @@ def _set_operations_by_dict(spec, block, operation_dict, state): for attr in key.split(".")[:-1]: obj = getattr(obj, attr) setattr(obj, key.split(".")[-1], value) - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.block_hash = compute_el_block_hash( spec, payload, state diff --git a/tests/core/pyspec/eth2spec/test/helpers/forks.py b/tests/core/pyspec/eth2spec/test/helpers/forks.py index af10154b77..31196469c6 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/forks.py +++ b/tests/core/pyspec/eth2spec/test/helpers/forks.py @@ -4,7 +4,7 @@ CAPELLA, DENEB, EIP7441, - EIP7732, + GLOAS, EIP7805, ELECTRA, FULU, @@ -53,12 +53,12 @@ def is_post_fulu(spec): return is_post_fork(spec.fork, FULU) -def is_post_eip7441(spec): - return is_post_fork(spec.fork, EIP7441) +def is_post_gloas(spec): + return is_post_fork(spec.fork, GLOAS) -def is_post_eip7732(spec): - return is_post_fork(spec.fork, EIP7732) +def is_post_eip7441(spec): + return is_post_fork(spec.fork, EIP7441) def is_post_eip7805(spec): diff --git a/tests/core/pyspec/eth2spec/test/helpers/genesis.py b/tests/core/pyspec/eth2spec/test/helpers/genesis.py index 64090a3be2..4b0fabab11 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/genesis.py +++ b/tests/core/pyspec/eth2spec/test/helpers/genesis.py @@ -17,7 +17,7 @@ is_post_capella, is_post_deneb, is_post_eip7441, - is_post_eip7732, + is_post_gloas, is_post_electra, is_post_fulu, ) @@ -59,7 +59,7 @@ def build_mock_validator(spec, i: int, balance: int): return validator -def get_post_eip7732_genesis_execution_payload_header(spec, slot, eth1_block_hash): +def get_post_gloas_genesis_execution_payload_header(spec, slot, eth1_block_hash): kzgs = spec.List[spec.KZGCommitment, spec.MAX_BLOB_COMMITMENTS_PER_BLOCK]() header = spec.ExecutionPayloadHeader( parent_block_hash=b"\x30" * 32, @@ -75,8 +75,8 @@ def get_post_eip7732_genesis_execution_payload_header(spec, slot, eth1_block_has def get_sample_genesis_execution_payload_header(spec, slot, eth1_block_hash=None): if eth1_block_hash is None: eth1_block_hash = b"\x55" * 32 - if is_post_eip7732(spec): - return get_post_eip7732_genesis_execution_payload_header(spec, slot, eth1_block_hash) + if is_post_gloas(spec): + return get_post_gloas_genesis_execution_payload_header(spec, slot, eth1_block_hash) payload_header = spec.ExecutionPayloadHeader( parent_hash=b"\x30" * 32, fee_recipient=b"\x42" * 20, @@ -136,7 +136,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold): current_version = getattr(spec.config, f"{spec.fork.upper()}_FORK_VERSION") genesis_block_body = spec.BeaconBlockBody() - if is_post_eip7732(spec): + if is_post_gloas(spec): genesis_block_body.signed_execution_payload_header.message.block_hash = eth1_block_hash state = spec.BeaconState( @@ -218,7 +218,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold): state.pending_partial_withdrawals = [] state.pending_consolidations = [] - if is_post_eip7732(spec): + if is_post_gloas(spec): state.execution_payload_availability = [0b1 for _ in range(spec.SLOTS_PER_HISTORICAL_ROOT)] withdrawals = spec.List[spec.Withdrawal, spec.MAX_WITHDRAWALS_PER_PAYLOAD]() state.latest_withdrawals_root = withdrawals.hash_tree_root() diff --git a/tests/core/pyspec/eth2spec/test/helpers/state.py b/tests/core/pyspec/eth2spec/test/helpers/state.py index 3544c7cc65..048f7192e1 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/state.py +++ b/tests/core/pyspec/eth2spec/test/helpers/state.py @@ -5,7 +5,7 @@ from eth2spec.test.context import expect_assertion_error from eth2spec.test.helpers.block import apply_empty_block, sign_block, transition_unsigned_block -from eth2spec.test.helpers.forks import is_post_altair, is_post_eip7732 +from eth2spec.test.helpers.forks import is_post_altair, is_post_gloas from eth2spec.test.helpers.voluntary_exits import get_unslashed_exited_validators from eth2spec.utils.hash_function import hash from eth2spec.utils.ssz.ssz_impl import uint_to_bytes @@ -92,7 +92,7 @@ def get_state_root(spec, state, slot) -> bytes: def payload_state_transition_no_store(spec, state, block): - if is_post_eip7732(spec): + if is_post_gloas(spec): # cache the latest block header previous_state_root = state.hash_tree_root() if state.latest_block_header.state_root == spec.Root(): @@ -105,7 +105,7 @@ def payload_state_transition_no_store(spec, state, block): def payload_state_transition(spec, store, block): root = block.hash_tree_root() state = store.block_states[root].copy() - if is_post_eip7732(spec): + if is_post_gloas(spec): payload_state_transition_no_store(spec, state, block) store.execution_payload_states[root] = state return state diff --git a/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py b/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py index 7c4565a65c..1cf92bd846 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py +++ b/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py @@ -1,8 +1,8 @@ -from eth2spec.test.helpers.forks import is_post_eip7732, is_post_electra, is_post_fulu +from eth2spec.test.helpers.forks import is_post_gloas, is_post_electra, is_post_fulu def get_expected_withdrawals(spec, state): - if is_post_eip7732(spec): + if is_post_gloas(spec): withdrawals, _, _ = spec.get_expected_withdrawals(state) return withdrawals elif is_post_electra(spec): @@ -276,7 +276,7 @@ def run_withdrawals_processing( if not valid: try: - if is_post_eip7732(spec): + if is_post_gloas(spec): spec.process_withdrawals(state) else: spec.process_withdrawals(state, execution_payload) @@ -287,7 +287,7 @@ def run_withdrawals_processing( yield "post", None return - if is_post_eip7732(spec): + if is_post_gloas(spec): spec.process_withdrawals(state) else: spec.process_withdrawals(state, execution_payload) diff --git a/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_block_header.py b/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_block_header.py index 1098e100c1..cd99116128 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_block_header.py +++ b/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_block_header.py @@ -7,7 +7,7 @@ compute_el_block_hash, compute_el_block_hash_for_block, ) -from eth2spec.test.helpers.forks import is_post_bellatrix, is_post_eip7732 +from eth2spec.test.helpers.forks import is_post_bellatrix, is_post_gloas from eth2spec.test.helpers.state import next_slot @@ -71,7 +71,7 @@ def test_invalid_proposer_index(spec, state): def test_invalid_parent_root(spec, state): block = build_empty_block_for_next_slot(spec, state) block.parent_root = b"\12" * 32 # invalid prev root - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.block_hash = compute_el_block_hash( spec, payload, state @@ -94,7 +94,7 @@ def test_invalid_multiple_blocks_single_slot(spec, state): child_block = block.copy() child_block.parent_root = block.hash_tree_root() - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) child_block.body.signed_execution_payload_header.message.block_hash = compute_el_block_hash( spec, payload, state diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py index 67b85b0522..1da198097f 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py @@ -13,7 +13,7 @@ ) from eth2spec.test.helpers.constants import ( ALTAIR, - EIP7732, + GLOAS, MAINNET, ) from eth2spec.test.helpers.fork_choice import ( @@ -24,7 +24,7 @@ on_tick_and_append_step, tick_and_add_block, ) -from eth2spec.test.helpers.forks import is_post_eip7732 +from eth2spec.test.helpers.forks import is_post_gloas from eth2spec.test.helpers.state import ( payload_state_transition, state_transition_and_sign_block, @@ -39,7 +39,7 @@ def _apply_base_block_a(spec, state, store, test_steps): payload_state_transition(spec, store, signed_block_a.message) head = spec.get_head(store) expected_root = signed_block_a.message.hash_tree_root() - if is_post_eip7732(spec): + if is_post_gloas(spec): assert head.root == expected_root else: check_head_against_root(spec, store, signed_block_a.message.hash_tree_root()) @@ -140,8 +140,8 @@ def _get_greater_than_proposer_boost_score(spec, store, state, proposer_boost_ro return proposer_score // base_effective_balance + 1 -# TODO(jtraglia): Investigate why this doesn't work with eip7732 -@with_all_phases_from_except(ALTAIR, [EIP7732]) +# TODO(jtraglia): Investigate why this doesn't work with Gloas +@with_all_phases_from_except(ALTAIR, [GLOAS]) @with_presets([MAINNET], reason="to create non-duplicate committee") @spec_state_test def test_ex_ante_attestations_is_greater_than_proposer_boost_with_boost(spec, state): @@ -376,8 +376,8 @@ def _filter_participant_set(participants): yield "steps", test_steps -# TODO(jtraglia): Investigate why this doesn't work with eip7732 -@with_all_phases_from_except(ALTAIR, [EIP7732]) +# TODO(jtraglia): Investigate why this doesn't work with Gloas +@with_all_phases_from_except(ALTAIR, [GLOAS]) @with_presets([MAINNET], reason="to create non-duplicate committee") @spec_state_test def test_ex_ante_sandwich_with_boost_not_sufficient(spec, state): diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py index 9573de8c9c..b9459593d0 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py @@ -13,7 +13,7 @@ ) from eth2spec.test.helpers.constants import ( ALTAIR, - EIP7732, + GLOAS, MINIMAL, ) from eth2spec.test.helpers.fork_choice import ( @@ -32,7 +32,7 @@ ) from eth2spec.test.helpers.forks import ( is_post_altair, - is_post_eip7732, + is_post_gloas, ) from eth2spec.test.helpers.state import ( next_epoch, @@ -226,7 +226,7 @@ def test_filtered_block_tree(spec, state): # # build a chain without attestations off of previous justified block - if is_post_eip7732(spec): + if is_post_gloas(spec): non_viable_state = store.execution_payload_states[store.justified_checkpoint.root].copy() else: non_viable_state = store.block_states[store.justified_checkpoint.root].copy() @@ -272,8 +272,8 @@ def test_filtered_block_tree(spec, state): yield "steps", test_steps -# This test is skipped in EIP7732 because the block's slot decides first on weight ties -@with_all_phases_from_except(ALTAIR, [EIP7732]) +# This test is skipped in Gloas because the block's slot decides first on weight ties +@with_all_phases_from_except(ALTAIR, [GLOAS]) @spec_state_test def test_proposer_boost_correct_head(spec, state): test_steps = [] @@ -439,7 +439,7 @@ def test_discard_equivocations_slashed_validator_censoring(spec, state): anchor_state = state.copy() # Generate an anchor block with correct state root anchor_block = spec.BeaconBlock(state_root=anchor_state.hash_tree_root()) - if is_post_eip7732(spec): + if is_post_gloas(spec): anchor_block.body.signed_execution_payload_header.message.block_hash = ( anchor_state.latest_block_hash ) @@ -448,7 +448,7 @@ def test_discard_equivocations_slashed_validator_censoring(spec, state): # Get a new store with the anchor state & anchor block store = spec.get_forkchoice_store(anchor_state, anchor_block) - if is_post_eip7732(spec): + if is_post_gloas(spec): store.execution_payload_states = store.block_states.copy() # Now generate the store checks @@ -655,7 +655,7 @@ def test_voting_source_beyond_two_epoch(spec, state): # Store the head before adding the fork to the store correct_head = spec.get_head(store) - if is_post_eip7732(spec): + if is_post_gloas(spec): correct_head = correct_head.root # Now add the fork to the store diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py index 8cae4e663b..cd6a85e8de 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py @@ -12,7 +12,7 @@ ) from eth2spec.test.helpers.constants import ( ALTAIR, - EIP7732, + GLOAS, ) from eth2spec.test.helpers.fork_choice import ( apply_next_epoch_with_attestations, @@ -30,7 +30,7 @@ ) -@with_all_phases_from_except(ALTAIR, [EIP7732]) +@with_all_phases_from_except(ALTAIR, [GLOAS]) @spec_state_test def test_basic_is_head_root(spec, state): test_steps = [] @@ -72,7 +72,7 @@ def test_basic_is_head_root(spec, state): yield "steps", test_steps -@with_all_phases_from_except(ALTAIR, [EIP7732]) +@with_all_phases_from_except(ALTAIR, [GLOAS]) @spec_state_test def test_basic_is_parent_root(spec, state): test_steps = [] diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py index a9ae0d46f0..c97379a478 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_on_block.py @@ -32,7 +32,7 @@ ) from eth2spec.test.helpers.forks import ( is_post_bellatrix, - is_post_eip7732, + is_post_gloas, ) from eth2spec.test.helpers.state import ( next_epoch, @@ -117,7 +117,7 @@ def test_on_block_checkpoints(spec, state): ) # Mock the finalized_checkpoint and build a block on it - if is_post_eip7732(spec): + if is_post_gloas(spec): fin_state = store.execution_payload_states[last_block_root].copy() else: fin_state = store.block_states[last_block_root].copy() @@ -172,7 +172,7 @@ def test_on_block_bad_parent_root(spec, state): block.state_root = state.hash_tree_root() block.parent_root = b"\x45" * 32 - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) block.body.signed_execution_payload_header.message.block_hash = compute_el_block_hash( spec, payload, state @@ -512,7 +512,7 @@ def test_proposer_boost(spec, state): # Process block on timely arrival just before end of boost interval # Round up to nearest second - if is_post_eip7732(spec): + if is_post_gloas(spec): late_block_cutoff_ms = spec.get_slot_component_duration_ms( spec.config.ATTESTATION_DUE_BPS_GLOAS ) @@ -525,7 +525,7 @@ def test_proposer_boost(spec, state): yield from add_block(spec, store, signed_block, test_steps) payload_state_transition(spec, store, signed_block.message) assert store.proposer_boost_root == spec.hash_tree_root(block) - if is_post_eip7732(spec): + if is_post_gloas(spec): node = spec.ForkChoiceNode( root=spec.hash_tree_root(block), payload_status=spec.PAYLOAD_STATUS_PENDING, @@ -542,7 +542,7 @@ def test_proposer_boost(spec, state): ) on_tick_and_append_step(spec, store, time, test_steps) assert store.proposer_boost_root == spec.Root() - if is_post_eip7732(spec): + if is_post_gloas(spec): node = spec.ForkChoiceNode( root=spec.hash_tree_root(block), payload_status=spec.PAYLOAD_STATUS_PENDING, @@ -561,7 +561,7 @@ def test_proposer_boost(spec, state): yield from add_block(spec, store, signed_block, test_steps) payload_state_transition(spec, store, signed_block.message) assert store.proposer_boost_root == spec.hash_tree_root(block) - if is_post_eip7732(spec): + if is_post_gloas(spec): node = spec.ForkChoiceNode( root=spec.hash_tree_root(block), payload_status=spec.PAYLOAD_STATUS_PENDING, @@ -578,7 +578,7 @@ def test_proposer_boost(spec, state): ) on_tick_and_append_step(spec, store, time, test_steps) assert store.proposer_boost_root == spec.Root() - if is_post_eip7732(spec): + if is_post_gloas(spec): node = spec.ForkChoiceNode( root=spec.hash_tree_root(block), payload_status=spec.PAYLOAD_STATUS_PENDING, @@ -617,7 +617,7 @@ def test_proposer_boost_root_same_slot_untimely_block(spec, state): # Process block on untimely arrival in the same slot # Round up to nearest second - if is_post_eip7732(spec): + if is_post_gloas(spec): late_block_cutoff_ms = spec.get_slot_component_duration_ms( spec.config.ATTESTATION_DUE_BPS_GLOAS ) @@ -663,7 +663,7 @@ def test_proposer_boost_is_first_block(spec, state): # Process block on timely arrival just before end of boost interval # Round up to nearest second - if is_post_eip7732(spec): + if is_post_gloas(spec): late_block_cutoff_ms = spec.get_slot_component_duration_ms( spec.config.ATTESTATION_DUE_BPS_GLOAS ) @@ -677,7 +677,7 @@ def test_proposer_boost_is_first_block(spec, state): payload_state_transition(spec, store, signed_block_a.message) # `proposer_boost_root` is now `block_a` assert store.proposer_boost_root == spec.hash_tree_root(block_a) - if is_post_eip7732(spec): + if is_post_gloas(spec): node = spec.ForkChoiceNode( root=spec.hash_tree_root(block_a), payload_status=spec.PAYLOAD_STATUS_PENDING, @@ -702,7 +702,7 @@ def test_proposer_boost_is_first_block(spec, state): payload_state_transition(spec, store, signed_block_b.message) # `proposer_boost_root` is still `block_a` assert store.proposer_boost_root == spec.hash_tree_root(block_a) - if is_post_eip7732(spec): + if is_post_gloas(spec): node = spec.ForkChoiceNode( root=spec.hash_tree_root(block_b), payload_status=spec.PAYLOAD_STATUS_PENDING, @@ -1214,7 +1214,7 @@ def test_justified_update_not_realized_finality(spec, state): assert state.current_justified_checkpoint.epoch == store.justified_checkpoint.epoch == 3 # We'll make the current head block the finalized block - if is_post_eip7732(spec): + if is_post_gloas(spec): finalized_root = spec.get_head(store).root else: finalized_root = spec.get_head(store) @@ -1262,7 +1262,7 @@ def test_justified_update_not_realized_finality(spec, state): last_block = signed_blocks[-1] last_block_root = last_block.message.hash_tree_root() ancestor_at_finalized_slot = spec.get_ancestor(store, last_block_root, finalized_block.slot) - if is_post_eip7732(spec): + if is_post_gloas(spec): ancestor_at_finalized_slot = ancestor_at_finalized_slot.root assert ancestor_at_finalized_slot == store.finalized_checkpoint.root @@ -1305,7 +1305,7 @@ def test_justified_update_monotonic(spec, state): assert store.finalized_checkpoint.epoch == 2 # We'll eventually make the current head block the finalized block - if is_post_eip7732(spec): + if is_post_gloas(spec): finalized_root = spec.get_head(store).root else: finalized_root = spec.get_head(store) @@ -1344,7 +1344,7 @@ def test_justified_update_monotonic(spec, state): last_block = signed_blocks[-1] last_block_root = last_block.message.hash_tree_root() ancestor_at_finalized_slot = spec.get_ancestor(store, last_block_root, finalized_block.slot) - if is_post_eip7732(spec): + if is_post_gloas(spec): ancestor_at_finalized_slot = ancestor_at_finalized_slot.root assert ancestor_at_finalized_slot == finalized_root @@ -1398,7 +1398,7 @@ def test_justified_update_always_if_better(spec, state): assert store.finalized_checkpoint.epoch == 2 # We'll eventually make the current head block the finalized block - if is_post_eip7732(spec): + if is_post_gloas(spec): finalized_root = spec.get_head(store).root else: finalized_root = spec.get_head(store) diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_reorg.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_reorg.py index 202d3df627..be4129046d 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_reorg.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_reorg.py @@ -28,7 +28,7 @@ payload_state_transition_no_store, tick_and_add_block, ) -from eth2spec.test.helpers.forks import is_post_eip7732 +from eth2spec.test.helpers.forks import is_post_gloas from eth2spec.test.helpers.state import ( next_epoch, next_slot, @@ -84,7 +84,7 @@ def test_simple_attempted_reorg_without_enough_ffg_votes(spec, state): yield from tick_and_add_block(spec, store, signed_block, test_steps) check_head_against_root(spec, store, signed_block.message.hash_tree_root()) payload_state_transition(spec, store, signed_block.message) - if is_post_eip7732(spec): + if is_post_gloas(spec): head_root = spec.get_head(store).root state = store.execution_payload_states[head_root].copy() else: @@ -218,7 +218,7 @@ def _run_delayed_justification(spec, state, attempted_reorg, is_justifying_previ for signed_block in signed_blocks: yield from tick_and_add_block(spec, store, signed_block, test_steps) payload_state_transition(spec, store, signed_block.message) - if is_post_eip7732(spec): + if is_post_gloas(spec): state = store.execution_payload_states[spec.get_head(store).root].copy() else: state = store.block_states[spec.get_head(store)].copy() diff --git a/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py index 3503193cae..8e1f1dbdbc 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py @@ -38,7 +38,7 @@ is_post_altair, is_post_bellatrix, is_post_capella, - is_post_eip7732, + is_post_gloas, is_post_electra, is_post_fulu, ) @@ -170,7 +170,7 @@ def process_and_sign_block_without_header_validations(spec, state, block): state_root=spec.Bytes32(), body_root=block.body.hash_tree_root(), ) - if is_post_bellatrix(spec) and not is_post_eip7732(spec): + if is_post_bellatrix(spec) and not is_post_gloas(spec): if spec.is_execution_enabled(state, block.body): spec.process_execution_payload(state, block.body, spec.EXECUTION_ENGINE) @@ -224,7 +224,7 @@ def test_invalid_parent_from_same_slot(spec, state): child_block = parent_block.copy() child_block.parent_root = state.latest_block_header.hash_tree_root() - if is_post_eip7732(spec): + if is_post_gloas(spec): child_block.body.signed_execution_payload_header = ( build_empty_signed_execution_payload_header(spec, state) ) @@ -232,7 +232,7 @@ def test_invalid_parent_from_same_slot(spec, state): child_block.body.execution_payload = build_empty_execution_payload(spec, state) child_block.parent_root = state.latest_block_header.hash_tree_root() - if is_post_eip7732(spec): + if is_post_gloas(spec): payload = build_empty_execution_payload(spec, state) child_block.body.signed_execution_payload_header.message.block_hash = compute_el_block_hash( spec, payload, state diff --git a/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py b/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py index c3be7198b0..8ae5188df9 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py +++ b/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py @@ -2,7 +2,7 @@ from eth2spec.test.helpers.attestations import get_valid_attestation, sign_attestation from eth2spec.test.helpers.block import build_empty_block_for_next_slot from eth2spec.test.helpers.fork_choice import get_genesis_forkchoice_store -from eth2spec.test.helpers.forks import is_post_eip7732, is_post_electra +from eth2spec.test.helpers.forks import is_post_gloas, is_post_electra from eth2spec.test.helpers.state import ( next_epoch, next_slot, @@ -24,7 +24,7 @@ def run_on_attestation(spec, state, store, attestation, valid=True): spec.on_attestation(store, attestation) sample_index = indexed_attestation.attesting_indices[0] - if is_post_eip7732(spec): + if is_post_gloas(spec): assert attestation.data.index < 2 latest_message = spec.LatestMessage( slot=attestation.data.slot, diff --git a/tests/formats/operations/README.md b/tests/formats/operations/README.md index dd4d4ba51a..60b507ca28 100644 --- a/tests/formats/operations/README.md +++ b/tests/formats/operations/README.md @@ -49,7 +49,7 @@ Operations: | `deposit_request` | `DepositRequest` | `deposit_request` | `process_deposit_request(state, deposit_request)` (new in Electra) | | `withdrawal_request` | `WithdrawalRequest` | `withdrawal_request` | `process_withdrawal_request(state, withdrawal_request)` (new in Electra) | | `consolidation_request` | `ConsolidationRequest` | `consolidation_request` | `process_consolidation_request(state, consolidation_request)` (new in Electra) | -| `payload_attestation` | `PayloadAttestation` | `payload_attestation` | `process_payload_attestation(state, payload_attestation)` (new in EIP7732) | +| `payload_attestation` | `PayloadAttestation` | `payload_attestation` | `process_payload_attestation(state, payload_attestation)` (new in Gloas) | Note that `block_header` is not strictly an operation (and is a full `Block`), but processed in the same manner, and hence included here. From 0a163af5b2a168111096a443c29286a661c3b347 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 18:07:31 -0500 Subject: [PATCH 07/17] Add files & run make lint --- presets/mainnet/gloas.yaml | 13 +++++++ presets/minimal/gloas.yaml | 13 +++++++ pysetup/spec_builders/__init__.py | 2 +- pysetup/spec_builders/gloas.py | 29 ++++++++++++++ specs/gloas/fork.md | 6 +-- specs/gloas/p2p-interface.md | 38 +++++++++---------- specs/gloas/validator.md | 23 ++++++----- .../test/capella/sanity/test_blocks.py | 2 +- tests/core/pyspec/eth2spec/test/context.py | 2 +- .../fork_choice/test_deposit_with_reorg.py | 2 +- .../test/electra/sanity/blocks/test_blocks.py | 2 +- .../test/fulu/fork_choice/test_on_block.py | 2 +- .../eth2spec/test/helpers/attestations.py | 2 +- .../core/pyspec/eth2spec/test/helpers/blob.py | 2 +- .../pyspec/eth2spec/test/helpers/block.py | 2 +- .../test/helpers/execution_payload.py | 2 +- .../eth2spec/test/helpers/fork_choice.py | 2 +- .../eth2spec/test/helpers/fork_transition.py | 2 +- .../pyspec/eth2spec/test/helpers/forks.py | 2 +- .../pyspec/eth2spec/test/helpers/genesis.py | 2 +- .../eth2spec/test/helpers/withdrawals.py | 2 +- .../test/phase0/sanity/test_blocks.py | 2 +- .../fork_choice/test_on_attestation.py | 2 +- tests/formats/operations/README.md | 2 +- 24 files changed, 106 insertions(+), 52 deletions(-) create mode 100644 presets/mainnet/gloas.yaml create mode 100644 presets/minimal/gloas.yaml create mode 100644 pysetup/spec_builders/gloas.py diff --git a/presets/mainnet/gloas.yaml b/presets/mainnet/gloas.yaml new file mode 100644 index 0000000000..b4eea3c36d --- /dev/null +++ b/presets/mainnet/gloas.yaml @@ -0,0 +1,13 @@ +# Mainnet preset - Gloas + +# Networking +# --------------------------------------------------------------- +# floorlog2(get_generalized_index(BeaconBlockBody, "signed_execution_payload_header", "message", "blob_kzg_commitments_root")) (= 9) +KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS: 9 + +# Execution +# --------------------------------------------------------------- +# 2**9 (= 512) validators +PTC_SIZE: 512 +# 2**2 (= 4) attestations +MAX_PAYLOAD_ATTESTATIONS: 4 diff --git a/presets/minimal/gloas.yaml b/presets/minimal/gloas.yaml new file mode 100644 index 0000000000..10abc272a0 --- /dev/null +++ b/presets/minimal/gloas.yaml @@ -0,0 +1,13 @@ +# Minimal preset - Gloas + +# Networking +# --------------------------------------------------------------- +# floorlog2(get_generalized_index(BeaconBlockBody, "signed_execution_payload_header", "message", "blob_kzg_commitments_root")) (= 9) +KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS: 9 + +# Execution +# --------------------------------------------------------------- +# [customized] 2**1 (= 2) validators +PTC_SIZE: 2 +# 2**2 (= 4) attestations +MAX_PAYLOAD_ATTESTATIONS: 4 diff --git a/pysetup/spec_builders/__init__.py b/pysetup/spec_builders/__init__.py index 316d16aafa..cb3948c432 100644 --- a/pysetup/spec_builders/__init__.py +++ b/pysetup/spec_builders/__init__.py @@ -4,10 +4,10 @@ from .deneb import DenebSpecBuilder from .eip6800 import EIP6800SpecBuilder from .eip7441 import EIP7441SpecBuilder -from .gloas import GloasSpecBuilder from .eip7805 import EIP7805SpecBuilder from .electra import ElectraSpecBuilder from .fulu import FuluSpecBuilder +from .gloas import GloasSpecBuilder from .phase0 import Phase0SpecBuilder spec_builders = { diff --git a/pysetup/spec_builders/gloas.py b/pysetup/spec_builders/gloas.py new file mode 100644 index 0000000000..48cef3b47b --- /dev/null +++ b/pysetup/spec_builders/gloas.py @@ -0,0 +1,29 @@ +from ..constants import GLOAS +from .base import BaseSpecBuilder + + +class GloasSpecBuilder(BaseSpecBuilder): + fork: str = GLOAS + + @classmethod + def imports(cls, preset_name: str): + return f""" +from eth2spec.fulu import {preset_name} as fulu +""" + + @classmethod + def deprecate_constants(cls) -> set[str]: + return set( + [ + "EXECUTION_PAYLOAD_GINDEX", + ] + ) + + @classmethod + def deprecate_presets(cls) -> set[str]: + return set( + [ + "KZG_COMMITMENT_INCLUSION_PROOF_DEPTH", + "KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH", + ] + ) diff --git a/specs/gloas/fork.md b/specs/gloas/fork.md index caa8d3594e..9642760269 100644 --- a/specs/gloas/fork.md +++ b/specs/gloas/fork.md @@ -9,7 +9,7 @@ - [Helper functions](#helper-functions) - [Misc](#misc) - [Modified `compute_fork_version`](#modified-compute_fork_version) -- [Fork to EIP-7732](#fork-to-eip-7732) +- [Fork to Gloas](#fork-to-gloas) - [Fork trigger](#fork-trigger) - [Upgrading the state](#upgrading-the-state) @@ -23,8 +23,8 @@ This document describes the process of the Gloas upgrade. Warning: this configuration is not definitive. -| Name | Value | -| ---------------------- | ------------------------------------- | +| Name | Value | +| -------------------- | ------------------------------------- | | `GLOAS_FORK_VERSION` | `Version('0x07000000')` | | `GLOAS_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index a920896c32..1ea0655467 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -34,7 +34,8 @@ ## Introduction -This document contains the consensus-layer networking specification for GloasGloasGloasGloasGloasGloasGloasGloas. +This document contains the consensus-layer networking specification for +GloasGloasGloasGloasGloasGloasGloasGloas. The specification of these changes continues in the same format as the network specifications of previous upgrades, and assumes them as pre-requisite. @@ -45,8 +46,8 @@ specifications of previous upgrades, and assumes them as pre-requisite. *[Modified in Gloas:EIP7732]* -| Name | Value | Description | -| ----------------------------------------------- | ----- | ----------------------------------------------------------- | +| Name | Value | Description | +| --------------------------------------------- | ----- | ----------------------------------------------------------- | | `KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH_GLOAS` | `9` | Merkle proof depth for the `blob_kzg_commitments` list item | ### Configuration @@ -79,9 +80,9 @@ class DataColumnSidecar(Container): ##### Modified `verify_data_column_sidecar_inclusion_proof` -`verify_data_column_sidecar_inclusion_proof` is modified in Gloas to account -for the fact that the KZG commitments are included in the -`ExecutionPayloadEnvelope` and no longer in the beacon block body. +`verify_data_column_sidecar_inclusion_proof` is modified in Gloas to account for +the fact that the KZG commitments are included in the `ExecutionPayloadEnvelope` +and no longer in the beacon block body. ```python def verify_data_column_sidecar_inclusion_proof(sidecar: DataColumnSidecar) -> bool: @@ -108,8 +109,7 @@ def verify_data_column_sidecar_inclusion_proof(sidecar: DataColumnSidecar) -> bo ### The gossip domain: gossipsub -Some gossip meshes are upgraded in the fork of Gloas to support upgraded -types. +Some gossip meshes are upgraded in the fork of Gloas to support upgraded types. #### Topics and messages @@ -132,8 +132,8 @@ are given in this table: ##### Global topics -Gloas introduces new global topics for execution header, execution payload -and payload attestation. +Gloas introduces new global topics for execution header, execution payload and +payload attestation. ###### `beacon_aggregate_and_proof` @@ -301,7 +301,7 @@ The following validations are removed: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | -| `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | +| `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | ##### BeaconBlocksByRoot v2 @@ -318,7 +318,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | -| `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | +| `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | ##### BlobSidecarsByRoot v1 @@ -326,9 +326,9 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: -| `fork_version` | Chunk SSZ type | -| ---------------------- | --------------------- | -| `DENEB_FORK_VERSION` | `deneb.BlobSidecar` | +| `fork_version` | Chunk SSZ type | +| -------------------- | ------------------- | +| `DENEB_FORK_VERSION` | `deneb.BlobSidecar` | | `GLOAS_FORK_VERSION` | `gloas.BlobSidecar` | ##### ExecutionPayloadEnvelopesByRange v1 @@ -367,8 +367,8 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: -| `fork_version` | Chunk SSZ type | -| ---------------------- | ---------------------------------------- | +| `fork_version` | Chunk SSZ type | +| -------------------- | -------------------------------------- | | `GLOAS_FORK_VERSION` | `gloas.SignedExecutionPayloadEnvelope` | ##### ExecutionPayloadEnvelopesByRoot v1 @@ -380,8 +380,8 @@ The `` field is calculated as -| `fork_version` | Chunk SSZ type | -| ---------------------- | ---------------------------------------- | +| `fork_version` | Chunk SSZ type | +| -------------------- | -------------------------------------- | | `GLOAS_FORK_VERSION` | `gloas.SignedExecutionPayloadEnvelope` | Request Content: diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index 1f0620e249..7e9c1762f6 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -32,13 +32,13 @@ included in Gloas. ### Time parameters -| Name | Value | Unit | Duration | -| ------------------------------ | -------------- | :----------: | :-----------------------: | -| `ATTESTATION_DUE_BPS_GLOAS` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | -| `AGGREGRATE_DUE_BPS_GLOAS` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | -| `SYNC_MESSAGE_DUE_BPS_GLOAS` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | -| `CONTRIBUTION_DUE_BPS_GLOAS` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | -| `PAYLOAD_ATTESTATION_DUE_BPS` | `uint64(7500)` | basis points | 75% of `SLOT_DURATION_MS` | +| Name | Value | Unit | Duration | +| ----------------------------- | -------------- | :----------: | :-----------------------: | +| `ATTESTATION_DUE_BPS_GLOAS` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | +| `AGGREGRATE_DUE_BPS_GLOAS` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | +| `SYNC_MESSAGE_DUE_BPS_GLOAS` | `uint64(2500)` | basis points | 25% of `SLOT_DURATION_MS` | +| `CONTRIBUTION_DUE_BPS_GLOAS` | `uint64(5000)` | basis points | 50% of `SLOT_DURATION_MS` | +| `PAYLOAD_ATTESTATION_DUE_BPS` | `uint64(7500)` | basis points | 75% of `SLOT_DURATION_MS` | ## Validator assignment @@ -89,11 +89,10 @@ All validator responsibilities remain unchanged other than the following: ### Attestation -The attestation deadline is changed with `ATTESTATION_DUE_BPS_GLOAS`. -Moreover, the `attestation.data.index` field is now used to signal the payload -status of the block being attested to (`attestation.data.beacon_block_root`). -With the alias `data = attestation.data`, the validator should set this field as -follows: +The attestation deadline is changed with `ATTESTATION_DUE_BPS_GLOAS`. Moreover, +the `attestation.data.index` field is now used to signal the payload status of +the block being attested to (`attestation.data.beacon_block_root`). With the +alias `data = attestation.data`, the validator should set this field as follows: - If `block.slot == current_slot` (i.e., `data.slot`), then always set `data.index = 0`. diff --git a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py index 904d757672..9806352744 100644 --- a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py @@ -22,7 +22,7 @@ from eth2spec.test.helpers.deposits import ( prepare_state_and_deposit, ) -from eth2spec.test.helpers.forks import is_post_gloas, is_post_electra +from eth2spec.test.helpers.forks import is_post_electra, is_post_gloas from eth2spec.test.helpers.keys import pubkeys from eth2spec.test.helpers.state import ( next_epoch_via_block, diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index 057f46c6ae..d4207a85b3 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -19,10 +19,10 @@ CAPELLA, DENEB, EIP7441, - GLOAS, EIP7805, ELECTRA, FULU, + GLOAS, LIGHT_CLIENT_TESTING_FORKS, MINIMAL, PHASE0, diff --git a/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py b/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py index c9c7c39a01..8c0fe49528 100644 --- a/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py +++ b/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py @@ -7,8 +7,8 @@ build_empty_block_for_next_slot, ) from eth2spec.test.helpers.constants import ( - GLOAS, ELECTRA, + GLOAS, MINIMAL, ) from eth2spec.test.helpers.deposits import ( diff --git a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py index 3c22fff7cd..13b09f0105 100644 --- a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py @@ -16,8 +16,8 @@ get_signed_address_change, ) from eth2spec.test.helpers.constants import ( - GLOAS, ELECTRA, + GLOAS, MINIMAL, ) from eth2spec.test.helpers.deposits import ( diff --git a/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py b/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py index 8d04dfcfbc..bb1b507c0b 100644 --- a/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py +++ b/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py @@ -8,8 +8,8 @@ ) from eth2spec.test.helpers.blob import get_block_with_blob_and_sidecars from eth2spec.test.helpers.constants import ( - GLOAS, FULU, + GLOAS, ) from eth2spec.test.helpers.fork_choice import ( BlobData, diff --git a/tests/core/pyspec/eth2spec/test/helpers/attestations.py b/tests/core/pyspec/eth2spec/test/helpers/attestations.py index 8ddf18fc02..f66b2311a5 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/attestations.py +++ b/tests/core/pyspec/eth2spec/test/helpers/attestations.py @@ -5,8 +5,8 @@ from eth2spec.test.helpers.forks import ( is_post_altair, is_post_deneb, - is_post_gloas, is_post_electra, + is_post_gloas, ) from eth2spec.test.helpers.keys import privkeys from eth2spec.test.helpers.state import ( diff --git a/tests/core/pyspec/eth2spec/test/helpers/blob.py b/tests/core/pyspec/eth2spec/test/helpers/blob.py index 6b0a2ab7b9..6b1ce791a0 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/blob.py +++ b/tests/core/pyspec/eth2spec/test/helpers/blob.py @@ -8,9 +8,9 @@ from eth2spec.test.helpers.block import build_empty_block_for_next_slot from eth2spec.test.helpers.execution_payload import compute_el_block_hash from eth2spec.test.helpers.forks import ( - is_post_gloas, is_post_electra, is_post_fulu, + is_post_gloas, ) from eth2spec.test.helpers.keys import privkeys from eth2spec.test.helpers.state import state_transition_and_sign_block diff --git a/tests/core/pyspec/eth2spec/test/helpers/block.py b/tests/core/pyspec/eth2spec/test/helpers/block.py index 1af2732ce7..8c2cc312ab 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/block.py +++ b/tests/core/pyspec/eth2spec/test/helpers/block.py @@ -24,8 +24,8 @@ is_post_altair, is_post_bellatrix, is_post_eip7441, - is_post_gloas, is_post_electra, + is_post_gloas, ) from eth2spec.test.helpers.keys import privkeys, whisk_ks_final, whisk_ks_initial from eth2spec.utils import bls diff --git a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py index 788e503fce..d8becc7883 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py @@ -9,8 +9,8 @@ from eth2spec.test.helpers.forks import ( is_post_capella, is_post_deneb, - is_post_gloas, is_post_electra, + is_post_gloas, ) from eth2spec.test.helpers.keys import privkeys from eth2spec.test.helpers.withdrawals import get_expected_withdrawals diff --git a/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py b/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py index 39670ed4fb..89fc291b09 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py +++ b/tests/core/pyspec/eth2spec/test/helpers/fork_choice.py @@ -10,7 +10,7 @@ next_slots_with_attestations, state_transition_with_full_block, ) -from eth2spec.test.helpers.forks import is_post_gloas, is_post_fulu +from eth2spec.test.helpers.forks import is_post_fulu, is_post_gloas from eth2spec.test.helpers.state import ( payload_state_transition, payload_state_transition_no_store, diff --git a/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py b/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py index 14766c0ac0..03daf0a48b 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py +++ b/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py @@ -34,8 +34,8 @@ from eth2spec.test.helpers.forks import ( get_next_fork_transition, is_post_bellatrix, - is_post_gloas, is_post_electra, + is_post_gloas, ) from eth2spec.test.helpers.proposer_slashings import ( get_valid_proposer_slashing, diff --git a/tests/core/pyspec/eth2spec/test/helpers/forks.py b/tests/core/pyspec/eth2spec/test/helpers/forks.py index 31196469c6..89330e9494 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/forks.py +++ b/tests/core/pyspec/eth2spec/test/helpers/forks.py @@ -4,10 +4,10 @@ CAPELLA, DENEB, EIP7441, - GLOAS, EIP7805, ELECTRA, FULU, + GLOAS, PHASE0, PREVIOUS_FORK_OF, ) diff --git a/tests/core/pyspec/eth2spec/test/helpers/genesis.py b/tests/core/pyspec/eth2spec/test/helpers/genesis.py index 4b0fabab11..929879472e 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/genesis.py +++ b/tests/core/pyspec/eth2spec/test/helpers/genesis.py @@ -17,9 +17,9 @@ is_post_capella, is_post_deneb, is_post_eip7441, - is_post_gloas, is_post_electra, is_post_fulu, + is_post_gloas, ) from eth2spec.test.helpers.keys import pubkeys diff --git a/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py b/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py index 1cf92bd846..6205236f3a 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py +++ b/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py @@ -1,4 +1,4 @@ -from eth2spec.test.helpers.forks import is_post_gloas, is_post_electra, is_post_fulu +from eth2spec.test.helpers.forks import is_post_electra, is_post_fulu, is_post_gloas def get_expected_withdrawals(spec, state): diff --git a/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py index 8e1f1dbdbc..3109b821b3 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py @@ -38,9 +38,9 @@ is_post_altair, is_post_bellatrix, is_post_capella, - is_post_gloas, is_post_electra, is_post_fulu, + is_post_gloas, ) from eth2spec.test.helpers.keys import pubkeys from eth2spec.test.helpers.multi_operations import ( diff --git a/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py b/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py index 8ae5188df9..38b5af130a 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py +++ b/tests/core/pyspec/eth2spec/test/phase0/unittests/fork_choice/test_on_attestation.py @@ -2,7 +2,7 @@ from eth2spec.test.helpers.attestations import get_valid_attestation, sign_attestation from eth2spec.test.helpers.block import build_empty_block_for_next_slot from eth2spec.test.helpers.fork_choice import get_genesis_forkchoice_store -from eth2spec.test.helpers.forks import is_post_gloas, is_post_electra +from eth2spec.test.helpers.forks import is_post_electra, is_post_gloas from eth2spec.test.helpers.state import ( next_epoch, next_slot, diff --git a/tests/formats/operations/README.md b/tests/formats/operations/README.md index 60b507ca28..3c9596d223 100644 --- a/tests/formats/operations/README.md +++ b/tests/formats/operations/README.md @@ -49,7 +49,7 @@ Operations: | `deposit_request` | `DepositRequest` | `deposit_request` | `process_deposit_request(state, deposit_request)` (new in Electra) | | `withdrawal_request` | `WithdrawalRequest` | `withdrawal_request` | `process_withdrawal_request(state, withdrawal_request)` (new in Electra) | | `consolidation_request` | `ConsolidationRequest` | `consolidation_request` | `process_consolidation_request(state, consolidation_request)` (new in Electra) | -| `payload_attestation` | `PayloadAttestation` | `payload_attestation` | `process_payload_attestation(state, payload_attestation)` (new in Gloas) | +| `payload_attestation` | `PayloadAttestation` | `payload_attestation` | `process_payload_attestation(state, payload_attestation)` (new in Gloas) | Note that `block_header` is not strictly an operation (and is a full `Block`), but processed in the same manner, and hence included here. From 5b2574688851e2e198b71d95079ef703d686e20e Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 18:09:35 -0500 Subject: [PATCH 08/17] Fix some comments --- .../block_processing/test_process_execution_payload.py | 2 +- tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py | 2 +- .../deneb/block_processing/test_process_execution_payload.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py index df95036806..4772b3346b 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py @@ -36,7 +36,7 @@ def run_execution_payload_processing( If ``valid == False``, run expecting ``AssertionError`` """ # Before Deneb, only `body.execution_payload` matters. `BeaconBlockBody` is just a wrapper. - # after EIP-7732 the execution payload is no longer in the body + # After Gloas the execution payload is no longer in the body if is_post_gloas(spec): envelope = spec.ExecutionPayloadEnvelope( payload=execution_payload, diff --git a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py index 9806352744..f7332c8da5 100644 --- a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py @@ -334,7 +334,7 @@ def test_withdrawal_success_two_blocks(spec, state): block = build_empty_block_for_next_slot(spec, state) signed_block_2 = state_transition_and_sign_block(spec, state, block) - # after EIP-7732 the second block does not perform any withdrawals because + # After Gloas the second block does not perform any withdrawals because # there was no payload processed if is_post_gloas(spec): assert ( diff --git a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py index a9df399a0e..659fc5476a 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py @@ -30,7 +30,7 @@ def run_execution_payload_processing( If ``valid == False``, run expecting ``AssertionError`` """ - # after EIP-7732 the execution payload is no longer in the body + # After Gloas the execution payload is no longer in the body if is_post_gloas(spec): envelope = spec.ExecutionPayloadEnvelope( payload=execution_payload, From a742871326b83caae732690d0fa1dedf11820235 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 21:53:37 -0500 Subject: [PATCH 09/17] Disable transition with requests tests in gloas --- .../eth2spec/test/electra/transition/test_operations.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/core/pyspec/eth2spec/test/electra/transition/test_operations.py b/tests/core/pyspec/eth2spec/test/electra/transition/test_operations.py index 3bb31c2039..84389dcd93 100644 --- a/tests/core/pyspec/eth2spec/test/electra/transition/test_operations.py +++ b/tests/core/pyspec/eth2spec/test/electra/transition/test_operations.py @@ -6,6 +6,7 @@ ) from eth2spec.test.helpers.constants import ( AFTER_ELECTRA_PRE_POST_FORKS, + GLOAS, MINIMAL, ) from eth2spec.test.helpers.fork_transition import ( @@ -22,6 +23,8 @@ [ ForkMeta(pre_fork_name=pre, post_fork_name=post, fork_epoch=2) for pre, post in AFTER_ELECTRA_PRE_POST_FORKS + # TODO(jtraglia): make this work with Gloas + if post != GLOAS ] ) @always_bls @@ -52,6 +55,8 @@ def test_transition_with_deposit_request_right_after_fork( [ ForkMeta(pre_fork_name=pre, post_fork_name=post, fork_epoch=66) for pre, post in AFTER_ELECTRA_PRE_POST_FORKS + # TODO(jtraglia): make this work with Gloas + if post != GLOAS ] ) @with_presets([MINIMAL], reason="too slow") @@ -83,6 +88,8 @@ def test_transition_with_full_withdrawal_request_right_after_fork( [ ForkMeta(pre_fork_name=pre, post_fork_name=post, fork_epoch=2) for pre, post in AFTER_ELECTRA_PRE_POST_FORKS + # TODO(jtraglia): make this work with Gloas + if post != GLOAS ] ) @always_bls From 4a67bab94aab112600bf8a8acd8cf4e3d30305b7 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 21:57:33 -0500 Subject: [PATCH 10/17] Rename tests dir --- tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/__init__.py | 0 .../eth2spec/test/{eip7732 => gloas}/block_processing/__init__.py | 0 .../block_processing/test_process_execution_payload_header.py | 0 .../block_processing/test_process_payload_attestation.py | 0 .../pyspec/eth2spec/test/{eip7732 => gloas}/unittests/__init__.py | 0 .../test/{eip7732 => gloas}/unittests/test_config_invariants.py | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/block_processing/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/block_processing/test_process_execution_payload_header.py (100%) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/block_processing/test_process_payload_attestation.py (100%) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/unittests/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/unittests/test_config_invariants.py (100%) diff --git a/tests/core/pyspec/eth2spec/test/eip7732/__init__.py b/tests/core/pyspec/eth2spec/test/gloas/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7732/__init__.py rename to tests/core/pyspec/eth2spec/test/gloas/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/eip7732/block_processing/__init__.py b/tests/core/pyspec/eth2spec/test/gloas/block_processing/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7732/block_processing/__init__.py rename to tests/core/pyspec/eth2spec/test/gloas/block_processing/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_execution_payload_header.py b/tests/core/pyspec/eth2spec/test/gloas/block_processing/test_process_execution_payload_header.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_execution_payload_header.py rename to tests/core/pyspec/eth2spec/test/gloas/block_processing/test_process_execution_payload_header.py diff --git a/tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_payload_attestation.py b/tests/core/pyspec/eth2spec/test/gloas/block_processing/test_process_payload_attestation.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7732/block_processing/test_process_payload_attestation.py rename to tests/core/pyspec/eth2spec/test/gloas/block_processing/test_process_payload_attestation.py diff --git a/tests/core/pyspec/eth2spec/test/eip7732/unittests/__init__.py b/tests/core/pyspec/eth2spec/test/gloas/unittests/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7732/unittests/__init__.py rename to tests/core/pyspec/eth2spec/test/gloas/unittests/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/gloas/unittests/test_config_invariants.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7732/unittests/test_config_invariants.py rename to tests/core/pyspec/eth2spec/test/gloas/unittests/test_config_invariants.py From 5e6f575f60e48b26558238fbff856f15d5bfaaff Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 21:57:56 -0500 Subject: [PATCH 11/17] Update README --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fcc058b9f6..0cdb065c66 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,10 @@ ready. ### In-development Specifications -| Seq. | Code Name | Fork Epoch | Links | -| ---- | --------- | ---------- | ------------------------------------------------------------------ | -| 6 | **Fulu** | TBD | [Specs](specs/fulu), [Tests](tests/core/pyspec/eth2spec/test/fulu) | +| Seq. | Code Name | Fork Epoch | Links | +| ---- | --------- | ---------- | -------------------------------------------------------------------- | +| 6 | **Fulu** | TBD | [Specs](specs/fulu), [Tests](tests/core/pyspec/eth2spec/test/fulu) | +| 7 | **Gloas** | TBD | [Specs](specs/gloas), [Tests](tests/core/pyspec/eth2spec/test/gloas) | ### Accompanying documents From 8147732bc5c5d2a12e3a8542846744ecf2d59a90 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Thu, 14 Aug 2025 22:08:14 -0500 Subject: [PATCH 12/17] Move & fix newly added tests --- .../epoch_processing/__init__.py | 0 .../test_process_builder_pending_payments.py | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/epoch_processing/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{eip7732 => gloas}/epoch_processing/test_process_builder_pending_payments.py (98%) diff --git a/tests/core/pyspec/eth2spec/test/eip7732/epoch_processing/__init__.py b/tests/core/pyspec/eth2spec/test/gloas/epoch_processing/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/eip7732/epoch_processing/__init__.py rename to tests/core/pyspec/eth2spec/test/gloas/epoch_processing/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/eip7732/epoch_processing/test_process_builder_pending_payments.py b/tests/core/pyspec/eth2spec/test/gloas/epoch_processing/test_process_builder_pending_payments.py similarity index 98% rename from tests/core/pyspec/eth2spec/test/eip7732/epoch_processing/test_process_builder_pending_payments.py rename to tests/core/pyspec/eth2spec/test/gloas/epoch_processing/test_process_builder_pending_payments.py index 3f74e5434d..f7fd9bf435 100644 --- a/tests/core/pyspec/eth2spec/test/eip7732/epoch_processing/test_process_builder_pending_payments.py +++ b/tests/core/pyspec/eth2spec/test/gloas/epoch_processing/test_process_builder_pending_payments.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_eip7732_and_later, + with_gloas_and_later, ) from eth2spec.test.helpers.epoch_processing import run_epoch_processing_with from eth2spec.test.helpers.state import next_epoch @@ -22,7 +22,7 @@ def create_builder_pending_payment(spec, builder_index, amount, weight=0, fee_re ) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_empty_queue(spec, state): """Test processing with no pending payments.""" @@ -50,7 +50,7 @@ def test_process_builder_pending_payments_empty_queue(spec, state): assert payment.withdrawal.builder_index == 0 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_below_quorum(spec, state): """Test payment below quorum threshold - should not be processed.""" @@ -78,7 +78,7 @@ def test_process_builder_pending_payments_below_quorum(spec, state): assert state.builder_pending_payments[0].weight == 0 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_equal_quorum(spec, state): """Test payment equal to quorum threshold - should NOT be processed.""" @@ -107,7 +107,7 @@ def test_process_builder_pending_payments_equal_quorum(spec, state): assert state.builder_pending_payments[0].weight == 0 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_above_quorum(spec, state): """Test payment above quorum threshold - should be processed.""" @@ -143,7 +143,7 @@ def test_process_builder_pending_payments_above_quorum(spec, state): assert state.builder_pending_payments[0].weight == 0 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_multiple_above_quorum(spec, state): """Test multiple payments above quorum threshold.""" @@ -187,7 +187,7 @@ def test_process_builder_pending_payments_multiple_above_quorum(spec, state): assert state.builder_pending_payments[i].weight == 0 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_mixed_weights(spec, state): """Test mix of payments above and below quorum.""" @@ -238,7 +238,7 @@ def test_process_builder_pending_payments_mixed_weights(spec, state): assert 2 not in processed_builder_indices # Equal to threshold (not processed) -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_queue_rotation(spec, state): """Test that the payment queue is properly rotated after processing.""" @@ -276,7 +276,7 @@ def test_process_builder_pending_payments_queue_rotation(spec, state): assert payment.withdrawal.builder_index == 0 -@with_eip7732_and_later +@with_gloas_and_later @spec_state_test def test_process_builder_pending_payments_large_amount_churn_impact(spec, state): """Test that large payment amounts impact the exit churn correctly.""" From a6c32d88d6529b446349e483665c75fb2b6efb13 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Fri, 15 Aug 2025 07:06:27 -0500 Subject: [PATCH 13/17] Apply feedback from @jihoonsong --- pysetup/constants.py | 2 +- pysetup/spec_builders/__init__.py | 2 +- specs/gloas/p2p-interface.md | 16 +--- .../test_process_execution_payload.py | 41 +++++----- .../test_should_override_forkchoice_update.py | 6 +- .../test/bellatrix/sanity/test_blocks.py | 6 +- .../test/bellatrix/sync/test_optimistic.py | 4 +- .../bellatrix/unittests/test_transition.py | 4 +- .../block_processing/test_process_deposit.py | 4 +- .../test_process_withdrawals.py | 74 +++++++++---------- .../light_client/test_single_merkle_proof.py | 4 +- .../test/capella/sanity/test_blocks.py | 6 +- tests/core/pyspec/eth2spec/test/context.py | 2 +- .../pyspec/eth2spec/test/helpers/constants.py | 4 +- 14 files changed, 83 insertions(+), 92 deletions(-) diff --git a/pysetup/constants.py b/pysetup/constants.py index 693a98655b..34196021a1 100644 --- a/pysetup/constants.py +++ b/pysetup/constants.py @@ -6,9 +6,9 @@ DENEB = "deneb" ELECTRA = "electra" FULU = "fulu" +GLOAS = "gloas" EIP6800 = "eip6800" EIP7441 = "eip7441" -GLOAS = "gloas" EIP7805 = "eip7805" diff --git a/pysetup/spec_builders/__init__.py b/pysetup/spec_builders/__init__.py index cb3948c432..bfdaab177a 100644 --- a/pysetup/spec_builders/__init__.py +++ b/pysetup/spec_builders/__init__.py @@ -20,9 +20,9 @@ DenebSpecBuilder, ElectraSpecBuilder, FuluSpecBuilder, + GloasSpecBuilder, EIP6800SpecBuilder, EIP7441SpecBuilder, - GloasSpecBuilder, EIP7805SpecBuilder, ) } diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index 1ea0655467..5fb59ae0dd 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -26,7 +26,6 @@ - [Messages](#messages) - [BeaconBlocksByRange v2](#beaconblocksbyrange-v2) - [BeaconBlocksByRoot v2](#beaconblocksbyroot-v2) - - [BlobSidecarsByRoot v1](#blobsidecarsbyroot-v1) - [ExecutionPayloadEnvelopesByRange v1](#executionpayloadenvelopesbyrange-v1) - [ExecutionPayloadEnvelopesByRoot v1](#executionpayloadenvelopesbyroot-v1) @@ -301,6 +300,8 @@ The following validations are removed: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | +| `ELECTRA_FORK_VERSION` | `electra.SignedBeaconBlock` | +| `FULU_FORK_VERSION` | `electra.SignedBeaconBlock` | | `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | ##### BeaconBlocksByRoot v2 @@ -318,19 +319,10 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `BELLATRIX_FORK_VERSION` | `bellatrix.SignedBeaconBlock` | | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | +| `ELECTRA_FORK_VERSION` | `electra.SignedBeaconBlock` | +| `FULU_FORK_VERSION` | `electra.SignedBeaconBlock` | | `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | -##### BlobSidecarsByRoot v1 - -**Protocol ID:** `/eth2/beacon_chain/req/blob_sidecars_by_root/1/` - - - -| `fork_version` | Chunk SSZ type | -| -------------------- | ------------------- | -| `DENEB_FORK_VERSION` | `deneb.BlobSidecar` | -| `GLOAS_FORK_VERSION` | `gloas.BlobSidecar` | - ##### ExecutionPayloadEnvelopesByRange v1 **Protocol ID:** diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py index 4772b3346b..ebcaab961a 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py @@ -3,7 +3,7 @@ from eth2spec.test.context import ( expect_assertion_error, spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_bellatrix_and_later, with_phases, ) @@ -109,7 +109,7 @@ def run_success_test(spec, state): yield from run_execution_payload_processing(spec, state, execution_payload) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_success_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) @@ -117,7 +117,7 @@ def test_success_first_payload(spec, state): yield from run_success_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_success_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -133,14 +133,14 @@ def run_gap_slot_test(spec, state): yield from run_execution_payload_processing(spec, state, execution_payload) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_success_first_payload_with_gap_slot(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_gap_slot_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_success_regular_payload_with_gap_slot(spec, state): state = build_state_with_complete_transition(spec, state) @@ -157,14 +157,14 @@ def run_bad_execution_test(spec, state): ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_invalid_bad_execution_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_bad_execution_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_invalid_bad_execution_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -301,14 +301,14 @@ def run_non_empty_extra_data_test(spec, state): assert state.latest_execution_payload_header.extra_data == execution_payload.extra_data -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_non_empty_extra_data_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_non_empty_extra_data_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_non_empty_extra_data_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -332,14 +332,14 @@ def run_non_empty_transactions_test(spec, state): ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_non_empty_transactions_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_non_empty_extra_data_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_non_empty_transactions_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -361,14 +361,14 @@ def run_zero_length_transaction_test(spec, state): ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_zero_length_transaction_first_payload(spec, state): state = build_state_with_incomplete_transition(spec, state) yield from run_zero_length_transaction_test(spec, state) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_zero_length_transaction_regular_payload(spec, state): state = build_state_with_complete_transition(spec, state) @@ -379,17 +379,16 @@ def run_randomized_non_validated_execution_fields_test(spec, state, rng, executi next_slot(spec, state) execution_payload = build_randomized_execution_payload(spec, state, rng) - if is_post_gloas(spec): - state.latest_execution_payload_header.block_hash = execution_payload.block_hash - state.latest_execution_payload_header.gas_limit = execution_payload.gas_limit - state.latest_block_hash = execution_payload.parent_hash + state.latest_execution_payload_header.block_hash = execution_payload.block_hash + state.latest_execution_payload_header.gas_limit = execution_payload.gas_limit + state.latest_block_hash = execution_payload.parent_hash yield from run_execution_payload_processing( spec, state, execution_payload, valid=execution_valid, execution_valid=execution_valid ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_randomized_non_validated_execution_fields_first_payload__execution_valid(spec, state): rng = Random(1111) @@ -397,7 +396,7 @@ def test_randomized_non_validated_execution_fields_first_payload__execution_vali yield from run_randomized_non_validated_execution_fields_test(spec, state, rng) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_randomized_non_validated_execution_fields_regular_payload__execution_valid(spec, state): rng = Random(2222) @@ -405,7 +404,7 @@ def test_randomized_non_validated_execution_fields_regular_payload__execution_va yield from run_randomized_non_validated_execution_fields_test(spec, state, rng) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_invalid_randomized_non_validated_execution_fields_first_payload__execution_invalid( spec, state @@ -417,7 +416,7 @@ def test_invalid_randomized_non_validated_execution_fields_first_payload__execut ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_invalid_randomized_non_validated_execution_fields_regular_payload__execution_invalid( spec, state diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py b/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py index d02986b0d5..b0dc2ef8e0 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/fork_choice/test_should_override_forkchoice_update.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_presets, ) from eth2spec.test.helpers.attestations import ( @@ -30,7 +30,7 @@ ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test @with_presets([MINIMAL], reason="too slow") def test_should_override_forkchoice_update__false(spec, state): @@ -77,7 +77,7 @@ def test_should_override_forkchoice_update__false(spec, state): yield "steps", test_steps -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_should_override_forkchoice_update__true(spec, state): test_steps = [] diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py index d402dd6750..2a57262bc6 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/sanity/test_blocks.py @@ -2,7 +2,7 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_phases, ) from eth2spec.test.helpers.block import build_empty_block_for_next_slot @@ -17,7 +17,7 @@ ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_empty_block_transition_no_tx(spec, state): yield "pre", state @@ -31,7 +31,7 @@ def test_empty_block_transition_no_tx(spec, state): yield "post", state -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_block_transition_randomized_payload(spec, state): yield "pre", state diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py b/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py index 5bd8061976..05b86868fa 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/sync/test_optimistic.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, ) from eth2spec.test.helpers.attestations import ( state_transition_with_full_block, @@ -32,7 +32,7 @@ ) -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_from_syncing_to_invalid(spec, state): test_steps = [] diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py b/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py index 461149dcf7..a79c8d5192 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/unittests/test_transition.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_bellatrix_and_later, ) from eth2spec.test.helpers.constants import ( @@ -37,7 +37,7 @@ def test_success_merge_complete(spec, state): ] -@with_all_phases_from_except(BELLATRIX, [GLOAS]) +@with_all_phases_from_to(BELLATRIX, GLOAS) @spec_state_test def test_is_merge_block_and_is_execution_enabled(spec, state): for result in expected_results: diff --git a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py index 4665b6e83e..38cc6a8803 100644 --- a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py +++ b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_deposit.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, ) from eth2spec.test.helpers.constants import ( CAPELLA, @@ -15,7 +15,7 @@ from eth2spec.test.helpers.withdrawals import set_validator_fully_withdrawable -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_success_top_up_to_withdrawn_validator(spec, state): validator_index = 0 diff --git a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py index 217148ea45..3a765c8b0a 100644 --- a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py +++ b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py @@ -2,7 +2,7 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_capella_and_later, with_presets, ) @@ -33,7 +33,7 @@ ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_success_zero_expected_withdrawals(spec, state): assert len(get_expected_withdrawals(spec, state)) == 0 @@ -44,7 +44,7 @@ def test_success_zero_expected_withdrawals(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_success_one_full_withdrawal(spec, state): fully_withdrawable_indices, partial_withdrawals_indices = prepare_expected_withdrawals( @@ -65,7 +65,7 @@ def test_success_one_full_withdrawal(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_success_one_partial_withdrawal(spec, state): fully_withdrawable_indices, partial_withdrawals_indices = prepare_expected_withdrawals( @@ -88,7 +88,7 @@ def test_success_one_partial_withdrawal(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_success_mixed_fully_and_partial_withdrawable(spec, state): num_full_withdrawals = spec.MAX_WITHDRAWALS_PER_PAYLOAD // 2 @@ -113,7 +113,7 @@ def test_success_mixed_fully_and_partial_withdrawable(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @with_presets([MAINNET], reason="too few validators with minimal config") @spec_state_test def test_success_all_fully_withdrawable_in_one_sweep(spec, state): @@ -136,7 +136,7 @@ def test_success_all_fully_withdrawable_in_one_sweep(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @with_presets([MINIMAL], reason="too many validators with mainnet config") @spec_state_test def test_success_all_fully_withdrawable(spec, state): @@ -159,7 +159,7 @@ def test_success_all_fully_withdrawable(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @with_presets([MAINNET], reason="too few validators with minimal config") @spec_state_test def test_success_all_partially_withdrawable_in_one_sweep(spec, state): @@ -182,7 +182,7 @@ def test_success_all_partially_withdrawable_in_one_sweep(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @with_presets([MINIMAL], reason="too many validators with mainnet config") @spec_state_test def test_success_all_partially_withdrawable(spec, state): @@ -210,7 +210,7 @@ def test_success_all_partially_withdrawable(spec, state): # -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_non_withdrawable_non_empty_withdrawals(spec, state): next_slot(spec, state) @@ -227,7 +227,7 @@ def test_invalid_non_withdrawable_non_empty_withdrawals(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_one_expected_full_withdrawal_and_none_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -240,7 +240,7 @@ def test_invalid_one_expected_full_withdrawal_and_none_in_withdrawals(spec, stat yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_one_expected_partial_withdrawal_and_none_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_partial_withdrawals=1) @@ -253,7 +253,7 @@ def test_invalid_one_expected_partial_withdrawal_and_none_in_withdrawals(spec, s yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_one_expected_full_withdrawal_and_duplicate_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=2) @@ -266,7 +266,7 @@ def test_invalid_one_expected_full_withdrawal_and_duplicate_in_withdrawals(spec, yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_two_expected_partial_withdrawal_and_duplicate_in_withdrawals(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_partial_withdrawals=2) @@ -279,7 +279,7 @@ def test_invalid_two_expected_partial_withdrawal_and_duplicate_in_withdrawals(sp yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_max_per_slot_full_withdrawals_and_one_less_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -294,7 +294,7 @@ def test_invalid_max_per_slot_full_withdrawals_and_one_less_in_withdrawals(spec, yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_max_per_slot_partial_withdrawals_and_one_less_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -309,7 +309,7 @@ def test_invalid_max_per_slot_partial_withdrawals_and_one_less_in_withdrawals(sp yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_a_lot_fully_withdrawable_too_few_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -327,7 +327,7 @@ def test_invalid_a_lot_fully_withdrawable_too_few_in_withdrawals(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_a_lot_partially_withdrawable_too_few_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -345,7 +345,7 @@ def test_invalid_a_lot_partially_withdrawable_too_few_in_withdrawals(spec, state yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_a_lot_mixed_withdrawable_in_queue_too_few_in_withdrawals(spec, state): prepare_expected_withdrawals( @@ -369,7 +369,7 @@ def test_invalid_a_lot_mixed_withdrawable_in_queue_too_few_in_withdrawals(spec, # -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_incorrect_withdrawal_index(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -382,7 +382,7 @@ def test_invalid_incorrect_withdrawal_index(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_incorrect_address_full(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -395,7 +395,7 @@ def test_invalid_incorrect_address_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_incorrect_address_partial(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_partial_withdrawals=1) @@ -408,7 +408,7 @@ def test_invalid_incorrect_address_partial(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_incorrect_amount_full(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -421,7 +421,7 @@ def test_invalid_incorrect_amount_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_incorrect_amount_partial(spec, state): prepare_expected_withdrawals(spec, state, rng=random.Random(42), num_full_withdrawals=1) @@ -434,7 +434,7 @@ def test_invalid_incorrect_amount_partial(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_one_of_many_incorrectly_full(spec, state): prepare_expected_withdrawals( @@ -458,7 +458,7 @@ def test_invalid_one_of_many_incorrectly_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_one_of_many_incorrectly_partial(spec, state): prepare_expected_withdrawals( @@ -482,7 +482,7 @@ def test_invalid_one_of_many_incorrectly_partial(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_many_incorrectly_full(spec, state): prepare_expected_withdrawals( @@ -506,7 +506,7 @@ def test_invalid_many_incorrectly_full(spec, state): yield from run_withdrawals_processing(spec, state, execution_payload, valid=False) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_many_incorrectly_partial(spec, state): prepare_expected_withdrawals( @@ -535,7 +535,7 @@ def test_invalid_many_incorrectly_partial(spec, state): # -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_withdrawable_epoch_but_0_balance(spec, state): current_epoch = spec.get_current_epoch(state) @@ -551,7 +551,7 @@ def test_withdrawable_epoch_but_0_balance(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_withdrawable_epoch_but_0_effective_balance_0_balance(spec, state): current_epoch = spec.get_current_epoch(state) @@ -567,7 +567,7 @@ def test_withdrawable_epoch_but_0_effective_balance_0_balance(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_withdrawable_epoch_but_0_effective_balance_nonzero_balance(spec, state): current_epoch = spec.get_current_epoch(state) @@ -583,7 +583,7 @@ def test_withdrawable_epoch_but_0_effective_balance_nonzero_balance(spec, state) ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_no_withdrawals_but_some_next_epoch(spec, state): current_epoch = spec.get_current_epoch(state) @@ -599,7 +599,7 @@ def test_no_withdrawals_but_some_next_epoch(spec, state): ) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_all_withdrawal(spec, state): # Make all validators withdrawable @@ -637,25 +637,25 @@ def run_random_full_withdrawals_test(spec, state, rng): yield from run_withdrawals_processing(spec, state, execution_payload) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_random_full_withdrawals_0(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(444)) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_random_full_withdrawals_1(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(420)) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_random_full_withdrawals_2(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(200)) -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_random_full_withdrawals_3(spec, state): yield from run_random_full_withdrawals_test(spec, state, random.Random(2000000)) diff --git a/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py b/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py index 3af2a9e7d7..2a1bcbdd6a 100644 --- a/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py +++ b/tests/core/pyspec/eth2spec/test/capella/light_client/test_single_merkle_proof.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_test_suite_name, ) from eth2spec.test.helpers.attestations import ( @@ -13,7 +13,7 @@ @with_test_suite_name("BeaconBlockBody") -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_execution_merkle_proof(spec, state): block = state_transition_with_full_block(spec, state, True, False) diff --git a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py index f7332c8da5..58a4934d07 100644 --- a/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/capella/sanity/test_blocks.py @@ -2,7 +2,7 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_capella_and_later, with_presets, ) @@ -44,7 +44,7 @@ # -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_invalid_is_execution_enabled_false(spec, state): # Set `latest_execution_payload_header` to empty @@ -210,7 +210,7 @@ def test_invalid_two_bls_changes_of_different_addresses_same_validator_same_bloc # -@with_all_phases_from_except(CAPELLA, [GLOAS]) +@with_all_phases_from_to(CAPELLA, GLOAS) @spec_state_test def test_full_withdrawal_in_epoch_transition(spec, state): index = 0 diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index d4207a85b3..4c5dd6372d 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -651,8 +651,8 @@ def wrapper(*args, spec: Spec, **kw): with_deneb_and_later = with_all_phases_from(DENEB) with_electra_and_later = with_all_phases_from(ELECTRA) with_fulu_and_later = with_all_phases_from(FULU, all_phases=ALLOWED_TEST_RUNNER_FORKS) -with_eip7441_and_later = with_all_phases_from(EIP7441, all_phases=ALLOWED_TEST_RUNNER_FORKS) with_gloas_and_later = with_all_phases_from(GLOAS, all_phases=ALLOWED_TEST_RUNNER_FORKS) +with_eip7441_and_later = with_all_phases_from(EIP7441, all_phases=ALLOWED_TEST_RUNNER_FORKS) with_eip7805_and_later = with_all_phases_from(EIP7805, all_phases=ALLOWED_TEST_RUNNER_FORKS) diff --git a/tests/core/pyspec/eth2spec/test/helpers/constants.py b/tests/core/pyspec/eth2spec/test/helpers/constants.py index 63e4cd2389..e669c85df3 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/constants.py +++ b/tests/core/pyspec/eth2spec/test/helpers/constants.py @@ -11,11 +11,11 @@ CAPELLA = SpecForkName("capella") DENEB = SpecForkName("deneb") ELECTRA = SpecForkName("electra") +FULU = SpecForkName("fulu") +GLOAS = SpecForkName("gloas") # Experimental phases (not included in default "ALL_PHASES"): -FULU = SpecForkName("fulu") EIP7441 = SpecForkName("eip7441") -GLOAS = SpecForkName("gloas") EIP7805 = SpecForkName("eip7805") # From 9b5bd830f2adff62a9ec2a14e2f3cb66d24d0984 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Fri, 15 Aug 2025 07:18:42 -0500 Subject: [PATCH 14/17] Add back is_post_gloas --- .../block_processing/test_process_execution_payload.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py index ebcaab961a..8022928296 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py @@ -379,9 +379,10 @@ def run_randomized_non_validated_execution_fields_test(spec, state, rng, executi next_slot(spec, state) execution_payload = build_randomized_execution_payload(spec, state, rng) - state.latest_execution_payload_header.block_hash = execution_payload.block_hash - state.latest_execution_payload_header.gas_limit = execution_payload.gas_limit - state.latest_block_hash = execution_payload.parent_hash + if is_post_gloas(spec): + state.latest_execution_payload_header.block_hash = execution_payload.block_hash + state.latest_execution_payload_header.gas_limit = execution_payload.gas_limit + state.latest_block_hash = execution_payload.parent_hash yield from run_execution_payload_processing( spec, state, execution_payload, valid=execution_valid, execution_valid=execution_valid From a7929dfa8c980556eff3a9b16dcaedbcb875fc70 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Fri, 15 Aug 2025 08:50:47 -0500 Subject: [PATCH 15/17] Replace all instances of with_all_phases_from_except --- .../eth2spec/test/deneb/sanity/test_blocks.py | 20 +++++------ .../fork_choice/test_deposit_with_reorg.py | 4 +-- .../test/electra/sanity/blocks/test_blocks.py | 34 +++++++++--------- .../test/fulu/fork_choice/test_on_block.py | 36 +++++++++---------- .../test/phase0/fork_choice/test_ex_ante.py | 6 ++-- .../test/phase0/fork_choice/test_get_head.py | 4 +-- .../fork_choice/test_get_proposer_head.py | 6 ++-- 7 files changed, 55 insertions(+), 55 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py index a8b6e0624d..f74c6773f0 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py @@ -2,7 +2,7 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, ) from eth2spec.test.helpers.blob import ( get_max_blob_count, @@ -67,25 +67,25 @@ def run_block_with_blobs( yield "post", state if valid else None -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_zero_blob(spec, state): yield from run_block_with_blobs(spec, state, blob_count=0) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_one_blob(spec, state): yield from run_block_with_blobs(spec, state, blob_count=1) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_one_blob_two_txs(spec, state): yield from run_block_with_blobs(spec, state, blob_count=1, tx_count=2) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_one_blob_max_txs(spec, state): yield from run_block_with_blobs( @@ -93,7 +93,7 @@ def test_one_blob_max_txs(spec, state): ) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_invalid_one_blob_max_plus_one_txs(spec, state): yield from run_block_with_blobs( @@ -101,13 +101,13 @@ def test_invalid_one_blob_max_plus_one_txs(spec, state): ) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_max_blobs_per_block(spec, state): yield from run_block_with_blobs(spec, state, blob_count=get_max_blob_count(spec, state)) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_invalid_max_blobs_per_block_two_txs(spec, state): yield from run_block_with_blobs( @@ -115,7 +115,7 @@ def test_invalid_max_blobs_per_block_two_txs(spec, state): ) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_invalid_exceed_max_blobs_per_block(spec, state): yield from run_block_with_blobs( @@ -123,7 +123,7 @@ def test_invalid_exceed_max_blobs_per_block(spec, state): ) -@with_all_phases_from_except(DENEB, [GLOAS]) +@with_all_phases_from_to(DENEB, GLOAS) @spec_state_test def test_mix_blob_tx_and_non_blob_tx(spec, state): yield from run_block_with_blobs(spec, state, blob_count=1, tx_count=1, non_blob_tx_count=1) diff --git a/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py b/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py index 8c0fe49528..fc7aeb3640 100644 --- a/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py +++ b/tests/core/pyspec/eth2spec/test/electra/fork_choice/test_deposit_with_reorg.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_presets, ) from eth2spec.test.helpers.block import ( @@ -29,7 +29,7 @@ # TODO(jtraglia): In gloas, how do we set execution requests in the payload envelope? -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test @with_presets([MINIMAL], reason="too slow") def test_new_validator_deposit_with_multiple_epoch_transitions(spec, state): diff --git a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py index 13b09f0105..a537eb3ac5 100644 --- a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_blocks.py @@ -4,7 +4,7 @@ single_phase, spec_state_test, spec_test, - with_all_phases_from_except, + with_all_phases_from_to, with_custom_state, with_presets, ) @@ -39,7 +39,7 @@ ) -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_basic_el_withdrawal_request(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -68,7 +68,7 @@ def test_basic_el_withdrawal_request(spec, state): assert state.validators[validator_index].exit_epoch < spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_basic_btec_and_el_withdrawal_request_in_same_block(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -113,7 +113,7 @@ def test_basic_btec_and_el_withdrawal_request_in_same_block(spec, state): assert is_execution_address and is_correct_source_address -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_basic_btec_before_el_withdrawal_request(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -162,7 +162,7 @@ def test_basic_btec_before_el_withdrawal_request(spec, state): assert state.validators[validator_index].exit_epoch < spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_cl_exit_and_el_withdrawal_request_in_same_block(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -195,7 +195,7 @@ def test_cl_exit_and_el_withdrawal_request_in_same_block(spec, state): assert state.validators[validator_index].exit_epoch < spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_multiple_el_partial_withdrawal_requests_same_validator(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -235,7 +235,7 @@ def test_multiple_el_partial_withdrawal_requests_same_validator(spec, state): assert state.validators[validator_index].exit_epoch == spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_multiple_el_partial_withdrawal_requests_different_validator(spec, state): # move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -277,7 +277,7 @@ def test_multiple_el_partial_withdrawal_requests_different_validator(spec, state assert state.validators[validator_index].exit_epoch == spec.FAR_FUTURE_EPOCH -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_withdrawal_and_withdrawal_request_same_validator(spec, state): # Give a validator an excess balance @@ -321,7 +321,7 @@ def test_withdrawal_and_withdrawal_request_same_validator(spec, state): assert len(state.pending_partial_withdrawals) == 0 -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_withdrawal_and_switch_to_compounding_request_same_validator(spec, state): # Give a validator an excess balance @@ -369,7 +369,7 @@ def test_withdrawal_and_switch_to_compounding_request_same_validator(spec, state assert len(state.pending_deposits) == 0 -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_deposit_request_with_same_pubkey_different_withdrawal_credentials(spec, state): # signify the eth1 bridge deprecation @@ -427,7 +427,7 @@ def test_deposit_request_with_same_pubkey_different_withdrawal_credentials(spec, ) -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_deposit_request_max_per_payload(spec, state): # signify the eth1 bridge deprecation @@ -470,7 +470,7 @@ def test_deposit_request_max_per_payload(spec, state): ) -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, @@ -571,7 +571,7 @@ def test_withdrawal_and_consolidation_effective_balance_updates(spec, state): assert state.balances[b_index] < state.validators[b_index].effective_balance -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, @@ -632,7 +632,7 @@ def test_consolidation_requests_when_pending_consolidation_queue_is_full(spec, s assert len(state.pending_consolidations) == spec.PENDING_CONSOLIDATIONS_LIMIT -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, @@ -712,7 +712,7 @@ def test_switch_to_compounding_requests_when_pending_consolidation_queue_is_full assert spec.has_compounding_withdrawal_credential(state.validators[source_index]) -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @spec_state_test def test_switch_to_compounding_requests_when_too_little_consolidation_churn_limit(spec, state): # Move state forward SHARD_COMMITTEE_PERIOD epochs to allow for exit @@ -777,7 +777,7 @@ def test_switch_to_compounding_requests_when_too_little_consolidation_churn_limi assert spec.has_compounding_withdrawal_credential(state.validators[source_index]) -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @with_presets([MINIMAL], "Keep the size of the test reasonable") @spec_state_test def test_withdrawal_requests_when_pending_withdrawal_queue_is_full(spec, state): @@ -836,7 +836,7 @@ def test_withdrawal_requests_when_pending_withdrawal_queue_is_full(spec, state): assert withdrawal_request_1.amount != withdrawal_request_2.amount -@with_all_phases_from_except(ELECTRA, [GLOAS]) +@with_all_phases_from_to(ELECTRA, GLOAS) @with_presets([MINIMAL], "need sufficient consolidation churn limit") @with_custom_state( balances_fn=scaled_churn_balances_exceed_activation_exit_churn_limit, diff --git a/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py b/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py index bb1b507c0b..a1513ef9da 100644 --- a/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py +++ b/tests/core/pyspec/eth2spec/test/fulu/fork_choice/test_on_block.py @@ -4,7 +4,7 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, ) from eth2spec.test.helpers.blob import get_block_with_blob_and_sidecars from eth2spec.test.helpers.constants import ( @@ -44,7 +44,7 @@ def get_alt_sidecars(spec, state): return alt_sidecars -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__ok(spec, state): """ @@ -116,7 +116,7 @@ def run_on_block_peerdas_invalid_test(spec, state, fn): yield "steps", test_steps -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__not_available(spec, state): """ @@ -130,7 +130,7 @@ def test_on_block_peerdas__not_available(spec, state): ) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_zero_blobs(spec, state): """ @@ -146,7 +146,7 @@ def invalid_zero_blobs(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_zero_blobs) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_index_1(spec, state): """ @@ -160,7 +160,7 @@ def invalid_index(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_index) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_index_2(spec, state): """ @@ -174,7 +174,7 @@ def invalid_index(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_index) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_column_1(spec, state): """ @@ -188,7 +188,7 @@ def invalid_mismatch_len_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_column) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_column_2(spec, state): """ @@ -202,7 +202,7 @@ def invalid_mismatch_len_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_column) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_commitments_1(spec, state): """ @@ -216,7 +216,7 @@ def invalid_mismatch_len_kzg_commitments(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_commitments) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_commitments_2(spec, state): """ @@ -230,7 +230,7 @@ def invalid_mismatch_len_kzg_commitments(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_commitments) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_proofs_1(spec, state): """ @@ -244,7 +244,7 @@ def invalid_mismatch_len_kzg_proofs(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_proofs) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_mismatch_len_kzg_proofs_2(spec, state): """ @@ -258,7 +258,7 @@ def invalid_mismatch_len_kzg_proofs(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_mismatch_len_kzg_proofs) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_wrong_column_1(spec, state): """ @@ -272,7 +272,7 @@ def invalid_wrong_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_column) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_wrong_column_2(spec, state): """ @@ -286,7 +286,7 @@ def invalid_wrong_column(sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_column) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_wrong_commitment_1(spec, state): """ @@ -301,7 +301,7 @@ def invalid_wrong_commitment(sidecars, alt_sidecars=alt_sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_commitment) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_wrong_commitment_2(spec, state): """ @@ -316,7 +316,7 @@ def invalid_wrong_commitment(sidecars, alt_sidecars=alt_sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_commitment) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_wrong_proof_1(spec, state): """ @@ -331,7 +331,7 @@ def invalid_wrong_proof(sidecars, alt_sidecars=alt_sidecars): yield from run_on_block_peerdas_invalid_test(spec, state, invalid_wrong_proof) -@with_all_phases_from_except(FULU, [GLOAS]) +@with_all_phases_from_to(FULU, GLOAS) @spec_state_test def test_on_block_peerdas__invalid_wrong_proof_2(spec, state): """ diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py index 1da198097f..e939653e6e 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py @@ -1,6 +1,6 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_altair_and_later, with_presets, ) @@ -141,7 +141,7 @@ def _get_greater_than_proposer_boost_score(spec, store, state, proposer_boost_ro # TODO(jtraglia): Investigate why this doesn't work with Gloas -@with_all_phases_from_except(ALTAIR, [GLOAS]) +@with_all_phases_from_to(ALTAIR, GLOAS) @with_presets([MAINNET], reason="to create non-duplicate committee") @spec_state_test def test_ex_ante_attestations_is_greater_than_proposer_boost_with_boost(spec, state): @@ -377,7 +377,7 @@ def _filter_participant_set(participants): # TODO(jtraglia): Investigate why this doesn't work with Gloas -@with_all_phases_from_except(ALTAIR, [GLOAS]) +@with_all_phases_from_to(ALTAIR, GLOAS) @with_presets([MAINNET], reason="to create non-duplicate committee") @spec_state_test def test_ex_ante_sandwich_with_boost_not_sufficient(spec, state): diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py index b9459593d0..56d8c8cb30 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_head.py @@ -2,7 +2,7 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, with_altair_and_later, with_presets, ) @@ -273,7 +273,7 @@ def test_filtered_block_tree(spec, state): # This test is skipped in Gloas because the block's slot decides first on weight ties -@with_all_phases_from_except(ALTAIR, [GLOAS]) +@with_all_phases_from_to(ALTAIR, GLOAS) @spec_state_test def test_proposer_boost_correct_head(spec, state): test_steps = [] diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py index cd6a85e8de..e860411231 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_get_proposer_head.py @@ -2,7 +2,7 @@ from eth2spec.test.context import ( spec_state_test, - with_all_phases_from_except, + with_all_phases_from_to, ) from eth2spec.test.helpers.attestations import ( get_valid_attestations_at_slot, @@ -30,7 +30,7 @@ ) -@with_all_phases_from_except(ALTAIR, [GLOAS]) +@with_all_phases_from_to(ALTAIR, GLOAS) @spec_state_test def test_basic_is_head_root(spec, state): test_steps = [] @@ -72,7 +72,7 @@ def test_basic_is_head_root(spec, state): yield "steps", test_steps -@with_all_phases_from_except(ALTAIR, [GLOAS]) +@with_all_phases_from_to(ALTAIR, GLOAS) @spec_state_test def test_basic_is_parent_root(spec, state): test_steps = [] From 6dbe56c49cfd1dce2c94b11bdd563ae8b9085cad Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Fri, 15 Aug 2025 09:26:22 -0500 Subject: [PATCH 16/17] Use fulu.SignedBeaconBlock --- specs/gloas/p2p-interface.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index 5fb59ae0dd..126b6b7345 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -301,7 +301,7 @@ The following validations are removed: | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | | `ELECTRA_FORK_VERSION` | `electra.SignedBeaconBlock` | -| `FULU_FORK_VERSION` | `electra.SignedBeaconBlock` | +| `FULU_FORK_VERSION` | `fulu.SignedBeaconBlock` | | `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | ##### BeaconBlocksByRoot v2 @@ -320,7 +320,7 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | `CAPELLA_FORK_VERSION` | `capella.SignedBeaconBlock` | | `DENEB_FORK_VERSION` | `deneb.SignedBeaconBlock` | | `ELECTRA_FORK_VERSION` | `electra.SignedBeaconBlock` | -| `FULU_FORK_VERSION` | `electra.SignedBeaconBlock` | +| `FULU_FORK_VERSION` | `fulu.SignedBeaconBlock` | | `GLOAS_FORK_VERSION` | `gloas.SignedBeaconBlock` | ##### ExecutionPayloadEnvelopesByRange v1 From d6ef36c642a29d933354bfc0d0e4137e8c4ee712 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Mon, 18 Aug 2025 13:44:27 -0500 Subject: [PATCH 17/17] Remove PROPOSER_SCORE_BOOST_GLOAS from configs --- configs/mainnet.yaml | 2 -- configs/minimal.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index dbb020c138..472a71f2f5 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -223,8 +223,6 @@ MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096 # Gloas # 2**7 (= 128) payloads MAX_REQUEST_PAYLOADS: 128 -# 20% -PROPOSER_SCORE_BOOST_GLOAS: 20 # EIP7441 # 2**8 (= 256) epochs diff --git a/configs/minimal.yaml b/configs/minimal.yaml index 51087116bd..48fc0f86a3 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -220,8 +220,6 @@ MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096 # Gloas # 2**7 (= 128) payloads MAX_REQUEST_PAYLOADS: 128 -# 20% -PROPOSER_SCORE_BOOST_GLOAS: 20 # EIP7441 # [customized] 2**2 (= 4) epochs