Skip to content

Commit 0c7a072

Browse files
authored
Merge pull request #1450 from lambdaclass/electra-initial-support
feat: electra initial support
2 parents c3b54c4 + e0f6762 commit 0c7a072

File tree

78 files changed

+5598
-842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5598
-842
lines changed

.fork_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
deneb
1+
electra

.github/config/assertoor/cl-stability-check.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,39 @@ tasks:
1212
title: "Check if all clients are ready"
1313
timeout: 1m
1414

15-
- name: run_tasks_concurrent
16-
title: "Check if all EL & CL clients are synced and the tx spammer is working"
17-
timeout: 5m
18-
config:
19-
tasks:
20-
- name: check_consensus_sync_status
21-
title: "Check if CL clients are synced"
22-
- name: check_execution_sync_status
23-
title: "Check if EL clients are synced"
15+
# TODO(#1413) The following tasks are not working yet, this will be part of the 3rd electra phase
16+
# - name: run_tasks_concurrent
17+
# title: "Check if all EL & CL clients are synced and the tx spammer is working"
18+
# timeout: 5m
19+
# config:
20+
# tasks:
21+
# - name: check_consensus_sync_status
22+
# title: "Check if CL clients are synced"
23+
# - name: check_execution_sync_status
24+
# title: "Check if EL clients are synced"
2425

25-
- name: run_task_matrix
26-
title: "Check block proposals from all client pairs"
27-
timeout: 6m
28-
configVars:
29-
matrixValues: "validatorPairNames"
30-
config:
31-
runConcurrent: true
32-
matrixVar: "validatorPairName"
33-
task:
34-
name: check_consensus_block_proposals
35-
title: "Wait for block proposal from ${validatorPairName}"
36-
config:
37-
minTransactionCount: 80 # For some reason the tx fuzz is working different than the old spammer, we need to check it
38-
configVars:
39-
validatorNamePattern: "validatorPairName"
26+
# - name: run_task_matrix
27+
# title: "Check block proposals from all client pairs"
28+
# timeout: 6m
29+
# configVars:
30+
# matrixValues: "validatorPairNames"
31+
# config:
32+
# runConcurrent: true
33+
# matrixVar: "validatorPairName"
34+
# task:
35+
# name: check_consensus_block_proposals
36+
# title: "Wait for block proposal from ${validatorPairName}"
37+
# config:
38+
# minTransactionCount: 80 # For some reason the tx fuzz is working different than the old spammer, we need to check it
39+
# configVars:
40+
# validatorNamePattern: "validatorPairName"
4041

41-
- name: run_tasks_concurrent
42-
title: "Check chain stability (reorgs and forks)"
43-
timeout: 7m
44-
config:
45-
tasks:
46-
- name: check_consensus_reorgs
47-
title: "Check consensus reorgs"
48-
- name: check_consensus_forks
49-
title: "Check consensus forks"
42+
# - name: run_tasks_concurrent
43+
# title: "Check chain stability (reorgs and forks)"
44+
# timeout: 7m
45+
# config:
46+
# tasks:
47+
# - name: check_consensus_reorgs
48+
# title: "Check consensus reorgs"
49+
# - name: check_consensus_forks
50+
# title: "Check consensus forks"

.github/config/assertoor/network-params.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ participants:
44
cl_type: lighthouse
55
cl_image: sigp/lighthouse:v7.0.0-beta.5
66
validator_count: 32
7-
- el_type: geth
8-
el_image: ethereum/client-go:v1.15.6
9-
cl_type: lighthouse
10-
cl_image: sigp/lighthouse:v7.0.0-beta.5
11-
validator_count: 32
7+
count: 2
128
- el_type: geth
139
el_image: ethereum/client-go:v1.15.6
1410
cl_type: lambda
@@ -19,6 +15,9 @@ participants:
1915
cl_max_mem: 4096
2016
keymanager_enabled: true
2117

18+
network_params:
19+
electra_fork_epoch: 0
20+
2221
additional_services:
2322
- assertoor
2423
- tx_fuzz

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ permissions:
3030
jobs:
3131
compile-native:
3232
name: Build native libraries
33-
runs-on: ubuntu-22.04
33+
runs-on: ubuntu-24.04
3434
steps:
3535
- uses: actions/checkout@v4
3636
- name: Set up Go
3737
# NOTE: this action comes with caching by default
3838
uses: actions/setup-go@v5
3939
with:
40-
go-version: "1.21"
40+
go-version: "1.24"
4141
cache-dependency-path: |
4242
native/libp2p_port/go.sum
4343
- name: Cache output artifacts
@@ -58,7 +58,7 @@ jobs:
5858

5959
download-beacon-node-oapi:
6060
name: Download Beacon Node OAPI
61-
runs-on: ubuntu-22.04
61+
runs-on: ubuntu-24.04
6262
steps:
6363
- uses: actions/checkout@v4
6464
- name: Cache Beacon Node OAPI
@@ -75,7 +75,7 @@ jobs:
7575
build:
7676
name: Build project
7777
needs: [compile-native, download-beacon-node-oapi]
78-
runs-on: ubuntu-22.04
78+
runs-on: ubuntu-24.04
7979
steps:
8080
- uses: actions/checkout@v4
8181
- name: Set up Elixir
@@ -135,7 +135,7 @@ jobs:
135135

136136
docker-build:
137137
name: Build Docker image
138-
runs-on: ubuntu-22.04
138+
runs-on: ubuntu-24.04
139139
steps:
140140
- uses: actions/checkout@v4
141141
- name: Set up Docker Buildx
@@ -150,7 +150,7 @@ jobs:
150150
smoke:
151151
name: Start and stop the node
152152
needs: [compile-native, download-beacon-node-oapi]
153-
runs-on: ubuntu-22.04
153+
runs-on: ubuntu-24.04
154154
steps:
155155
- uses: actions/checkout@v4
156156
- name: Set up Elixir
@@ -195,12 +195,12 @@ jobs:
195195
run: mix compile --warnings-as-errors
196196
- name: Run the node
197197
# NOTE: this starts and then stops the application. It should catch simple runtime errors
198-
run: mix run -- --checkpoint-sync-url https://mainnet-checkpoint-sync.stakely.io/
198+
run: mix run -- --checkpoint-sync-url https://sepolia.beaconstate.info --network sepolia
199199

200200
test:
201201
name: Test
202202
needs: [compile-native, download-beacon-node-oapi]
203-
runs-on: ubuntu-22.04
203+
runs-on: ubuntu-24.04
204204
steps:
205205
- uses: actions/checkout@v4
206206
- name: Set up Elixir
@@ -245,7 +245,7 @@ jobs:
245245

246246
lint:
247247
name: Lint
248-
runs-on: ubuntu-22.04
248+
runs-on: ubuntu-24.04
249249
steps:
250250
- uses: actions/checkout@v4
251251
- name: Set up Elixir
@@ -273,7 +273,7 @@ jobs:
273273

274274
download-spectests:
275275
name: Download spectests
276-
runs-on: ubuntu-22.04
276+
runs-on: ubuntu-24.04
277277
steps:
278278
- uses: actions/checkout@v4
279279
- name: Cache compressed spectests
@@ -293,9 +293,9 @@ jobs:
293293
strategy:
294294
fail-fast: false
295295
matrix:
296-
fork: ["deneb"]
296+
fork: ["electra"]
297297
config: ["minimal", "general", "mainnet"]
298-
runs-on: ubuntu-22.04
298+
runs-on: ubuntu-24.04
299299
steps:
300300
- uses: actions/checkout@v4
301301
- name: Set up Elixir
@@ -357,7 +357,7 @@ jobs:
357357
spectests-success:
358358
name: All spec-tests passed
359359
needs: spectests-matrix
360-
runs-on: ubuntu-22.04
360+
runs-on: ubuntu-24.04
361361
if: always()
362362
steps:
363363
- if: needs.spectests-matrix.result == 'success'

.github/workflows/ci_skipped.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@ on:
1414
jobs:
1515
compile-native:
1616
name: Build native libraries
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-24.04
1818
if: false
1919
steps: [run: true]
2020

2121
build:
2222
name: Build project
23-
runs-on: ubuntu-22.04
23+
runs-on: ubuntu-24.04
2424
if: false
2525
steps: [run: true]
2626

2727
smoke:
2828
name: Start and stop the node
29-
runs-on: ubuntu-22.04
29+
runs-on: ubuntu-24.04
3030
if: false
3131
steps: [run: true]
3232

3333
test:
3434
name: Test
35-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-24.04
3636
if: false
3737
steps: [run: true]
3838

3939
lint:
4040
name: Lint
41-
runs-on: ubuntu-22.04
41+
runs-on: ubuntu-24.04
4242
if: false
4343
steps: [run: true]
4444

4545
spectests-success:
4646
name: All spec-tests passed
47-
runs-on: ubuntu-22.04
47+
runs-on: ubuntu-24.04
4848
if: false
4949
steps: [run: true]

.spectest_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.4.0
1+
v1.5.0-beta.3

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
erlang 26.2
22
elixir 1.16.2-otp-26
3-
golang 1.22.12
3+
golang 1.24.2
44
rust 1.81.0
55
protoc 30.2

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# libp2p port
2-
FROM golang:1.22 AS libp2p_builder
2+
FROM golang:1.24 AS libp2p_builder
33
LABEL stage=builder
44

55
# Install dependencies

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ We take security seriously. If you discover a vulnerability in this project, ple
1212

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

15+
## Electra Support
16+
17+
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)
1518

1619
## Prerequisites
1720

config/config.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ fork_raw = File.read!(".fork_version") |> String.trim()
1010
fork =
1111
case fork_raw do
1212
"deneb" -> :deneb
13+
"electra" -> :electra
1314
v -> raise "Invalid fork specified: #{v}"
1415
end
1516

config/networks/mainnet/config.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,14 @@ ATTESTATION_SUBNET_PREFIX_BITS: 6
135135
# Deneb
136136
# `2**7` (=128)
137137
MAX_REQUEST_BLOCKS_DENEB: 128
138-
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
139-
MAX_REQUEST_BLOB_SIDECARS: 768
140138
# `2**12` (= 4096 epochs, ~18 days)
141139
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
142140
# `6`
143141
BLOB_SIDECAR_SUBNET_COUNT: 6
142+
## 6 blobs
143+
MAX_BLOBS_PER_BLOCK: 6
144+
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK (= 128 * 6) sidecars
145+
MAX_REQUEST_BLOB_SIDECARS: 768
144146

145147
# Whisk
146148
# `Epoch(2**8)`
@@ -151,3 +153,11 @@ WHISK_PROPOSER_SELECTION_GAP: 2
151153
# EIP7594
152154
EIP7594_FORK_VERSION: 0x06000001
153155
EIP7594_FORK_EPOCH: 18446744073709551615
156+
157+
# Electra
158+
# 2**7 * 10**9 (= 128,000,000,000) Gwei
159+
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000
160+
# 2**8 * 10**9) (= 256,000,000,000) Gwei
161+
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000
162+
# 9
163+
MAX_BLOBS_PER_BLOCK_ELECTRA: 9

config/networks/minimal/config.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,14 @@ ATTESTATION_SUBNET_PREFIX_BITS: 6
135135
# Deneb
136136
# `2**7` (=128)
137137
MAX_REQUEST_BLOCKS_DENEB: 128
138-
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
139-
MAX_REQUEST_BLOB_SIDECARS: 768
140138
# `2**12` (= 4096 epochs, ~18 days)
141139
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
142140
# `6`
143141
BLOB_SIDECAR_SUBNET_COUNT: 6
142+
## 6 blobs
143+
MAX_BLOBS_PER_BLOCK: 6
144+
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK (= 128 * 6) sidecars
145+
MAX_REQUEST_BLOB_SIDECARS: 768
144146

145147
# Whisk
146148
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 4
@@ -149,3 +151,11 @@ WHISK_PROPOSER_SELECTION_GAP: 1
149151
# EIP7594
150152
EIP7594_FORK_VERSION: 0x06000001
151153
EIP7594_FORK_EPOCH: 18446744073709551615
154+
155+
# Electra
156+
# [customized] 2**7 * 10**9 (= 128,000,000,000) Gwei
157+
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000
158+
# [customized] 2**8 * 10**9) (= 256,000,000,000) Gwei
159+
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 128000000000
160+
# 9
161+
MAX_BLOBS_PER_BLOCK_ELECTRA: 9

config/presets/gnosis/electra.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Mainnet preset - Electra
2+
3+
# Gwei values
4+
# ---------------------------------------------------------------
5+
# 2**5 * 10**9 (= 32,000,000,000) Gwei
6+
MIN_ACTIVATION_BALANCE: 32000000000
7+
# 2**11 * 10**9 (= 2,048,000,000,000) Gwei
8+
MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000
9+
10+
# State list lengths
11+
# ---------------------------------------------------------------
12+
# `uint64(2**27)` (= 134,217,728)
13+
PENDING_DEPOSITS_LIMIT: 134217728
14+
# `uint64(2**27)` (= 134,217,728)
15+
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 134217728
16+
# `uint64(2**18)` (= 262,144)
17+
PENDING_CONSOLIDATIONS_LIMIT: 262144
18+
19+
# Reward and penalty quotients
20+
# ---------------------------------------------------------------
21+
# `uint64(2**12)` (= 4,096)
22+
MIN_SLASHING_PENALTY_QUOTIENT_ELECTRA: 4096
23+
# `uint64(2**12)` (= 4,096)
24+
WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA: 4096
25+
26+
# # Max operations per block
27+
# ---------------------------------------------------------------
28+
# `uint64(2**0)` (= 1)
29+
MAX_ATTESTER_SLASHINGS_ELECTRA: 1
30+
# `uint64(2**3)` (= 8)
31+
MAX_ATTESTATIONS_ELECTRA: 8
32+
# `uint64(2**1)` (= 2)
33+
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2
34+
35+
# Execution
36+
# ---------------------------------------------------------------
37+
# 2**13 (= 8192) deposit requests
38+
MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: 8192
39+
# 2**4 (= 16) withdrawal requests
40+
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16
41+
42+
# Withdrawals processing
43+
# ---------------------------------------------------------------
44+
# 2**3 ( = 8) pending withdrawals
45+
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 8
46+
47+
# Pending deposits processing
48+
# ---------------------------------------------------------------
49+
# 2**4 ( = 4) pending deposits
50+
MAX_PENDING_DEPOSITS_PER_EPOCH: 16

0 commit comments

Comments
 (0)