@@ -77,7 +77,7 @@ def __init__(self, t8n: "T8N", stdin: Optional[Dict] = None):
7777 self .read_withdrawals (data , t8n )
7878
7979 self .parent_beacon_block_root = None
80- if t8n .fork .is_after_fork ("ethereum.forks. cancun" ):
80+ if t8n .fork .is_after_fork ("cancun" ):
8181 if not t8n .options .state_test :
8282 parent_beacon_block_root_hex = data ["parentBeaconBlockRoot" ]
8383 self .parent_beacon_block_root = (
@@ -96,7 +96,7 @@ def read_excess_blob_gas(self, data: Any, t8n: "T8N") -> None:
9696 self .parent_excess_blob_gas = U64 (0 )
9797 self .excess_blob_gas = None
9898
99- if not t8n .fork .is_after_fork ("ethereum.forks. cancun" ):
99+ if not t8n .fork .is_after_fork ("cancun" ):
100100 return
101101
102102 if "currentExcessBlobGas" in data :
@@ -131,7 +131,7 @@ def read_excess_blob_gas(self, data: Any, t8n: "T8N") -> None:
131131 else :
132132 self .excess_blob_gas = parent_blob_gas - target_blob_gas_per_block
133133
134- if t8n .fork .is_after_fork ("ethereum.forks. osaka" ):
134+ if t8n .fork .is_after_fork ("osaka" ):
135135 # Under certain conditions specified in EIP-7918, the
136136 # the excess_blob_gas is calculated differently in osaka
137137 assert self .parent_base_fee_per_gas is not None
@@ -170,7 +170,7 @@ def read_base_fee_per_gas(self, data: Any, t8n: "T8N") -> None:
170170 self .parent_base_fee_per_gas = None
171171 self .base_fee_per_gas = None
172172
173- if t8n .fork .is_after_fork ("ethereum.forks. london" ):
173+ if t8n .fork .is_after_fork ("london" ):
174174 if "currentBaseFee" in data :
175175 self .base_fee_per_gas = parse_hex_or_int (
176176 data ["currentBaseFee" ], Uint
@@ -212,7 +212,7 @@ def read_randao(self, data: Any, t8n: "T8N") -> None:
212212 Read the randao from the data.
213213 """
214214 self .prev_randao = None
215- if t8n .fork .is_after_fork ("ethereum.forks. paris" ):
215+ if t8n .fork .is_after_fork ("paris" ):
216216 # tf tool might not always provide an
217217 # even number of nibbles in the randao
218218 # This could create issues in the
@@ -233,7 +233,7 @@ def read_withdrawals(self, data: Any, t8n: "T8N") -> None:
233233 Read the withdrawals from the data.
234234 """
235235 self .withdrawals = None
236- if t8n .fork .is_after_fork ("ethereum.forks. shanghai" ):
236+ if t8n .fork .is_after_fork ("shanghai" ):
237237 self .withdrawals = tuple (
238238 t8n .json_to_withdrawals (wd ) for wd in data ["withdrawals" ]
239239 )
@@ -248,7 +248,7 @@ def read_block_difficulty(self, data: Any, t8n: "T8N") -> None:
248248 self .parent_timestamp = None
249249 self .parent_difficulty = None
250250 self .parent_ommers_hash = None
251- if t8n .fork .is_after_fork ("ethereum.forks. paris" ):
251+ if t8n .fork .is_after_fork ("paris" ):
252252 return
253253 elif "currentDifficulty" in data :
254254 self .block_difficulty = parse_hex_or_int (
@@ -267,7 +267,7 @@ def read_block_difficulty(self, data: Any, t8n: "T8N") -> None:
267267 self .parent_timestamp ,
268268 self .parent_difficulty ,
269269 ]
270- if t8n .fork .is_after_fork ("ethereum.forks. byzantium" ):
270+ if t8n .fork .is_after_fork ("byzantium" ):
271271 if "parentUncleHash" in data :
272272 EMPTY_OMMER_HASH = keccak256 (rlp .encode ([])) # noqa N806
273273 self .parent_ommers_hash = Hash32 (
@@ -286,10 +286,7 @@ def read_block_hashes(self, data: Any, t8n: "T8N") -> None:
286286 Read the block hashes. Returns a maximum of 256 block hashes.
287287 """
288288 self .parent_hash = None
289- if (
290- t8n .fork .is_after_fork ("ethereum.forks.prague" )
291- and not t8n .options .state_test
292- ):
289+ if t8n .fork .is_after_fork ("prague" ) and not t8n .options .state_test :
293290 self .parent_hash = Hash32 (hex_to_bytes (data ["parentHash" ]))
294291
295292 # Read the block hashes
0 commit comments