For the most part, rename whisk to eip7441

This commit is contained in:
Justin Traglia
2025-02-14 15:02:48 -06:00
parent a9e40ace97
commit a3205e694b
32 changed files with 105 additions and 108 deletions

View File

@@ -168,7 +168,7 @@ jobs:
command: make test fork=fulu
- store_test_results:
path: tests/core/pyspec/test-reports
test-whisk:
test-eip7441:
docker:
- image: cimg/python:3.12-node
working_directory: ~/specs-repo
@@ -178,7 +178,7 @@ jobs:
- restore_pyspec_cached_venv
- run:
name: Run py-tests
command: make test fork=whisk
command: make test fork=eip7441
- store_test_results:
path: tests/core/pyspec/test-reports
lint:
@@ -224,7 +224,7 @@ workflows:
- test-fulu:
requires:
- install_pyspec_test
- test-whisk:
- test-eip7441:
requires:
- install_pyspec_test
- lint:

View File

@@ -61,7 +61,7 @@ jobs:
needs: [lint]
strategy:
matrix:
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "fulu", "whisk"]
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "fulu", "eip7441"]
steps:
- name: Checkout repository
uses: actions/checkout@v4

2
.gitignore vendored
View File

@@ -24,8 +24,8 @@ tests/core/pyspec/eth2spec/capella/
tests/core/pyspec/eth2spec/deneb/
tests/core/pyspec/eth2spec/electra/
tests/core/pyspec/eth2spec/fulu/
tests/core/pyspec/eth2spec/whisk/
tests/core/pyspec/eth2spec/eip6800/
tests/core/pyspec/eth2spec/eip7441/
tests/core/pyspec/eth2spec/eip7732/
# coverage reports

View File

@@ -10,8 +10,8 @@ ALL_EXECUTABLE_SPEC_NAMES = \
deneb \
electra \
fulu \
whisk \
eip6800 \
eip7441 \
eip7732
# A list of fake targets.

View File

@@ -56,9 +56,9 @@ ELECTRA_FORK_EPOCH: 18446744073709551615 # temporary stub
# Fulu
FULU_FORK_VERSION: 0x06000000
FULU_FORK_EPOCH: 18446744073709551615 # temporary stub
# WHISK
WHISK_FORK_VERSION: 0x08000000 # temporary stub
WHISK_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
@@ -175,10 +175,8 @@ BALANCE_PER_ADDITIONAL_CUSTODY_GROUP: 32000000000
MAX_BLOBS_PER_BLOCK_FULU: 12
MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096
# Whisk
# `Epoch(2**8)`
# EIP7441
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 256
# `Epoch(2)`
WHISK_PROPOSER_SELECTION_GAP: 2
# EIP7732

View File

@@ -55,9 +55,9 @@ ELECTRA_FORK_EPOCH: 18446744073709551615
# Fulu
FULU_FORK_VERSION: 0x06000001
FULU_FORK_EPOCH: 18446744073709551615
# WHISK
WHISK_FORK_VERSION: 0x08000001
WHISK_FORK_EPOCH: 18446744073709551615
# EIP7441
EIP7441_FORK_VERSION: 0x08000001
EIP7441_FORK_EPOCH: 18446744073709551615
# EIP7732
EIP7732_FORK_VERSION: 0x09000001
EIP7732_FORK_EPOCH: 18446744073709551615
@@ -176,7 +176,7 @@ BALANCE_PER_ADDITIONAL_CUSTODY_GROUP: 32000000000
MAX_BLOBS_PER_BLOCK_FULU: 12
MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096
# Whisk
# EIP7441
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 4
WHISK_PROPOSER_SELECTION_GAP: 1

View File

@@ -1,4 +1,4 @@
# Mainnet preset - Whisk
# Mainnet preset - EIP7441
# Misc
# ---------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
# Minimal preset - Whisk
# Minimal preset - EIP7441
# Misc
# ---------------------------------------------------------------

View File

@@ -7,7 +7,7 @@ DENEB = 'deneb'
ELECTRA = 'electra'
FULU = 'fulu'
EIP6800 = 'eip6800'
WHISK = 'whisk'
EIP7441 = 'eip7441'
EIP7732 = 'eip7732'

View File

@@ -8,8 +8,8 @@ from .constants import (
DENEB,
ELECTRA,
FULU,
WHISK,
EIP6800,
EIP7441,
EIP7732,
)
@@ -22,8 +22,8 @@ PREVIOUS_FORK_OF = {
DENEB: CAPELLA,
ELECTRA: DENEB,
FULU: ELECTRA,
WHISK: CAPELLA,
EIP6800: DENEB,
EIP7441: CAPELLA,
EIP7732: ELECTRA,
}

View File

@@ -5,8 +5,8 @@ from .capella import CapellaSpecBuilder
from .deneb import DenebSpecBuilder
from .electra import ElectraSpecBuilder
from .fulu import FuluSpecBuilder
from .whisk import WhiskSpecBuilder
from .eip6800 import EIP6800SpecBuilder
from .eip7441 import EIP7441SpecBuilder
from .eip7732 import EIP7732SpecBuilder
@@ -14,6 +14,6 @@ spec_builders = {
builder.fork: builder
for builder in (
Phase0SpecBuilder, AltairSpecBuilder, BellatrixSpecBuilder, CapellaSpecBuilder, DenebSpecBuilder,
ElectraSpecBuilder, FuluSpecBuilder, WhiskSpecBuilder, EIP6800SpecBuilder, EIP7732SpecBuilder,
ElectraSpecBuilder, FuluSpecBuilder, EIP6800SpecBuilder, EIP7441SpecBuilder, EIP7732SpecBuilder,
)
}

View File

@@ -1,10 +1,10 @@
from typing import Dict
from .base import BaseSpecBuilder
from ..constants import WHISK
from ..constants import EIP7441
class WhiskSpecBuilder(BaseSpecBuilder):
fork: str = WHISK
class EIP7441SpecBuilder(BaseSpecBuilder):
fork: str = EIP7441
@classmethod
def imports(cls, preset_name: str):

View File

@@ -10,7 +10,7 @@
# Set variables
ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "electra" "fulu" "whisk")
ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "electra" "fulu" "eip7441")
TEST_PRESET_TYPE=minimal
FORK_TO_TEST=phase0
WORKDIR="//consensus-specs//tests//core//pyspec"

View File

@@ -1,4 +1,4 @@
# Whisk -- The Beacon Chain
# EIP-7441 -- The Beacon Chain
**Notice**: This document is a work-in-progress for researchers and implementers.
@@ -31,7 +31,7 @@
## Introduction
This document details the beacon chain additions and changes of to support the Whisk SSLE.
This document details the beacon chain additions and changes of to support the EIP-7441 (Whisk SSLE).
*Note:* This specification is built upon [capella](../../capella/beacon-chain.md) and is under active development.
@@ -184,10 +184,10 @@ class BeaconState(Container):
# Deep history valid from Capella onwards
historical_summaries: List[HistoricalSummary, HISTORICAL_ROOTS_LIMIT]
# Whisk
whisk_candidate_trackers: Vector[WhiskTracker, WHISK_CANDIDATE_TRACKERS_COUNT] # [New in Whisk]
whisk_proposer_trackers: Vector[WhiskTracker, WHISK_PROPOSER_TRACKERS_COUNT] # [New in Whisk]
whisk_trackers: List[WhiskTracker, VALIDATOR_REGISTRY_LIMIT] # [New in Whisk]
whisk_k_commitments: List[BLSG1Point, VALIDATOR_REGISTRY_LIMIT] # [New in Whisk]
whisk_candidate_trackers: Vector[WhiskTracker, WHISK_CANDIDATE_TRACKERS_COUNT] # [New in EIP7441]
whisk_proposer_trackers: Vector[WhiskTracker, WHISK_PROPOSER_TRACKERS_COUNT] # [New in EIP7441]
whisk_trackers: List[WhiskTracker, VALIDATOR_REGISTRY_LIMIT] # [New in EIP7441]
whisk_k_commitments: List[BLSG1Point, VALIDATOR_REGISTRY_LIMIT] # [New in EIP7441]
```
```python
@@ -235,7 +235,7 @@ def process_epoch(state: BeaconState) -> None:
process_historical_summaries_update(state)
process_participation_flag_updates(state)
process_sync_committee_updates(state)
process_whisk_updates(state) # [New in Whisk]
process_whisk_updates(state) # [New in EIP7441]
```
## Block processing
@@ -275,7 +275,7 @@ def process_block_header(state: BeaconState, block: BeaconBlock) -> None:
# Verify proposer is not slashed
proposer = state.validators[block.proposer_index]
assert not proposer.slashed
process_whisk_opening_proof(state, block) # [New in Whisk]
process_whisk_opening_proof(state, block) # [New in EIP7441]
```
### Whisk
@@ -298,12 +298,12 @@ class BeaconBlockBody(Container):
execution_payload: ExecutionPayload
bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES]
# Whisk
whisk_opening_proof: WhiskTrackerProof # [New in Whisk]
whisk_post_shuffle_trackers: Vector[WhiskTracker, WHISK_VALIDATORS_PER_SHUFFLE] # [New in Whisk]
whisk_shuffle_proof: WhiskShuffleProof # [New in Whisk]
whisk_registration_proof: WhiskTrackerProof # [New in Whisk]
whisk_tracker: WhiskTracker # [New in Whisk]
whisk_k_commitment: BLSG1Point # k * BLS_G1_GENERATOR [New in Whisk]
whisk_opening_proof: WhiskTrackerProof # [New in EIP7441]
whisk_post_shuffle_trackers: Vector[WhiskTracker, WHISK_VALIDATORS_PER_SHUFFLE] # [New in EIP7441]
whisk_shuffle_proof: WhiskShuffleProof # [New in EIP7441]
whisk_registration_proof: WhiskTrackerProof # [New in EIP7441]
whisk_tracker: WhiskTracker # [New in EIP7441]
whisk_k_commitment: BLSG1Point # k * BLS_G1_GENERATOR [New in EIP7441]
```
```python
@@ -375,8 +375,8 @@ def process_block(state: BeaconState, block: BeaconBlock) -> None:
process_eth1_data(state, block.body)
process_operations(state, block.body)
process_sync_aggregate(state, block.body.sync_aggregate)
process_shuffled_trackers(state, block.body) # [New in Whisk]
process_whisk_registration(state, block.body) # [New in Whisk]
process_shuffled_trackers(state, block.body) # [New in EIP7441]
process_whisk_registration(state, block.body) # [New in EIP7441]
```
### Deposits
@@ -419,7 +419,7 @@ def add_validator_to_registry(state: BeaconState,
set_or_append_list(state.previous_epoch_participation, index, ParticipationFlags(0b0000_0000))
set_or_append_list(state.current_epoch_participation, index, ParticipationFlags(0b0000_0000))
set_or_append_list(state.inactivity_scores, index, uint64(0))
# [New in Whisk]
# [New in EIP7441]
k = get_unique_whisk_k(state, ValidatorIndex(len(state.validators) - 1))
state.whisk_trackers.append(get_initial_tracker(k))
state.whisk_k_commitments.append(get_k_commitment(k))

View File

@@ -1,4 +1,4 @@
# Whisk -- Fork Logic
# EIP-7441 -- Fork Logic
**Notice**: This document is a work-in-progress for researchers and implementers.
@@ -10,14 +10,14 @@
- [Introduction](#introduction)
- [Configuration](#configuration)
- [Fork to Whisk](#fork-to-whisk)
- [Fork to EIP-7441](#fork-to-eip-7441)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- /TOC -->
## Introduction
This document describes the process of Whisk upgrade.
This document describes the process of the EIP-7441 upgrade.
```
"""
@@ -38,12 +38,12 @@ This document describes the process of Whisk upgrade.
Warning: this configuration is not definitive.
| Name | Value |
| -------------------- | ----------------------- |
| `WHISK_FORK_VERSION` | `Version('0x08000000')` |
| `WHISK_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** |
| Name | Value |
| ---------------------- | ------------------------------------- |
| `EIP7441_FORK_VERSION` | `Version('0x08000000')` |
| `EIP7441_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** |
## Fork to Whisk
## Fork to EIP-7441
If `state.slot % SLOTS_PER_EPOCH == 0` and `compute_epoch_at_slot(state.slot) == WHISK_FORK_EPOCH`, an irregular state change is made to upgrade to Whisk. `WHISK_FORK_EPOCH` must be a multiple of `WHISK_RUN_DURATION_IN_EPOCHS`.
@@ -52,7 +52,7 @@ The upgrade occurs after the completion of the inner loop of `process_slots` tha
This ensures that we drop right into the beginning of the shuffling phase but without `process_whisk_epoch()` triggering for this Whisk run. Hence we handle all the setup ourselves in `upgrade_to_whisk()` below.
```python
def upgrade_to_whisk(pre: capella.BeaconState) -> BeaconState:
def upgrade_to_eip7441(pre: capella.BeaconState) -> BeaconState:
# Compute initial unsafe trackers for all validators
ks = [get_initial_whisk_k(ValidatorIndex(validator_index), 0) for validator_index in range(len(pre.validators))]
whisk_k_commitments = [get_k_commitment(k) for k in ks]
@@ -66,7 +66,7 @@ def upgrade_to_whisk(pre: capella.BeaconState) -> BeaconState:
slot=pre.slot,
fork=Fork(
previous_version=pre.fork.current_version,
current_version=WHISK_FORK_VERSION,
current_version=EIP7441_FORK_VERSION,
epoch=epoch,
),
# History
@@ -106,10 +106,10 @@ def upgrade_to_whisk(pre: capella.BeaconState) -> BeaconState:
# Deep history valid from Capella onwards
historical_summaries=pre.historical_summaries,
# Whisk
whisk_proposer_trackers=[WhiskTracker() for _ in range(WHISK_PROPOSER_TRACKERS_COUNT)], # [New in Whisk]
whisk_candidate_trackers=[WhiskTracker() for _ in range(WHISK_CANDIDATE_TRACKERS_COUNT)], # [New in Whisk]
whisk_trackers=whisk_trackers, # [New in Whisk]
whisk_k_commitments=whisk_k_commitments, # [New in Whisk]
whisk_proposer_trackers=[WhiskTracker() for _ in range(WHISK_PROPOSER_TRACKERS_COUNT)], # [New in EIP7441]
whisk_candidate_trackers=[WhiskTracker() for _ in range(WHISK_CANDIDATE_TRACKERS_COUNT)], # [New in EIP7441]
whisk_trackers=whisk_trackers, # [New in EIP7441]
whisk_k_commitments=whisk_k_commitments, # [New in EIP7441]
)
# Do a candidate selection followed by a proposer selection so that we have proposers for the upcoming day

View File

@@ -9,7 +9,7 @@ from .exceptions import SkippedTest
from .helpers.constants import (
PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA,
FULU,
WHISK,
EIP7441,
MINIMAL,
ALL_PHASES,
POST_FORK_OF,
@@ -573,8 +573,8 @@ with_bellatrix_and_later = with_all_phases_from(BELLATRIX)
with_capella_and_later = with_all_phases_from(CAPELLA)
with_deneb_and_later = with_all_phases_from(DENEB)
with_electra_and_later = with_all_phases_from(ELECTRA)
with_whisk_and_later = with_all_phases_from(WHISK, all_phases=ALLOWED_TEST_RUNNER_FORKS)
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)
class quoted_str(str):

View File

@@ -1,5 +1,5 @@
from eth2spec.test.context import spec_state_test, with_whisk_and_later, expect_assertion_error
from eth2spec.test.helpers.whisk import (
from eth2spec.test.context import spec_state_test, with_eip7441_and_later, expect_assertion_error
from eth2spec.test.helpers.eip7441 import (
compute_whisk_k_commitment,
compute_whisk_tracker,
set_opening_proof
@@ -31,7 +31,7 @@ R_OK = 2
R_WRONG = 3
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_valid_proof(spec, state):
block = empty_block(spec)
@@ -39,7 +39,7 @@ def test_valid_proof(spec, state):
run_process_whisk_opening_proof(spec, state, block)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_wrong_commitment(spec, state):
block = empty_block(spec)
@@ -48,7 +48,7 @@ def test_wrong_commitment(spec, state):
run_process_whisk_opening_proof(spec, state, block, valid=False)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_wrong_tracker_r(spec, state):
block = empty_block(spec)
@@ -58,7 +58,7 @@ def test_wrong_tracker_r(spec, state):
run_process_whisk_opening_proof(spec, state, block, valid=False)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_wrong_proof(spec, state):
block = empty_block(spec)

View File

@@ -1,5 +1,5 @@
from eth2spec.test.context import spec_state_test, with_whisk_and_later, expect_assertion_error
from eth2spec.test.helpers.whisk import (
from eth2spec.test.context import spec_state_test, with_eip7441_and_later, expect_assertion_error
from eth2spec.test.helpers.eip7441 import (
set_as_first_proposal,
compute_whisk_k_commitment,
set_registration,
@@ -39,7 +39,7 @@ OTHER_INDEX = 1
# First proposal
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_first_proposal_ok(spec, state):
body = empty_block_body(spec)
@@ -48,7 +48,7 @@ def test_first_proposal_ok(spec, state):
yield from run_process_whisk_registration(spec, state, body)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_first_proposal_indentity_tracker(spec, state):
body = empty_block_body(spec)
@@ -57,7 +57,7 @@ def test_first_proposal_indentity_tracker(spec, state):
yield from run_process_whisk_registration(spec, state, body, valid=False)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_first_proposal_non_unique_k_other(spec, state):
body = empty_block_body(spec)
@@ -67,7 +67,7 @@ def test_first_proposal_non_unique_k_other(spec, state):
yield from run_process_whisk_registration(spec, state, body, valid=False)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_first_proposal_non_unique_k_self(spec, state):
body = empty_block_body(spec)
@@ -77,7 +77,7 @@ def test_first_proposal_non_unique_k_self(spec, state):
yield from run_process_whisk_registration(spec, state, body, valid=False)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_first_proposal_invalid_proof(spec, state):
body = empty_block_body(spec)
@@ -89,7 +89,7 @@ def test_first_proposal_invalid_proof(spec, state):
# Second proposal
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_second_proposal_ok(spec, state):
body = empty_block_body(spec)
@@ -99,7 +99,7 @@ def test_second_proposal_ok(spec, state):
yield from run_process_whisk_registration(spec, state, body)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_second_proposal_not_zero(spec, state):
body = empty_block_body(spec)

View File

@@ -1,6 +1,6 @@
from eth2spec.test.context import spec_state_test, with_whisk_and_later, expect_assertion_error
from eth2spec.test.context import spec_state_test, with_eip7441_and_later, expect_assertion_error
from eth2spec.test.helpers.keys import whisk_ks_initial
from eth2spec.test.helpers.whisk import compute_whisk_tracker
from eth2spec.test.helpers.eip7441 import compute_whisk_tracker
from curdleproofs import GenerateWhiskShuffleProof
@@ -53,7 +53,7 @@ def run_process_shuffled_trackers(spec, state, body, valid=True):
yield 'post', state
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_shuffle_trackers(spec, state):
body = empty_block_body(spec)
@@ -61,7 +61,7 @@ def test_shuffle_trackers(spec, state):
yield from run_process_shuffled_trackers(spec, state, body)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_no_shuffle_minus_selection_gap(spec, state):
body = empty_block_body(spec)
@@ -69,7 +69,7 @@ def test_no_shuffle_minus_selection_gap(spec, state):
yield from run_process_shuffled_trackers(spec, state, body)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_no_shuffle_minus_one_and_selection_gap(spec, state):
body = empty_block_body(spec)
@@ -81,7 +81,7 @@ def test_no_shuffle_minus_one_and_selection_gap(spec, state):
yield from run_process_shuffled_trackers(spec, state, body)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_shuffle_during_selection_gap(spec, state):
body = empty_block_body(spec)
@@ -94,7 +94,7 @@ def test_shuffle_during_selection_gap(spec, state):
# - wrong post shuffle
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_invalid_shuffle_bad_proof(spec, state):
body = empty_block_body(spec)
@@ -103,7 +103,7 @@ def test_invalid_shuffle_bad_proof(spec, state):
yield from run_process_shuffled_trackers(spec, state, body, valid=False)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_invalid_shuffle_bad_trackers_zero(spec, state):
body = empty_block_body(spec)
@@ -116,7 +116,7 @@ def test_invalid_shuffle_bad_trackers_zero(spec, state):
# - not empty proof
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_invalid_gap_non_zero_proof(spec, state):
body = empty_block_body(spec)
@@ -125,7 +125,7 @@ def test_invalid_gap_non_zero_proof(spec, state):
yield from run_process_shuffled_trackers(spec, state, body, valid=False)
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_invalid_gap_non_zero_trackers(spec, state):
body = empty_block_body(spec)

View File

@@ -0,0 +1 @@
from .test_eip7441 import * # noqa: F401 F403

View File

@@ -1,8 +1,8 @@
from eth2spec.test.helpers.block import build_empty_block
from eth2spec.test.context import spec_state_test, with_whisk_and_later
from eth2spec.test.context import spec_state_test, with_eip7441_and_later
from eth2spec.test.helpers.keys import whisk_ks_initial
from eth2spec.test.helpers.state import state_transition_and_sign_block
from eth2spec.test.helpers.whisk import compute_whisk_tracker_and_commitment
from eth2spec.test.helpers.eip7441 import compute_whisk_tracker_and_commitment
from curdleproofs import WhiskTracker
known_whisk_trackers = {}
@@ -31,7 +31,7 @@ def fill_candidate_trackers(spec, state, tracker: WhiskTracker):
state.whisk_candidate_trackers[i] = tracker
@with_whisk_and_later
@with_eip7441_and_later
@spec_state_test
def test_whisk__process_block_single_initial(spec, state):
assert state.slot == 0

View File

@@ -1,4 +1,4 @@
from eth2spec.test.context import spec_test, with_whisk_and_later
from eth2spec.test.context import spec_test, with_eip7441_and_later
from eth2spec.test.context import single_phase
@@ -10,7 +10,7 @@ def is_power_of_two(value: int) -> bool:
return (value > 0) and (value & (value - 1) == 0)
@with_whisk_and_later
@with_eip7441_and_later
@spec_test
@single_phase
def test_curdleproof(spec):

View File

@@ -1,6 +1,6 @@
from eth2spec.test.helpers.execution_payload import build_empty_execution_payload
from eth2spec.test.helpers.execution_payload import build_empty_signed_execution_payload_header
from eth2spec.test.helpers.forks import is_post_whisk, is_post_altair, is_post_bellatrix, is_post_eip7732, \
from eth2spec.test.helpers.forks import is_post_eip7441, is_post_altair, is_post_bellatrix, is_post_eip7732, \
is_post_electra
from eth2spec.test.helpers.keys import privkeys, whisk_ks_initial, whisk_ks_final
from eth2spec.utils import bls
@@ -17,7 +17,7 @@ from py_ecc.bls.g2_primitives import (
G1_to_pubkey as py_ecc_G1_to_bytes48,
pubkey_to_G1 as py_ecc_bytes48_to_G1,
)
from eth2spec.test.helpers.whisk import (
from eth2spec.test.helpers.eip7441 import (
compute_whisk_tracker_and_commitment,
is_first_proposal,
resolve_known_tracker
@@ -132,7 +132,7 @@ def build_empty_block(spec, state, slot=None, proposer_index=None):
empty_block.body.execution_requests.withdrawals = []
empty_block.body.execution_requests.consolidations = []
if is_post_whisk(spec):
if is_post_eip7441(spec):
# Whisk opening proof
#######
@@ -190,7 +190,7 @@ def is_whisk_proposer(tracker: WhiskTracker, k: int) -> bool:
def get_beacon_proposer_to_build(spec, state, proposer_index=None):
if is_post_whisk(spec):
if is_post_eip7441(spec):
if proposer_index is None:
return find_whisk_proposer(spec, state)
else:

View File

@@ -17,9 +17,8 @@ ELECTRA = SpecForkName('electra')
SHARDING = SpecForkName('sharding')
CUSTODY_GAME = SpecForkName('custody_game')
DAS = SpecForkName('das')
ELECTRA = SpecForkName('electra')
FULU = SpecForkName('fulu')
WHISK = SpecForkName('whisk')
EIP7441 = SpecForkName('eip7441')
EIP7732 = SpecForkName('eip7732')
#
@@ -42,9 +41,9 @@ ALL_PHASES = (
# The forks that have light client specs
LIGHT_CLIENT_TESTING_FORKS = (*[item for item in MAINNET_FORKS if item != PHASE0], ELECTRA)
# The forks that output to the test vectors.
TESTGEN_FORKS = (*MAINNET_FORKS, ELECTRA, FULU, WHISK)
TESTGEN_FORKS = (*MAINNET_FORKS, ELECTRA, FULU, EIP7441)
# Forks allowed in the test runner `--fork` flag, to fail fast in case of typos
ALLOWED_TEST_RUNNER_FORKS = (*ALL_PHASES, WHISK, EIP7732)
ALLOWED_TEST_RUNNER_FORKS = (*ALL_PHASES, EIP7441, EIP7732)
# NOTE: the same definition as in `pysetup/md_doc_paths.py`
PREVIOUS_FORK_OF = {
@@ -56,8 +55,8 @@ PREVIOUS_FORK_OF = {
DENEB: CAPELLA,
ELECTRA: DENEB,
# Experimental patches
WHISK: CAPELLA,
FULU: ELECTRA,
EIP7441: CAPELLA,
EIP7732: ELECTRA,
}

View File

@@ -1,6 +1,6 @@
from .constants import (
PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB,
ELECTRA, FULU, WHISK, EIP7732,
ELECTRA, FULU, EIP7441, EIP7732,
PREVIOUS_FORK_OF,
)
@@ -45,8 +45,8 @@ def is_post_fulu(spec):
return is_post_fork(spec.fork, FULU)
def is_post_whisk(spec):
return is_post_fork(spec.fork, WHISK)
def is_post_eip7441(spec):
return is_post_fork(spec.fork, EIP7441)
def is_post_eip7732(spec):

View File

@@ -7,10 +7,10 @@ from eth2spec.test.helpers.execution_payload import (
compute_el_header_block_hash,
)
from eth2spec.test.helpers.forks import (
is_post_altair, is_post_bellatrix, is_post_capella, is_post_deneb, is_post_electra, is_post_whisk,
is_post_altair, is_post_bellatrix, is_post_capella, is_post_deneb, is_post_electra, is_post_eip7441,
)
from eth2spec.test.helpers.keys import pubkeys
from eth2spec.test.helpers.whisk import compute_whisk_initial_tracker_cached, compute_whisk_initial_k_commitment_cached
from eth2spec.test.helpers.eip7441 import compute_whisk_initial_tracker_cached, compute_whisk_initial_k_commitment_cached
def build_mock_validator(spec, i: int, balance: int):
@@ -153,7 +153,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold):
if is_post_electra(spec):
state.deposit_requests_start_index = spec.UNSET_DEPOSIT_REQUESTS_START_INDEX
if is_post_whisk(spec):
if is_post_eip7441(spec):
vc = len(state.validators)
for i in range(vc):
state.whisk_k_commitments.append(compute_whisk_initial_k_commitment_cached(i))

View File

@@ -3,7 +3,7 @@ from typing import (
)
from .constants import (
MINIMAL, MAINNET,
ALL_PHASES, WHISK,
ALL_PHASES, EIP7441,
)
from .typing import (
PresetBaseName,
@@ -13,7 +13,7 @@ from .typing import (
# NOTE: special case like `ALLOWED_TEST_RUNNER_FORKS`
ALL_EXECUTABLE_SPEC_NAMES = ALL_PHASES + (WHISK,)
ALL_EXECUTABLE_SPEC_NAMES = ALL_PHASES + (EIP7441,)
# import the spec for each fork and preset
for fork in ALL_EXECUTABLE_SPEC_NAMES:

View File

@@ -1 +0,0 @@
from .test_whisk import * # noqa: F401 F403