-
Notifications
You must be signed in to change notification settings - Fork 973
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
Add EIP-7251 to Electra #3668
Merged
Merged
Add EIP-7251 to Electra #3668
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ce39316
Add EIP-7251 to Electra fork
ralexstokes 54e0f42
Apply suggestions from code review
ralexstokes d243afa
address PR feedback
ralexstokes 4d212b4
tighten conditional logic for withdrawal requests: list len cannot be…
ralexstokes 9bcafc8
fix lint
ralexstokes 3553498
reorg some spec functions
ralexstokes e1840a7
bugfix: check for all possible credentials when processing EL withdra…
ralexstokes 034909d
Merge in EIP-7251 tests to Electra
ralexstokes c0fa05d
Fix tests from 7251 and merge of other EIPs into Electra
ralexstokes 353bbb0
Workarounds for EIP-7549 tests
ralexstokes db2c01a
Reorder by processing seq
hwwhww 0252e12
Add notes
hwwhww File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,40 @@ | ||
# Mainnet preset - Electra | ||
|
||
# Gwei values | ||
# --------------------------------------------------------------- | ||
# 2**5 * 10**9 (= 32,000,000,000) Gwei | ||
MIN_ACTIVATION_BALANCE: 32000000000 | ||
# 2**11 * 10**9 (= 2,048,000,000,000) Gwei | ||
MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000 | ||
|
||
# State list lengths | ||
# --------------------------------------------------------------- | ||
# `uint64(2**27)` (= 134,217,728) | ||
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728 | ||
# `uint64(2**27)` (= 134,217,728) | ||
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 134217728 | ||
# `uint64(2**18)` (= 262,144) | ||
PENDING_CONSOLIDATIONS_LIMIT: 262144 | ||
|
||
# Reward and penalty quotients | ||
# --------------------------------------------------------------- | ||
# `uint64(2**12)` (= 4,096) | ||
MIN_SLASHING_PENALTY_QUOTIENT_ELECTRA: 4096 | ||
# `uint64(2**12)` (= 4,096) | ||
WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA: 4096 | ||
|
||
# # Max operations per block | ||
# --------------------------------------------------------------- | ||
# `uint64(2**0)` (= 1) | ||
MAX_ATTESTER_SLASHINGS_ELECTRA: 1 | ||
# `uint64(2 * 3)` (= 8) | ||
# `uint64(2**3)` (= 8) | ||
MAX_ATTESTATIONS_ELECTRA: 8 | ||
# `uint64(2**0)` (= 1) | ||
MAX_CONSOLIDATIONS: 1 | ||
|
||
# Execution | ||
# --------------------------------------------------------------- | ||
# 2**13 (= 8192) receipts | ||
MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 8192 | ||
# 2**4 (= 16) exits | ||
MAX_EXECUTION_LAYER_EXITS: 16 | ||
# 2**4 (= 16) withdrawal requests | ||
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,40 @@ | ||
# Minimal preset - Electra | ||
|
||
# Gwei values | ||
# --------------------------------------------------------------- | ||
# 2**5 * 10**9 (= 32,000,000,000) Gwei | ||
MIN_ACTIVATION_BALANCE: 32000000000 | ||
# 2**11 * 10**9 (= 2,048,000,000,000) Gwei | ||
MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000 | ||
|
||
# State list lengths | ||
# --------------------------------------------------------------- | ||
# `uint64(2**27)` (= 134,217,728) | ||
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728 | ||
# [customized] `uint64(2**6)` (= 64) | ||
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 64 | ||
# [customized] `uint64(2**6)` (= 64) | ||
PENDING_CONSOLIDATIONS_LIMIT: 64 | ||
|
||
# Reward and penalty quotients | ||
# --------------------------------------------------------------- | ||
# `uint64(2**12)` (= 4,096) | ||
MIN_SLASHING_PENALTY_QUOTIENT_ELECTRA: 4096 | ||
# `uint64(2**12)` (= 4,096) | ||
WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA: 4096 | ||
|
||
# # Max operations per block | ||
# --------------------------------------------------------------- | ||
# `uint64(2**0)` (= 1) | ||
MAX_ATTESTER_SLASHINGS_ELECTRA: 1 | ||
# `uint64(2 * 3)` (= 8) | ||
# `uint64(2**3)` (= 8) | ||
MAX_ATTESTATIONS_ELECTRA: 8 | ||
# `uint64(2**0)` (= 1) | ||
MAX_CONSOLIDATIONS: 1 | ||
|
||
# Execution | ||
# --------------------------------------------------------------- | ||
# [customized] | ||
MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 4 | ||
# 2**4 (= 16) exits | ||
MAX_EXECUTION_LAYER_EXITS: 16 | ||
# [customized] 2**1 (= 2) withdrawal requests | ||
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
DENEB = 'deneb' | ||
ELECTRA = 'electra' | ||
EIP7594 = 'eip7594' | ||
EIP7251 = 'eip7251' | ||
WHISK = 'whisk' | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @etan-status
The gindex will be updated due to the increased number of fields. We should update it to
FINALIZED_ROOT_GINDEX_ELECTRA
.Would this be a problem for the light client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a problem, the light client protocol is designed to be forward compatible, as in, the existing
v1
REST endpoints and libp2p endpoints continue to work fine, even if these indices adjust with new forks. However, the sync-protocol.md needs to take the new constant into account though, for both proof generation as well as verification and in the data structures.Further keep in mind that, due to the periodic nature of these reindexings, without EIP-7495, it is impossible to create an immutable verifier that lives on a different chain / hardware wallet / low-cadence software (EIP-7671 etc), that can consume proofs without needing to be continuously maintained. As we are aiming to break indices with Electra, I'd suggest to prioritize EIP-7495 for Electra as well, and make
BeaconState
,BeaconBlockBody
etcStableContainer
so that no further index changes are expected as long as the fundamental architecture stays the same.This way, we will re-index these containers once (with Electra), but it is the final time that we have to deal with this busywork that just introduces churn at arbitrary times without adding value. We shouldn't have to ever worry about breaking some unrelated component just because a new feature gets added or an old feature gets removed.
On EIP-7495, would appreciate reviews. If we want to transition
BeaconState
etc toStableContainer
, probably makes sense to push theVariant
type beyond just a notation but also give it more compact serialization. as in, if we know that an Electra variant is sent, no need for all the leading bits everywhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwwhww EIP here to ensure that this is the last time that gindices break: https://ethereum-magicians.org/t/eip-forward-compatible-consensus-data-structures/19673