Skip to content

Commit 6da2a85

Browse files
committed
cancun test now uses static_blob
1 parent 3e39639 commit 6da2a85

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/ethereum_test_types/blob.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
TRUSTED_SETUP_FILE_NAME = "blob_trusted_setup.txt"
3535
TRUSTED_SETUP_PATH = Path(realpath(__file__)).parent / TRUSTED_SETUP_FILE_NAME
3636
TRUSTED_SETUP = ckzg.load_trusted_setup(str(TRUSTED_SETUP_PATH), 0)
37-
print(f"{TRUSTED_SETUP_FILE_NAME} has been loaded")
37+
# print(f"{TRUSTED_SETUP_FILE_NAME} has been loaded")
3838

3939

4040
def get_eest_root_folder(marker_files=("pyproject.toml", ".git", "tests", "src")) -> Path:
@@ -382,8 +382,6 @@ def corrupt_byte(b: bytes) -> Bytes:
382382

383383
# TODO: BlobFromFile supports both construction via blob parameters (works fine), and via provided path (here do some where testing which path is cwd if u use it within a test)
384384

385-
# TODO after merge: update test_blob_txs_full.py to make use of actual blobs
386-
387385
# --------- generate static blobs ------------
388386
# fork_list = [Cancun, Prague, Osaka]
389387
# amount_static_blobs_per_fork = 10

tests/cancun/eip4844_blobs/test_blob_txs_full.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ def generate_full_blob_tests(
253253
pytest.param(
254254
[ # Txs
255255
[ # Blobs per transaction
256-
Blob.NewBlob(fork),
256+
# you can provide the blob via file name
257+
Blob.LoadBlobFromFile("blob_cancun_0_0"),
257258
]
258259
],
259260
[True],
@@ -262,7 +263,10 @@ def generate_full_blob_tests(
262263
pytest.param(
263264
[ # Txs
264265
[ # Blobs per transaction
265-
Blob.NewBlob(fork),
266+
Blob.LoadBlobFromFile(
267+
# you can provide the blob also via relative path from eest root folder
268+
"./tests/cancun/eip4844_blobs/static_blobs/blob_cancun_0_0"
269+
),
266270
]
267271
for _ in range(max_blobs)
268272
],
@@ -272,7 +276,8 @@ def generate_full_blob_tests(
272276
pytest.param(
273277
[ # Txs
274278
[ # Blobs per transaction
275-
Blob.NewBlob(fork),
279+
Blob.LoadBlobFromFile("blob_cancun_0_0"),
280+
# Blob.NewBlob(fork), # this is how you could dynamically generate a blob
276281
]
277282
for _ in range(max_blobs)
278283
],

0 commit comments

Comments
 (0)