Then if you blend in EIP- 7762; and @vbuterin’s latest feedback https://x.com/VitalikButerin/status/1911223517728698690
It would become
def calc_excess_blob_gas(parent: Header) -> int:
min_price = 2**30 // approx 1 gwei
base_blob_fee = get_base_fee_per_blob_gas(parent) * GAS_PER_BLOB
base_verification_fee = parent.base_fee_per_gas * POINT_EVALUATION_PRECOMPILE_GAS
if base_verification_fee > base_blob_fee or min_price > base_blob_fee:
# Fee too low relative to execution cost
# increase, but not by more than a max fill would (e.g. div 3 for 6/9)
return parent.excess_blob_gas + parent.blob_gas_used // 3
if parent.excess_blob_gas + parent.blob_gas_used < TARGET_BLOB_GAS_PER_BLOCK:
# Below target usage; blob fee sufficiently high; reset excess
return 0
else:
# Above target usage; normal EIP-4844 excess gas logic
return parent.excess_blob_gas + parent.blob_gas_used - TARGET_BLOB_GAS_PER_BLOCK