|
| 1 | +from .base import BaseSpecBuilder |
| 2 | +from ..constants import EIP7805 |
| 3 | + |
| 4 | + |
| 5 | +class EIP7805SpecBuilder(BaseSpecBuilder): |
| 6 | + fork: str = EIP7805 |
| 7 | + |
| 8 | + |
| 9 | + @classmethod |
| 10 | + def execution_engine_cls(cls) -> str: |
| 11 | + return """ |
| 12 | +class NoopExecutionEngine(ExecutionEngine): |
| 13 | +
|
| 14 | + def notify_new_payload(self: ExecutionEngine, |
| 15 | + execution_payload: ExecutionPayload, |
| 16 | + parent_beacon_block_root: Root, |
| 17 | + execution_requests_list: Sequence[bytes], |
| 18 | + inclusion_list_transactions: Sequence[Transaction]) -> bool: |
| 19 | + return True |
| 20 | +
|
| 21 | + def notify_forkchoice_updated(self: ExecutionEngine, |
| 22 | + head_block_hash: Hash32, |
| 23 | + safe_block_hash: Hash32, |
| 24 | + finalized_block_hash: Hash32, |
| 25 | + payload_attributes: Optional[PayloadAttributes]) -> Optional[PayloadId]: |
| 26 | + pass |
| 27 | +
|
| 28 | + def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> GetPayloadResponse: |
| 29 | + # pylint: disable=unused-argument |
| 30 | + raise NotImplementedError("no default block production") |
| 31 | +
|
| 32 | + def is_valid_block_hash(self: ExecutionEngine, |
| 33 | + execution_payload: ExecutionPayload, |
| 34 | + parent_beacon_block_root: Root, |
| 35 | + execution_requests_list: Sequence[bytes], |
| 36 | + inclusion_list_transactions: Sequence[Transaction]) -> bool: |
| 37 | + return True |
| 38 | +
|
| 39 | + def is_valid_versioned_hashes(self: ExecutionEngine, new_payload_request: NewPayloadRequest) -> bool: |
| 40 | + return True |
| 41 | +
|
| 42 | + def verify_and_notify_new_payload(self: ExecutionEngine, |
| 43 | + new_payload_request: NewPayloadRequest) -> bool: |
| 44 | + return True |
| 45 | +
|
| 46 | +
|
| 47 | +EXECUTION_ENGINE = NoopExecutionEngine()""" |
0 commit comments