1010 expect_assertion_error ,
1111 with_deneb_and_later
1212)
13- from eth2spec .test .helpers .sharding import (
14- get_sample_opaque_tx ,
13+ from eth2spec .test .helpers .blob import (
14+ get_sample_blob_tx ,
1515)
1616
1717
@@ -74,7 +74,7 @@ def test_incorrect_blob_tx_type(spec, state):
7474 """
7575 execution_payload = build_empty_execution_payload (spec , state )
7676
77- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
77+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
7878 opaque_tx = b'\x04 ' + opaque_tx [1 :] # incorrect tx type
7979
8080 execution_payload .transactions = [opaque_tx ]
@@ -91,7 +91,7 @@ def test_incorrect_transaction_length_1_extra_byte(spec, state):
9191 """
9292 execution_payload = build_empty_execution_payload (spec , state )
9393
94- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
94+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
9595 opaque_tx = opaque_tx + b'\x12 ' # incorrect tx length, longer
9696
9797 execution_payload .transactions = [opaque_tx ]
@@ -108,7 +108,7 @@ def test_incorrect_transaction_length_1_byte_short(spec, state):
108108 """
109109 execution_payload = build_empty_execution_payload (spec , state )
110110
111- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
111+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
112112 opaque_tx = opaque_tx [:- 1 ] # incorrect tx length, shorter
113113
114114 execution_payload .transactions = [opaque_tx ]
@@ -125,7 +125,7 @@ def test_incorrect_transaction_length_empty(spec, state):
125125 """
126126 execution_payload = build_empty_execution_payload (spec , state )
127127
128- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
128+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
129129 opaque_tx = opaque_tx [0 :0 ] # incorrect tx length, empty
130130
131131 execution_payload .transactions = [opaque_tx ]
@@ -142,7 +142,7 @@ def test_incorrect_transaction_length_32_extra_bytes(spec, state):
142142 """
143143 execution_payload = build_empty_execution_payload (spec , state )
144144
145- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
145+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
146146 opaque_tx = opaque_tx + b'\x12 ' * 32 # incorrect tx length
147147
148148 execution_payload .transactions = [opaque_tx ]
@@ -159,7 +159,7 @@ def test_no_transactions_with_commitments(spec, state):
159159 """
160160 execution_payload = build_empty_execution_payload (spec , state )
161161
162- _ , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
162+ _ , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
163163
164164 execution_payload .transactions = []
165165 execution_payload .block_hash = compute_el_block_hash (spec , execution_payload , state )
@@ -175,7 +175,7 @@ def test_incorrect_commitment(spec, state):
175175 """
176176 execution_payload = build_empty_execution_payload (spec , state )
177177
178- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
178+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
179179 blob_kzg_commitments [0 ] = b'\x12 ' * 48 # incorrect commitment
180180
181181 execution_payload .transactions = [opaque_tx ]
@@ -192,7 +192,7 @@ def test_incorrect_commitments_order(spec, state):
192192 """
193193 execution_payload = build_empty_execution_payload (spec , state )
194194
195- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec , blob_count = 2 , rng = Random (1111 ))
195+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec , blob_count = 2 , rng = Random (1111 ))
196196 blob_kzg_commitments = [blob_kzg_commitments [1 ], blob_kzg_commitments [0 ]] # incorrect order
197197
198198 execution_payload .transactions = [opaque_tx ]
@@ -206,7 +206,7 @@ def test_incorrect_commitments_order(spec, state):
206206def test_incorrect_block_hash (spec , state ):
207207 execution_payload = build_empty_execution_payload (spec , state )
208208
209- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
209+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
210210
211211 execution_payload .transactions = [opaque_tx ]
212212 execution_payload .block_hash = b'\x12 ' * 32 # incorrect block hash
@@ -223,7 +223,7 @@ def test_zeroed_commitment(spec, state):
223223 """
224224 execution_payload = build_empty_execution_payload (spec , state )
225225
226- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec , blob_count = 1 , is_valid_blob = False )
226+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec , blob_count = 1 , is_valid_blob = False )
227227 assert all (commitment == b'\x00 ' * 48 for commitment in blob_kzg_commitments )
228228
229229 execution_payload .transactions = [opaque_tx ]
@@ -240,7 +240,7 @@ def test_invalid_correct_input__execution_invalid(spec, state):
240240 """
241241 execution_payload = build_empty_execution_payload (spec , state )
242242
243- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec )
243+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec )
244244
245245 execution_payload .transactions = [opaque_tx ]
246246 execution_payload .block_hash = compute_el_block_hash (spec , execution_payload , state )
@@ -254,7 +254,7 @@ def test_invalid_correct_input__execution_invalid(spec, state):
254254def test_invalid_exceed_max_blobs_per_block (spec , state ):
255255 execution_payload = build_empty_execution_payload (spec , state )
256256
257- opaque_tx , _ , blob_kzg_commitments , _ = get_sample_opaque_tx (spec , blob_count = spec .config .MAX_BLOBS_PER_BLOCK + 1 )
257+ opaque_tx , _ , blob_kzg_commitments , _ = get_sample_blob_tx (spec , blob_count = spec .config .MAX_BLOBS_PER_BLOCK + 1 )
258258
259259 execution_payload .transactions = [opaque_tx ]
260260 execution_payload .block_hash = compute_el_block_hash (spec , execution_payload , state )
0 commit comments