From 07f4774873cf25e062d925f43c740f6fdf8ada24 Mon Sep 17 00:00:00 2001 From: Mario Vega Date: Wed, 4 Dec 2024 21:30:54 +0000 Subject: [PATCH] Fix zero-blob tx check in Prague --- src/ethereum/prague/fork.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ethereum/prague/fork.py b/src/ethereum/prague/fork.py index a4d8e2b8c0..141ef67acb 100644 --- a/src/ethereum/prague/fork.py +++ b/src/ethereum/prague/fork.py @@ -430,6 +430,10 @@ def check_transaction( max_gas_fee = tx.gas * tx.gas_price if isinstance(tx, BlobTransaction): + if not isinstance(tx.to, Address): + raise InvalidBlock + if len(tx.blob_versioned_hashes) == 0: + raise InvalidBlock for blob_versioned_hash in tx.blob_versioned_hashes: if blob_versioned_hash[0:1] != VERSIONED_HASH_VERSION_KZG: raise InvalidBlock