2024-01-05 10:43:37 +00:00
|
|
|
from typing import Dict
|
|
|
|
|
|
|
|
from .base import BaseSpecBuilder
|
2024-01-13 16:13:08 +00:00
|
|
|
from ..constants import EIP7594
|
2024-01-05 10:43:37 +00:00
|
|
|
|
|
|
|
|
2024-01-13 16:13:08 +00:00
|
|
|
class EIP7594SpecBuilder(BaseSpecBuilder):
|
|
|
|
fork: str = EIP7594
|
2024-01-05 10:43:37 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def imports(cls, preset_name: str):
|
|
|
|
return f'''
|
|
|
|
from eth2spec.deneb import {preset_name} as deneb
|
|
|
|
'''
|
2024-08-07 09:28:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def sundry_functions(cls) -> str:
|
|
|
|
return """
|
|
|
|
def retrieve_column_sidecars(beacon_block_root: Root) -> Sequence[DataColumnSidecar]:
|
|
|
|
return []
|
|
|
|
"""
|
2024-01-08 15:18:51 +00:00
|
|
|
|
|
|
|
@classmethod
|
2023-11-14 09:04:42 +00:00
|
|
|
def hardcoded_custom_type_dep_constants(cls, spec_object) -> str:
|
2024-01-08 15:18:51 +00:00
|
|
|
return {
|
|
|
|
'FIELD_ELEMENTS_PER_CELL': spec_object.preset_vars['FIELD_ELEMENTS_PER_CELL'].value,
|
2024-04-04 13:32:08 +00:00
|
|
|
'FIELD_ELEMENTS_PER_EXT_BLOB': spec_object.preset_vars['FIELD_ELEMENTS_PER_EXT_BLOB'].value,
|
2024-02-27 13:42:32 +00:00
|
|
|
'NUMBER_OF_COLUMNS': spec_object.config_vars['NUMBER_OF_COLUMNS'].value,
|
2023-11-14 09:04:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def hardcoded_func_dep_presets(cls, spec_object) -> Dict[str, str]:
|
|
|
|
return {
|
|
|
|
'KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH': spec_object.preset_vars['KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH'].value,
|
2024-01-08 15:18:51 +00:00
|
|
|
}
|