diff --git a/src/ethereum/osaka/fork.py b/src/ethereum/osaka/fork.py index 70f5578dd8..b7bf0a1901 100644 --- a/src/ethereum/osaka/fork.py +++ b/src/ethereum/osaka/fork.py @@ -26,7 +26,7 @@ InvalidSenderError, ) -from . import vm +from . import FORK_CRITERIA, vm from .blocks import Block, Header, Log, Receipt, Withdrawal, encode_receipt from .bloom import logs_bloom from .fork_types import Account, Address, Authorization, VersionedHash @@ -335,7 +335,15 @@ def validate_header(chain: BlockChain, header: Header) -> None: parent_header = chain.blocks[-1].header - excess_blob_gas = calculate_excess_blob_gas(parent_header) + if FORK_CRITERIA.check( + header.number, header.timestamp + ) and not FORK_CRITERIA.check( + parent_header.number, parent_header.timestamp + ): + excess_blob_gas = U64(0) + else: + excess_blob_gas = calculate_excess_blob_gas(parent_header) + if header.excess_blob_gas != excess_blob_gas: raise InvalidBlock diff --git a/src/ethereum/osaka/vm/gas.py b/src/ethereum/osaka/vm/gas.py index fd31799b55..94edc23370 100644 --- a/src/ethereum/osaka/vm/gas.py +++ b/src/ethereum/osaka/vm/gas.py @@ -70,7 +70,7 @@ TARGET_BLOB_GAS_PER_BLOCK = U64(786432) GAS_PER_BLOB = U64(2**17) -MIN_BLOB_GASPRICE = Uint(1) +MIN_BLOB_GASPRICE = Uint(2**25) BLOB_BASE_FEE_UPDATE_FRACTION = Uint(5007716) GAS_BLS_G1_ADD = Uint(375)