-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'v1.5.0-alpha.5' into eip-7495
- Loading branch information
Showing
53 changed files
with
2,746 additions
and
334 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
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,9 @@ | ||
# Mainnet preset - EIP7732 | ||
|
||
# Execution | ||
# --------------------------------------------------------------- | ||
# 2**9 (= 512) | ||
PTC_SIZE: 512 | ||
# 2**2 (= 4) | ||
MAX_PAYLOAD_ATTESTATIONS: 4 | ||
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_EIP7732: 13 |
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,9 @@ | ||
# Minimal preset - EIP7732 | ||
|
||
# Execution | ||
# --------------------------------------------------------------- | ||
# 2**1(= 2) | ||
PTC_SIZE: 2 | ||
# 2**2 (= 4) | ||
MAX_PAYLOAD_ATTESTATIONS: 4 | ||
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_EIP7732: 13 |
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 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,45 @@ | ||
from typing import Dict, Set | ||
|
||
from .base import BaseSpecBuilder | ||
from ..constants import EIP7732 | ||
|
||
|
||
class EIP7732SpecBuilder(BaseSpecBuilder): | ||
fork: str = EIP7732 | ||
|
||
@classmethod | ||
def imports(cls, preset_name: str): | ||
return f''' | ||
from eth2spec.electra import {preset_name} as electra | ||
''' | ||
|
||
@classmethod | ||
def sundry_functions(cls) -> str: | ||
return ''' | ||
def concat_generalized_indices(*indices: GeneralizedIndex) -> GeneralizedIndex: | ||
o = GeneralizedIndex(1) | ||
for i in indices: | ||
o = GeneralizedIndex(o * bit_floor(i) + (i - bit_floor(i))) | ||
return o''' | ||
|
||
|
||
@classmethod | ||
def hardcoded_custom_type_dep_constants(cls, spec_object) -> Dict[str, str]: | ||
return { | ||
'PTC_SIZE': spec_object.preset_vars['PTC_SIZE'].value, | ||
'MAX_PAYLOAD_ATTESTATIONS': spec_object.preset_vars['MAX_PAYLOAD_ATTESTATIONS'].value, | ||
'KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_EIP7732': | ||
spec_object.preset_vars['KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_EIP7732'].value, | ||
} | ||
|
||
@classmethod | ||
def deprecate_constants(cls) -> Set[str]: | ||
return set([ | ||
'EXECUTION_PAYLOAD_GINDEX', | ||
]) | ||
|
||
@classmethod | ||
def deprecate_presets(cls) -> Set[str]: | ||
return set([ | ||
'KZG_COMMITMENT_INCLUSION_PROOF_DEPTH', | ||
]) |
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.