Skip to content

feat: initial electra support #1446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e22b626
Setting up electra in version files
rodrigo-o Mar 17, 2025
0dee18e
Avoid skipping electra test in the runners
rodrigo-o Mar 18, 2025
a8b13ec
Updated native libraries to be up-to-date with latest ssz releases
rodrigo-o Mar 18, 2025
51a5ee4
Updated config/preset to support electra additions
rodrigo-o Mar 20, 2025
aaa5500
feat: electra container and ssz support (#1400)
rodrigo-o Apr 2, 2025
f84cade
Merge branch 'main' into electra-support
rodrigo-o Apr 2, 2025
e611684
feat: electra slashing, proposer_index & compute_sync_committees chan…
LeanSerra Apr 8, 2025
f21ee36
Merge branch 'main' into electra-support
rodrigo-o Apr 8, 2025
439b652
fix: kurtosis in electra support branch (#1421)
rodrigo-o Apr 9, 2025
71dee9d
feat: electra get_attesting_indices changes + helper functions from p…
LeanSerra Apr 10, 2025
bc6579b
refactor: move committee_attesters calculation to own function (#1425)
LeanSerra Apr 10, 2025
0d40248
docs: add an electra implementation gap doc (#1423)
rodrigo-o Apr 10, 2025
68dec8f
feat: electra process_registry_updates & slash_validators changes (#1…
LeanSerra Apr 11, 2025
be02708
fix: skipped spec tests in electra (#1427)
rodrigo-o Apr 15, 2025
bcc7782
fix: new ssz fixes for the static spec-test (#1430)
rodrigo-o Apr 15, 2025
cb9ffb4
fix: outstanding ssz issues after #1430 (#1432)
rodrigo-o Apr 16, 2025
b19639b
fix: fixing the CI updating ubuntu and go (#1433)
rodrigo-o Apr 16, 2025
c4bec8f
feat: implement electra deposits (#1424)
LeanSerra Apr 21, 2025
08b8365
docs: `electra-gap.md` enhancement with roadmap and current status (#…
rodrigo-o Apr 22, 2025
e5ef002
feat: electra process_operations changes (#1426)
LeanSerra Apr 24, 2025
cef653a
Merge branch 'main' into electra-support
rodrigo-o Apr 24, 2025
b65087b
updated electra-gap.md doc
rodrigo-o Apr 24, 2025
aae93fb
feat: electra consolidations (#1428)
LeanSerra Apr 24, 2025
f04ecaa
chore: disable assertoor failing checks (#1447)
rodrigo-o Apr 24, 2025
911af45
feat: electra withdrawals (#1431)
LeanSerra Apr 25, 2025
e56e7d4
feat: electra `MAX_BLOBS_PER_BLOCK_ELECTRA` (#1438)
LeanSerra Apr 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fork_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
deneb
electra
67 changes: 34 additions & 33 deletions .github/config/assertoor/cl-stability-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,39 @@ tasks:
title: "Check if all clients are ready"
timeout: 1m

- name: run_tasks_concurrent
title: "Check if all EL & CL clients are synced and the tx spammer is working"
timeout: 5m
config:
tasks:
- name: check_consensus_sync_status
title: "Check if CL clients are synced"
- name: check_execution_sync_status
title: "Check if EL clients are synced"
# TODO(#1413) The following tasks are not working yet, this will be part of the 3rd electra phase
# - name: run_tasks_concurrent
# title: "Check if all EL & CL clients are synced and the tx spammer is working"
# timeout: 5m
# config:
# tasks:
# - name: check_consensus_sync_status
# title: "Check if CL clients are synced"
# - name: check_execution_sync_status
# title: "Check if EL clients are synced"

- name: run_task_matrix
title: "Check block proposals from all client pairs"
timeout: 6m
configVars:
matrixValues: "validatorPairNames"
config:
runConcurrent: true
matrixVar: "validatorPairName"
task:
name: check_consensus_block_proposals
title: "Wait for block proposal from ${validatorPairName}"
config:
minTransactionCount: 80 # For some reason the tx fuzz is working different than the old spammer, we need to check it
configVars:
validatorNamePattern: "validatorPairName"
# - name: run_task_matrix
# title: "Check block proposals from all client pairs"
# timeout: 6m
# configVars:
# matrixValues: "validatorPairNames"
# config:
# runConcurrent: true
# matrixVar: "validatorPairName"
# task:
# name: check_consensus_block_proposals
# title: "Wait for block proposal from ${validatorPairName}"
# config:
# minTransactionCount: 80 # For some reason the tx fuzz is working different than the old spammer, we need to check it
# configVars:
# validatorNamePattern: "validatorPairName"

- name: run_tasks_concurrent
title: "Check chain stability (reorgs and forks)"
timeout: 7m
config:
tasks:
- name: check_consensus_reorgs
title: "Check consensus reorgs"
- name: check_consensus_forks
title: "Check consensus forks"
# - name: run_tasks_concurrent
# title: "Check chain stability (reorgs and forks)"
# timeout: 7m
# config:
# tasks:
# - name: check_consensus_reorgs
# title: "Check consensus reorgs"
# - name: check_consensus_forks
# title: "Check consensus forks"
11 changes: 5 additions & 6 deletions .github/config/assertoor/network-params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ participants:
cl_type: lighthouse
cl_image: sigp/lighthouse:v7.0.0-beta.5
validator_count: 32
- el_type: geth
el_image: ethereum/client-go:v1.15.6
cl_type: lighthouse
cl_image: sigp/lighthouse:v7.0.0-beta.5
validator_count: 32
count: 2
- el_type: geth
el_image: ethereum/client-go:v1.15.6
cl_type: lambda
Expand All @@ -19,6 +15,9 @@ participants:
cl_max_mem: 4096
keymanager_enabled: true

network_params:
electra_fork_epoch: 0

additional_services:
- assertoor
- tx_fuzz
Expand All @@ -28,7 +27,7 @@ assertoor_params:
run_stability_check: false
run_block_proposal_check: false
tests:
- https://raw.githubusercontent.com/lambdaclass/lambda_ethereum_consensus/refs/heads/main/.github/config/assertoor/cl-stability-check.yml
- https://raw.githubusercontent.com/lambdaclass/lambda_ethereum_consensus/refs/heads/electra-support/.github/config/assertoor/cl-stability-check.yml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to point to main before merge


tx_fuzz_params:
tx_fuzz_extra_args: ["--txcount=3", "--accounts=80"]
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ permissions:
jobs:
compile-native:
name: Build native libraries
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Go
# NOTE: this action comes with caching by default
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.24"
cache-dependency-path: |
native/libp2p_port/go.sum
- name: Cache output artifacts
Expand All @@ -58,7 +58,7 @@ jobs:

download-beacon-node-oapi:
name: Download Beacon Node OAPI
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Cache Beacon Node OAPI
Expand All @@ -75,7 +75,7 @@ jobs:
build:
name: Build project
needs: [compile-native, download-beacon-node-oapi]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

docker-build:
name: Build Docker image
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
Expand All @@ -150,7 +150,7 @@ jobs:
smoke:
name: Start and stop the node
needs: [compile-native, download-beacon-node-oapi]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
Expand Down Expand Up @@ -195,12 +195,12 @@ jobs:
run: mix compile --warnings-as-errors
- name: Run the node
# NOTE: this starts and then stops the application. It should catch simple runtime errors
run: mix run -- --checkpoint-sync-url https://mainnet-checkpoint-sync.stakely.io/
run: mix run -- --checkpoint-sync-url https://sepolia.beaconstate.info --network sepolia

test:
name: Test
needs: [compile-native, download-beacon-node-oapi]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:

lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:

download-spectests:
name: Download spectests
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Cache compressed spectests
Expand All @@ -293,9 +293,9 @@ jobs:
strategy:
fail-fast: false
matrix:
fork: ["deneb"]
fork: ["electra"]
config: ["minimal", "general", "mainnet"]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
Expand Down Expand Up @@ -357,7 +357,7 @@ jobs:
spectests-success:
name: All spec-tests passed
needs: spectests-matrix
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: always()
steps:
- if: needs.spectests-matrix.result == 'success'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci_skipped.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,36 @@ on:
jobs:
compile-native:
name: Build native libraries
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: false
steps: [run: true]

build:
name: Build project
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: false
steps: [run: true]

smoke:
name: Start and stop the node
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: false
steps: [run: true]

test:
name: Test
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: false
steps: [run: true]

lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: false
steps: [run: true]

spectests-success:
name: All spec-tests passed
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: false
steps: [run: true]
2 changes: 1 addition & 1 deletion .spectest_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.4.0
v1.5.0-beta.3
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
erlang 26.2
elixir 1.16.2-otp-26
golang 1.22.12
golang 1.24.2
rust 1.81.0
protoc 30.2
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# libp2p port
FROM golang:1.22 AS libp2p_builder
FROM golang:1.24 AS libp2p_builder
LABEL stage=builder

# Install dependencies
Expand Down Expand Up @@ -120,4 +120,4 @@
# TODO: This could be an issue regarding OS signals, we should use JSONArgs but shell form is the
# only way to pass args to ENTRYPOINT, specially important because of the cookie. Best
# solution would be to move to releases and avoid starting the node manually through iex.
ENTRYPOINT iex $IEX_ARGS_VALUE -S mix run -- $0 $@

Check warning on line 123 in Dockerfile

View workflow job for this annotation

GitHub Actions / ethereum-testnet

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 123 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ We take security seriously. If you discover a vulnerability in this project, ple

For more details, please refer to our [Security Policy](./.github/SECURITY.md).

## Electra Support

We are working on the electra support in [this branch](https://github.com/lambdaclass/lambda_ethereum_consensus/tree/electra-support) and the current progress is updated in [this document](https://github.com/lambdaclass/lambda_ethereum_consensus/tree/electra-support/electra-gap.md)

## Prerequisites

Expand Down
1 change: 1 addition & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fork_raw = File.read!(".fork_version") |> String.trim()
fork =
case fork_raw do
"deneb" -> :deneb
"electra" -> :electra
v -> raise "Invalid fork specified: #{v}"
end

Expand Down
14 changes: 12 additions & 2 deletions config/networks/mainnet/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,14 @@ ATTESTATION_SUBNET_PREFIX_BITS: 6
# Deneb
# `2**7` (=128)
MAX_REQUEST_BLOCKS_DENEB: 128
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
MAX_REQUEST_BLOB_SIDECARS: 768
# `2**12` (= 4096 epochs, ~18 days)
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
# `6`
BLOB_SIDECAR_SUBNET_COUNT: 6
## 6 blobs
MAX_BLOBS_PER_BLOCK: 6
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK (= 128 * 6) sidecars
MAX_REQUEST_BLOB_SIDECARS: 768

# Whisk
# `Epoch(2**8)`
Expand All @@ -151,3 +153,11 @@ WHISK_PROPOSER_SELECTION_GAP: 2
# EIP7594
EIP7594_FORK_VERSION: 0x06000001
EIP7594_FORK_EPOCH: 18446744073709551615

# Electra
# 2**7 * 10**9 (= 128,000,000,000) Gwei
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000
# 2**8 * 10**9) (= 256,000,000,000) Gwei
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000
# 9
MAX_BLOBS_PER_BLOCK_ELECTRA: 9
14 changes: 12 additions & 2 deletions config/networks/minimal/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,14 @@ ATTESTATION_SUBNET_PREFIX_BITS: 6
# Deneb
# `2**7` (=128)
MAX_REQUEST_BLOCKS_DENEB: 128
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
MAX_REQUEST_BLOB_SIDECARS: 768
# `2**12` (= 4096 epochs, ~18 days)
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
# `6`
BLOB_SIDECAR_SUBNET_COUNT: 6
## 6 blobs
MAX_BLOBS_PER_BLOCK: 6
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK (= 128 * 6) sidecars
MAX_REQUEST_BLOB_SIDECARS: 768

# Whisk
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 4
Expand All @@ -149,3 +151,11 @@ WHISK_PROPOSER_SELECTION_GAP: 1
# EIP7594
EIP7594_FORK_VERSION: 0x06000001
EIP7594_FORK_EPOCH: 18446744073709551615

# Electra
# [customized] 2**7 * 10**9 (= 128,000,000,000) Gwei
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000
# [customized] 2**8 * 10**9) (= 256,000,000,000) Gwei
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 128000000000
# 9
MAX_BLOBS_PER_BLOCK_ELECTRA: 9
Loading