Skip to content

Commit a748265

Browse files
committed
docs: electra-gap.md enhancement with roadmap and current status (#1442)
1 parent e1d8880 commit a748265

File tree

1 file changed

+72
-18
lines changed

1 file changed

+72
-18
lines changed

electra-gap.md

Lines changed: 72 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,47 @@
1-
# Implementation Gaps for Electra Upgrade
1+
# Implementation Gaps for electra Upgrade
22

3-
This document outlines the gaps in the current implementation of the Electra. It's still a WIP.
3+
This document will guide you through our step-by-step plan for the implementation of the new electra fork. We’ve broken the work into three clear phases to make our goals and priorities easy to follow. This is a living document, so we will update it as we progress through the implementation.
44

5-
## Difference Between Updated and Modified
5+
## Roadmap
66

7-
- **Updated**: Changes in validation rules, protocols, or external behaviors. These changes may not directly alter the logic of the implementation.
8-
- **Modified**: Refers to direct changes made to the code or logic of an existing function, container, or process to accommodate new requirements or features.
7+
| Status | Phase | What & Why | Key Steps | Testing |
8+
|:----:|:------------------------------------------|:------------------------------------------------------|:---------------------------------------------------------------------------|:---------------------------------------------------|
9+
| 🏗️ | [Phase 1: Beacon Chain Implementation](#phase-1-beacon-chain-implementation) | Build the electra-upgraded beacon chain core | • Apply electra-specific changes<br>• Run & pass full spec tests | Run spec suite (`make spec-test`), aim for 0 failures |
10+
|| [Phase 2: P2P & Sepolia Long-Running Sessions](#phase-2-p2p--sepolia-long-running-sessions) | Ensure stability on Sepolia | • Implement the P2P changes <br> • Deploy the node on our server pointing to Sepolia<br>• Fix every issue we found that interrupts the node execution | Continuous uptime checks & up-to-date block processing for 72+ hrs in Sepolia|
11+
|| [Phase 3: Validator Upgrades](#phase-3-validator-upgrades) | Ensure validators duties on devnets |• Implement the honest validator changes<br>• Make assertoor work<br> • Test via Kurtosis & Assertoor | Execute Kurtosis scenarios & Assertoor with continuous uptime checks and up-to-date validation duties for 72+ hrs on kurtosis |
912

10-
## Containers
13+
### Why this Order
14+
15+
We kick off with the beacon chain implementation because passing the full spec test suite is critical for protocol correctness and a solid foundation. Once all tests are green, we move to Phase 2 for prolonged Sepolia sessions and the implementation of the p2p interface changes, ensuring real-world testnet stability before mainnet moves to electra which would limit our network options before we upgrade. This will allow us to continue running long session on our servers and monitor the node execution given that just the block/epoch processing and state transitions are needed for this. With a stable node confirmed, Phase 3 begins, upgrading the validator logic, tested through Kurtosis and Assertoor to finalize the electra upgrade roadmap.
16+
17+
### Next Steps
18+
19+
Once we finish the whole electra upgrade we have a clear path to follow for the next steps:
20+
- **Hooli long running sessions:** Right now Holesky was not an option for us because of performance issues, we need to test on Hooli and see if we can run the node on it on acceptable performance. This effort will be in parallel to the performance optimization one.
21+
- **Performance optimization:** We need to run the node on Hooli and mainnet to identify and fix the current bottlenecks, specially on block and epoch processing.
22+
- **Electra code enhancements:** During the implementation, some complex functions were identified that could be simplified. They are mostly related to how to manage early returns in already large python reference functions and port the logic to elixir. We will work on those to improve the code quality and make it easier to maintain in the future.
23+
24+
## Current Status
25+
26+
Right now we are at the [Beacon Chain Implementation](#phase-1-beacon-chain-implementation) phase, our current spec test results for the past weeks are:
27+
28+
- **April 15th, 2025:** `11370 tests, 2003 failures, 784 skipped`
29+
- **April 22th, 2025:** `11370 tests, 165 failures, 784 skipped`
30+
31+
**Note:** The aim is to reach `0` failures before next week, so we can start the long running sessions on Sepolia. Also, we want to validate the 784 test skipped on the second phase.
32+
33+
## Implementation Gap
34+
35+
Here we will detail the current implementation gaps with the specs and the way to test every phase. The initial one is the larger to implement but it has the most clear way to validate it (spec-tests). The next phases are smaller but they need to be validated on long running sessions both in devnets and testnets.
36+
37+
### Phase 1: Beacon Chain Implementation
38+
39+
We are at `40/57` (70%) of the [beacon chain changes](docs/specs/electra/beacon-chain.md), and most of the remaining functions are already in progress. We have still `165/11370` spec test failures, but we are working on them. The skipped tests were there previous to the electra upgrade, so we will work on them if needed after we finish the first phase. Our aim as mentioned before is to reach `0` failures before going to the next phase.
40+
41+
42+
The current status of the implementation in the [electra-support](https://github.com/lambdaclass/lambda_ethereum_consensus/tree/electra-support) branch is as follows:
43+
44+
#### Containers (13/13 - 100%)
1145

1246
- [x] New `PendingDeposit` ([Spec](docs/specs/electra/beacon-chain.md#pendingdeposit), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1400))
1347
- [x] New `PendingPartialWithdrawal` ([Spec](docs/specs/electra/beacon-chain.md#pendingpartialwithdrawal), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1400))
@@ -23,7 +57,7 @@ This document outlines the gaps in the current implementation of the Electra. It
2357
- [x] Modified `IndexedAttestation` ([Spec](docs/specs/electra/beacon-chain.md#indexedattestation), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1400))
2458
- [x] Modified `BeaconState` ([Spec](docs/specs/electra/beacon-chain.md#beaconstate), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1400))
2559

26-
## Predicates
60+
#### Predicates (6/6 - 100%)
2761

2862
- [x] Modified `is_eligible_for_activation_queue` ([Spec](docs/specs/electra/beacon-chain.md#modified-is_eligible_for_activation_queue), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1419))
2963
- [x] New `is_compounding_withdrawal_credential` ([Spec](docs/specs/electra/beacon-chain.md#new-is_compounding_withdrawal_credential), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1419))
@@ -33,7 +67,7 @@ This document outlines the gaps in the current implementation of the Electra. It
3367
- [x] Modified `is_partially_withdrawable_validator` ([Spec](docs/specs/electra/beacon-chain.md#modified-is_partially_withdrawable_validator), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1419))
3468

3569

36-
## Beacon State Accessors
70+
#### Beacon State Accessors (4/6 - 67%)
3771

3872
- [x] Modified `get_attesting_indices` ([Spec](docs/specs/electra/beacon-chain.md#modified-get_attesting_indices), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1419))
3973
- [x] Modified `get_next_sync_committee_indices` ([Spec](docs/specs/electra/beacon-chain.md#modified-get_next_sync_committee_indices), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1417))
@@ -42,7 +76,7 @@ This document outlines the gaps in the current implementation of the Electra. It
4276
- [ ] New `get_consolidation_churn_limit` ([Spec](docs/specs/electra/beacon-chain.md#new-get_consolidation_churn_limit))
4377
- [ ] New `get_pending_balance_to_withdraw` ([Spec](docs/specs/electra/beacon-chain.md#new-get_pending_balance_to_withdraw))
4478

45-
## Beacon State Mutators
79+
#### Beacon State Mutators (3/6 - 50%)
4680

4781
- [x] Modified `initiate_validator_exit` ([Spec](docs/specs/electra/beacon-chain.md#modified-initiate_validator_exit), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1420))
4882
- [ ] New `switch_to_compounding_validator` ([Spec](docs/specs/electra/beacon-chain.md#new-switch_to_compounding_validator))
@@ -51,13 +85,13 @@ This document outlines the gaps in the current implementation of the Electra. It
5185
- [ ] New `compute_consolidation_epoch_and_update_churn` ([Spec](docs/specs/electra/beacon-chain.md#new-compute_consolidation_epoch_and_update_churn))
5286
- [x] Modified `slash_validator` ([Spec](docs/specs/electra/beacon-chain.md#modified-slash_validator), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1420))
5387

54-
## Miscellaneous
88+
#### Miscellaneous (3/3 - 100%)
5589

5690
- [x] New `get_committee_indices` ([Spec](docs/specs/electra/beacon-chain.md#new-get_committee_indices), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1419))
5791
- [x] Modified `compute_proposer_index` ([Spec](docs/specs/electra/beacon-chain.md#modified-compute_proposer_index), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1417))
5892
- [x] New `get_max_effective_balance` ([Spec](docs/specs/electra/beacon-chain.md#new-get_max_effective_balance), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1419))
5993

60-
## Epoch Processing
94+
#### Epoch Processing (5/8 - 63%)
6195

6296
- [ ] Modified `process_epoch` ([Spec](docs/specs/electra/beacon-chain.md#modified-process_epoch))
6397
- [x] Modified `process_registry_updates` ([Spec](docs/specs/electra/beacon-chain.md#modified-process_registry_updates), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1420))
@@ -68,7 +102,7 @@ This document outlines the gaps in the current implementation of the Electra. It
68102
- [ ] Modified `process_effective_balance_updates` ([Spec](docs/specs/electra/beacon-chain.md#modified-process_effective_balance_updates))
69103
- [x] Modified `get_validator_from_deposit` ([Spec](docs/specs/electra/beacon-chains.md#modified-get_validator_from_deposit), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1424))
70104

71-
## Block Processing
105+
#### Block Processing (6/12 - 50%)
72106

73107
- [ ] Modified `process_withdrawals` ([Spec](docs/specs/electra/beacon-chain.md#modified-process_withdrawals))
74108
- [ ] Modified `process_execution_payload` ([Spec](docs/specs/electra/beacon-chain.md#modified-process_execution_payload))
@@ -82,13 +116,24 @@ This document outlines the gaps in the current implementation of the Electra. It
82116
- [x] New `is_valid_deposit_signature` ([Spec](docs/specs/electra/beacon-chain.md#new-is_valid_deposit_signature), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1424))
83117
- [x] Modified `add_validator_to_registry` ([Spec](docs/specs/electra/beacon-chain.md#modified-add_validator_to_registry), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1424))
84118
- [x] Modified `apply_deposit` ([Spec](docs/specs/electra/beacon-chain.md#modified-apply_deposit), [PR](https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1424))
85-
## Execution Engine
119+
120+
#### Execution Engine (0/3 - 0%)
86121

87122
- [ ] Modified `is_valid_block_hash` ([Spec](docs/specs/electra/beacon-chain.md#modified-is_valid_block_hash))
88123
- [ ] Modified `notify_new_payload` ([Spec](docs/specs/electra/beacon-chain.md#modified-notify_new_payload))
89124
- [ ] Modified `verify_and_notify_new_payload` ([Spec](docs/specs/electra/beacon-chain.md#modified-verify_and_notify_new_payload))
90125

91-
## Networking
126+
## Phase 2: P2P & Sepolia Long-Running Sessions
127+
128+
We didn't start this phase yet, its goals are:
129+
130+
- [P2P electra changes](docs/specs/electra/p2p-interface.md) implementated.
131+
- To have a stable node processing state transitions in testnets, especially Sepolia.
132+
- Validate the remaining 784 skipped tests to make sure they are not masking any issues.
133+
134+
The aim is to have the node running on Sepolia uninterrupted for 72+ hrs. The following is the implementation gap for this phase:
135+
136+
### Networking (0/8 - 0% Complete)
92137

93138
- [ ] Updated `beacon_block` topic validation ([Spec](docs/specs/electra/p2p-interface.md#beacon_block))
94139
- [ ] Updated `beacon_aggregate_and_proof` topic validation ([Spec](docs/specs/electra/p2p-interface.md#beacon_aggregate_and_proof))
@@ -99,7 +144,16 @@ This document outlines the gaps in the current implementation of the Electra. It
99144
- [ ] Updated `BlobSidecarsByRange v1` ([Spec](docs/specs/electra/p2p-interface.md#blobsidecarsbyrange-v1))
100145
- [ ] Updated `BlobSidecarsByRoot v1` ([Spec](docs/specs/electra/p2p-interface.md#blobsidecarsbyroot-v1))
101146

102-
## Honest Validator
147+
## Phase 3: Validator Upgrades
148+
149+
We didn't start this phase yet, its goals are:
150+
- [Honest validator changes](docs/specs/electra/validator.md) implemented.
151+
- To have a stable node processing validator duties in a kurtosis devnet.
152+
- Have assertoor working with automatic test for the validator duties.
153+
154+
The aim is to have the node running on kurtosis uninterrupted for 72+ hrs. The following is the implementation gap for this phase:
155+
156+
### Honest Validator (0/9 - 0% Complete)
103157

104158
- [ ] Modified `GetPayloadResponse` ([Spec](docs/specs/electra/validator.md#modified-getpayloadresponse))
105159
- [ ] Modified `AggregateAndProof` ([Spec](docs/specs/electra/validator.md#aggregateandproof))
@@ -111,7 +165,7 @@ This document outlines the gaps in the current implementation of the Electra. It
111165
- [ ] Updated `construct attestation` ([Spec](docs/specs/electra/validator.md#construct-attestation))
112166
- [ ] Updated `construct aggregate` ([Spec](docs/specs/electra/validator.md#construct-aggregate))
113167

114-
## Fork Logic
115168

116-
- [ ] Modified `compute_fork_version` ([Spec](docs/specs/electra/fork.md#modified-compute_fork_version))
117-
- [ ] New `upgrade_to_electra` ([Spec](docs/specs/electra/fork.md#upgrade_to_electra))
169+
## Changelog
170+
- **April 10th, 2025:** Created the document with the implementation gap.
171+
- **April 22th, 2025:** Updated the document with a clear roadmap, next steps and detailed current status.

0 commit comments

Comments
 (0)