-
Notifications
You must be signed in to change notification settings - Fork 998
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3618 from dapplion/eip-7251
Add EIP-7251 spec: Increase MAX_EFFECTIVE_BALANCE
- Loading branch information
Showing
29 changed files
with
3,136 additions
and
7 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Mainnet preset - EIP7251 | ||
|
||
# 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_EIP7251: 2048000000000 | ||
|
||
# State list lengths | ||
# --------------------------------------------------------------- | ||
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728 | ||
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 134217728 | ||
PENDING_CONSOLIDATIONS_LIMIT: 262144 | ||
|
||
# Reward and penalty quotients | ||
# --------------------------------------------------------------- | ||
MIN_SLASHING_PENALTY_QUOTIENT_EIP7251: 4096 | ||
WHISTLEBLOWER_REWARD_QUOTIENT_EIP7251: 4096 | ||
|
||
# Max operations per block | ||
# --------------------------------------------------------------- | ||
MAX_CONSOLIDATIONS: 1 | ||
|
||
# Execution | ||
# --------------------------------------------------------------- | ||
# 2**3 (= 8) partial withdrawals | ||
MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD: 8 |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Minimal preset - EIP7251 | ||
|
||
# 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_EIP7251: 2048000000000 | ||
|
||
# State list lengths | ||
# --------------------------------------------------------------- | ||
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728 | ||
# [customized] smaller queue | ||
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 64 | ||
# [customized] smaller queue | ||
PENDING_CONSOLIDATIONS_LIMIT: 64 | ||
|
||
# Reward and penalty quotients | ||
# --------------------------------------------------------------- | ||
MIN_SLASHING_PENALTY_QUOTIENT_EIP7251: 4096 | ||
WHISTLEBLOWER_REWARD_QUOTIENT_EIP7251: 4096 | ||
|
||
# Max operations per block | ||
# --------------------------------------------------------------- | ||
MAX_CONSOLIDATIONS: 1 | ||
|
||
# Execution | ||
# --------------------------------------------------------------- | ||
# [customized] 2**1 (= 2) | ||
MAX_PARTIAL_WITHDRAWALS_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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from typing import Dict | ||
|
||
from .base import BaseSpecBuilder | ||
from ..constants import EIP7251 | ||
|
||
|
||
class EIP7251SpecBuilder(BaseSpecBuilder): | ||
fork: str = EIP7251 | ||
|
||
@classmethod | ||
def imports(cls, preset_name: str): | ||
return super().imports(preset_name) + 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)', | ||
} |
Oops, something went wrong.