19
19
from requests_unixsocket import Session
20
20
21
21
from ethereum_test_base_types import BlobSchedule
22
+ from ethereum_test_base_types .composite_types import ForkBlobSchedule
22
23
from ethereum_test_exceptions import ExceptionMapper
23
24
from ethereum_test_forks import Fork
24
25
from ethereum_test_forks .helpers import get_development_forks , get_forks
30
31
TransactionReceipt ,
31
32
TransactionTraces ,
32
33
TransitionToolCLIInput ,
33
- TransitionToolConfig ,
34
34
TransitionToolContext ,
35
35
TransitionToolInput ,
36
36
TransitionToolOutput ,
@@ -77,6 +77,7 @@ class TransitionTool(EthereumCLI):
77
77
supports_opcode_count : ClassVar [bool ] = False
78
78
79
79
supports_xdist : ClassVar [bool ] = True
80
+ supports_blob_params : ClassVar [bool ] = False
80
81
81
82
@abstractmethod
82
83
def __init__ (
@@ -177,6 +178,16 @@ def fork_name(self) -> str:
177
178
timestamp = self .env .timestamp ,
178
179
)
179
180
181
+ @property
182
+ def blob_params (self ) -> ForkBlobSchedule | None :
183
+ """Return the blob parameters for the current fork."""
184
+ if self .blob_schedule :
185
+ fork_name = self .fork .fork_at (
186
+ block_number = self .env .number , timestamp = self .env .timestamp
187
+ ).name ()
188
+ return self .blob_schedule [fork_name ]
189
+ return None
190
+
180
191
def __post_init__ (self ) -> None :
181
192
"""Modify the reward if the environment number is 0."""
182
193
if self .env .number == 0 :
@@ -196,11 +207,7 @@ def to_cli_input(self) -> TransitionToolCLIInput:
196
207
alloc = self .alloc ,
197
208
txs = self .txs ,
198
209
env = self .env ,
199
- config = TransitionToolConfig (
200
- blob_schedule = self .blob_schedule or BlobSchedule (),
201
- chain_id = self .chain_id ,
202
- network = self .fork ,
203
- ),
210
+ blob_params = self .blob_params ,
204
211
)
205
212
206
213
def get_request_data (self ) -> TransitionToolRequest :
@@ -253,8 +260,6 @@ def _evaluate_filesystem(
253
260
input_paths ["env" ],
254
261
"--input.txs" ,
255
262
input_paths ["txs" ],
256
- "--input.config" ,
257
- input_paths ["config" ],
258
263
"--output.basedir" ,
259
264
temp_dir .name ,
260
265
"--output.result" ,
@@ -275,6 +280,13 @@ def _evaluate_filesystem(
275
280
"opcodes.json" ,
276
281
]
277
282
)
283
+ if self .supports_blob_params and input_paths .get ("blobParams" ):
284
+ args .extend (
285
+ [
286
+ "--input.blobParams" ,
287
+ input_paths ["blobParams" ],
288
+ ]
289
+ )
278
290
279
291
if self .trace :
280
292
args .append ("--trace" )
0 commit comments