Skip to content

Commit

Permalink
Merge pull request #3615 from ethereum/init-electra
Browse files Browse the repository at this point in the history
Init Electra (EIP6110 + EIP7002)
  • Loading branch information
hwwhww authored Apr 9, 2024
2 parents 93dba67 + ab8815b commit aba6345
Show file tree
Hide file tree
Showing 41 changed files with 211 additions and 510 deletions.
22 changes: 3 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
command: make citest fork=deneb
- store_test_results:
path: tests/core/pyspec/test-reports
test-eip6110:
test-electra:
docker:
- image: circleci/python:3.9
working_directory: ~/specs-repo
Expand All @@ -165,20 +165,7 @@ jobs:
- restore_pyspec_cached_venv
- run:
name: Run py-tests
command: make citest fork=eip6110
- store_test_results:
path: tests/core/pyspec/test-reports
test-eip7002:
docker:
- image: circleci/python:3.9
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_pyspec_cached_venv
- run:
name: Run py-tests
command: make citest fork=eip7002
command: make citest fork=electra
- store_test_results:
path: tests/core/pyspec/test-reports
test-eip7549:
Expand Down Expand Up @@ -340,10 +327,7 @@ workflows:
- test-deneb:
requires:
- install_pyspec_test
- test-eip6110:
requires:
- install_pyspec_test
- test-eip7002:
- test-electra:
requires:
- install_pyspec_test
- test-eip7549:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
needs: [preclear,lint,codespell,table_of_contents]
strategy:
matrix:
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "eip6110", "eip7002", "eip7549", "whisk", "eip7594"]
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7549", "whisk", "eip7594"]
steps:
- name: Checkout this repo
uses: actions/checkout@v3.2.0
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ tests/core/pyspec/eth2spec/altair/
tests/core/pyspec/eth2spec/bellatrix/
tests/core/pyspec/eth2spec/capella/
tests/core/pyspec/eth2spec/deneb/
tests/core/pyspec/eth2spec/eip6110/
tests/core/pyspec/eth2spec/eip7002/
tests/core/pyspec/eth2spec/electra/
tests/core/pyspec/eth2spec/eip7549/
tests/core/pyspec/eth2spec/whisk/
tests/core/pyspec/eth2spec/eip7251/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ MARKDOWN_FILES = $(wildcard $(SPEC_DIR)/*/*.md) \
$(wildcard $(SPEC_DIR)/_features/*/*/*.md) \
$(wildcard $(SSZ_DIR)/*.md)

ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb eip6110 eip7002 eip7549 whisk
ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb electra eip7549 whisk
# The parameters for commands. Use `foreach` to avoid listing specs again.
COVERAGE_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), --cov=eth2spec.$S.$(TEST_PRESET_TYPE))
PYLINT_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), ./eth2spec/$S)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Features are researched and developed in parallel, and then consolidated into se
### In-development Specifications
| Code Name or Topic | Specs | Notes |
| - | - | - |
| Electra | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/electra/beacon-chain.md)</li><li>[EIP-6110 fork](specs/electra/fork.md)</li></ul><li>Additions</li><ul><li>[Honest validator guide changes](specs/electra/validator.md)</li></ul></ul> |
| Sharding (outdated) | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/sharding/beacon-chain.md)</li></ul><li>Additions</li><ul><li>[P2P networking](specs/_features/sharding/p2p-interface.md)</li></ul></ul> |
| Custody Game (outdated) | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/custody_game/beacon-chain.md)</li></ul><li>Additions</li><ul><li>[Honest validator guide changes](specs/_features/custody_game/validator.md)</li></ul></ul> | Dependent on sharding |
| Data Availability Sampling (outdated) | <ul><li>Core</li><ul><li>[Core types and functions](specs/_features/das/das-core.md)</li><li>[Fork choice changes](specs/_features/das/fork-choice.md)</li></ul><li>Additions</li><ul><li>[P2P Networking](specs/_features/das/p2p-interface.md)</li><li>[Sampling process](specs/_features/das/sampling.md)</li></ul></ul> | <ul><li> Dependent on sharding</li><li>[Technical explainer](https://hackmd.io/@HWeNw8hNRimMm2m2GH56Cw/B1YJPGkpD)</li></ul> |
| EIP-6110 | <ul><li>Core</li><ul><li>[Beacon Chain changes](specs/_features/eip6110//beacon-chain.md)</li><li>[EIP-6110 fork](specs/_features/eip6110/fork.md)</li></ul><li>Additions</li><ul><li>[Honest validator guide changes](specs/_features/eip6110/validator.md)</li></ul></ul> |

### Accompanying documents can be found in [specs](specs) and include:

Expand Down
6 changes: 0 additions & 6 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ DENEB_FORK_EPOCH: 269568 # March 13, 2024, 01:55:35pm UTC
# Electra
ELECTRA_FORK_VERSION: 0x05000000
ELECTRA_FORK_EPOCH: 18446744073709551615
# EIP6110
EIP6110_FORK_VERSION: 0x06000000 # temporary stub
EIP6110_FORK_EPOCH: 18446744073709551615
# EIP7002
EIP7002_FORK_VERSION: 0x07000000 # temporary stub
EIP7002_FORK_EPOCH: 18446744073709551615
# EIP7251
EIP7251_FORK_VERSION: 0x06000000 # temporary stub
EIP7251_FORK_EPOCH: 18446744073709551615
Expand Down
6 changes: 0 additions & 6 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ DENEB_FORK_EPOCH: 18446744073709551615
# Electra
ELECTRA_FORK_VERSION: 0x05000001
ELECTRA_FORK_EPOCH: 18446744073709551615
# EIP6110
EIP6110_FORK_VERSION: 0x06000001
EIP6110_FORK_EPOCH: 18446744073709551615
# EIP7002
EIP7002_FORK_VERSION: 0x07000001
EIP7002_FORK_EPOCH: 18446744073709551615
# EIP7251
EIP7251_FORK_VERSION: 0x06000001 # temporary stub
EIP7251_FORK_EPOCH: 18446744073709551615
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Mainnet preset - EIP6110
# Mainnet preset - Electra

# Execution
# ---------------------------------------------------------------
# 2**13 (= 8192) receipts
MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 8192
# 2**4 (= 16) exits
MAX_EXECUTION_LAYER_EXITS: 16
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Minimal preset - EIP6110
# Minimal preset - Electra

# Execution
# ---------------------------------------------------------------
# [customized]
MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 4
# 2**4 (= 16) exits
MAX_EXECUTION_LAYER_EXITS: 16
3 changes: 1 addition & 2 deletions pysetup/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
BELLATRIX = 'bellatrix'
CAPELLA = 'capella'
DENEB = 'deneb'
EIP6110 = 'eip6110'
EIP7002 = 'eip7002'
ELECTRA = 'electra'
EIP7251 = 'eip7251'
EIP7549 = 'eip7549'
WHISK = 'whisk'
Expand Down
6 changes: 2 additions & 4 deletions pysetup/md_doc_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
BELLATRIX,
CAPELLA,
DENEB,
EIP6110,
EIP7002,
ELECTRA,
EIP7251,
EIP7549,
WHISK,
Expand All @@ -21,10 +20,9 @@
BELLATRIX: ALTAIR,
CAPELLA: BELLATRIX,
DENEB: CAPELLA,
EIP6110: DENEB,
ELECTRA: DENEB,
EIP7549: DENEB,
WHISK: CAPELLA,
EIP7002: CAPELLA,
EIP7251: DENEB,
EIP7594: DENEB,
}
Expand Down
5 changes: 2 additions & 3 deletions pysetup/spec_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from .bellatrix import BellatrixSpecBuilder
from .capella import CapellaSpecBuilder
from .deneb import DenebSpecBuilder
from .eip6110 import EIP6110SpecBuilder
from .eip7002 import EIP7002SpecBuilder
from .electra import ElectraSpecBuilder
from .eip7549 import EIP7549SpecBuilder
from .whisk import WhiskSpecBuilder
from .eip7251 import EIP7251SpecBuilder
Expand All @@ -15,7 +14,7 @@
builder.fork: builder
for builder in (
Phase0SpecBuilder, AltairSpecBuilder, BellatrixSpecBuilder, CapellaSpecBuilder, DenebSpecBuilder,
EIP6110SpecBuilder, EIP7002SpecBuilder, EIP7549SpecBuilder, WhiskSpecBuilder, EIP7251SpecBuilder,
ElectraSpecBuilder, EIP7549SpecBuilder, WhiskSpecBuilder, EIP7251SpecBuilder,
EIP7594SpecBuilder,
)
}
12 changes: 0 additions & 12 deletions pysetup/spec_builders/eip7002.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .base import BaseSpecBuilder
from ..constants import EIP6110
from ..constants import ELECTRA


class EIP6110SpecBuilder(BaseSpecBuilder):
fork: str = EIP6110
class ElectraSpecBuilder(BaseSpecBuilder):
fork: str = ELECTRA

@classmethod
def imports(cls, preset_name: str):
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_run_docker_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# Set variables
ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "eip6110" "whisk")
ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "electra" "whisk")
TEST_PRESET_TYPE=minimal
FORK_TO_TEST=phase0
NUMBER_OF_CORES=4
Expand Down
Loading

0 comments on commit aba6345

Please sign in to comment.