forked from ethereum/consensus-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheze.py
More file actions
75 lines (58 loc) · 2.62 KB
/
Copy pathheze.py
File metadata and controls
75 lines (58 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from pysetup.constants import HEZE
from .base import BaseSpecBuilder
class HezeSpecBuilder(BaseSpecBuilder):
fork: str = HEZE
@classmethod
def imports(cls, preset_name: str):
return f"""
from eth_consensus_specs.gloas import {preset_name} as gloas
"""
@classmethod
def sundry_functions(cls) -> str:
return """
def cached_or_new_inclusion_list_store() -> InclusionListStore:
return InclusionListStore()
"""
@classmethod
def execution_engine_cls(cls) -> str:
return """
class NoopExecutionEngine(ExecutionEngine):
def notify_new_payload(self: ExecutionEngine,
execution_payload: ExecutionPayload,
parent_beacon_block_root: Root,
execution_requests_list: Sequence[bytes]) -> bool:
return True
def notify_forkchoice_updated(self: ExecutionEngine,
head_block_hash: Hash32,
safe_block_hash: Hash32,
finalized_block_hash: Hash32,
payload_attributes: Optional[PayloadAttributes]) -> Optional[PayloadId]:
pass
def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> GetPayloadResponse:
raise NotImplementedError("no default block production")
def is_valid_block_hash(self: ExecutionEngine,
execution_payload: ExecutionPayload,
parent_beacon_block_root: Root,
execution_requests_list: Sequence[bytes]) -> bool:
return True
def is_valid_versioned_hashes(self: ExecutionEngine, new_payload_request: NewPayloadRequest) -> bool:
return True
def verify_and_notify_new_payload(self: ExecutionEngine,
new_payload_request: NewPayloadRequest) -> bool:
return True
def get_inclusion_list(self: ExecutionEngine) -> GetInclusionListResponse:
raise NotImplementedError("no default inclusion list production")
def is_inclusion_list_satisfied(self: ExecutionEngine,
execution_payload: ExecutionPayload,
inclusion_list_transactions: Sequence[Transaction]) -> bool:
return True
EXECUTION_ENGINE = NoopExecutionEngine()"""
@classmethod
def deprecate_functions(cls) -> set[str]:
return {
"initialize_ptc_window",
"is_builder_withdrawal_credential",
"is_pending_validator",
"onboard_builders_from_pending_deposits",
"upgrade_to_gloas",
}