-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add EIP-7251 to Electra #3668
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
Changes from 10 commits
ce39316
54e0f42
d243afa
4d212b4
9bcafc8
3553498
e1840a7
034909d
c0fa05d
353bbb0
db2c01a
0252e12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| 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 | ||
|
ralexstokes marked this conversation as resolved.
|
||
|
|
||
| # # 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.
| 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 | ||
|
ralexstokes marked this conversation as resolved.
|
||
|
|
||
| # 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 | ||
|
ralexstokes marked this conversation as resolved.
|
||
|
|
||
| # # 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 | ||
| 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 was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| from typing import Dict | ||
| from .base import BaseSpecBuilder | ||
| from ..constants import ELECTRA | ||
|
|
||
|
|
@@ -10,3 +11,13 @@ def imports(cls, preset_name: str): | |
| return f''' | ||
| from eth2spec.deneb import {preset_name} as deneb | ||
| ''' | ||
|
|
||
| ## TODO: deal with changed gindices | ||
|
|
||
| @classmethod | ||
| def hardcoded_ssz_dep_constants(cls) -> Dict[str, str]: | ||
| return { | ||
| 'FINALIZED_ROOT_GINDEX': 'GeneralizedIndex(169)', | ||
| 'CURRENT_SYNC_COMMITTEE_GINDEX': 'GeneralizedIndex(86)', | ||
| 'NEXT_SYNC_COMMITTEE_GINDEX': 'GeneralizedIndex(87)', | ||
|
Comment on lines
+20
to
+22
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Would this be a problem for the light client?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.