Skip to content

Commit b1d870f

Browse files
committed
Merge branch 'projects/zkevm' into projects/zkevm-bal-devnet-3
2 parents bc7eed7 + ec23140 commit b1d870f

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/ethereum/forks/amsterdam/stateless_host.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ def build_stateless_input(
7373
tx_bytes_list.append(Bytes(rlp.encode(tx)))
7474
else:
7575
tx_bytes_list.append(Bytes(tx))
76-
tx_obj = decode_transaction(tx)
76+
# A typed tx may be malformed (pre-execution-rejected by
77+
# t8n but still committed to by the block's transactions
78+
# trie).
79+
try:
80+
tx_obj = decode_transaction(tx)
81+
except Exception:
82+
continue
7783
if isinstance(tx_obj, BlobTransaction):
7884
versioned_hashes.extend(tx_obj.blob_versioned_hashes)
7985

src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,16 +412,16 @@ def update(self, t8n: "T8N", block_env: Any, block_output: Any) -> None:
412412
slot_number=block_env.slot_number,
413413
)
414414

415-
# TODO: perhaps change this for t8n.all_txs minus rejected_txs?
416-
included_txs = []
417-
for key in block_output.receipt_keys:
415+
payload_txs = []
416+
for tx_index in range(len(t8n.txs.transactions)):
417+
key = rlp.encode(Uint(tx_index))
418418
tx = t8n.fork.trie_get(block_output.transactions_trie, key)
419419
assert tx is not None
420-
included_txs.append(tx)
420+
payload_txs.append(tx)
421421

422422
block = t8n.fork.Block(
423423
header=header,
424-
transactions=tuple(included_txs),
424+
transactions=tuple(payload_txs),
425425
ommers=(),
426426
withdrawals=withdrawals,
427427
)

0 commit comments

Comments
 (0)