Skip to content

Conversation

@anvacaru
Copy link
Contributor

@anvacaru anvacaru commented Dec 19, 2025

This PR implements EIP-7918, which introduces a reserve price mechanism for the blob base fee to ensure proper fee market functioning and fair pricing for blob verification compute costs.

  • Modified Cexcessblob to accept a 4th parameter (BASE_FEE) for reserve price calculation, representing the base fee of the parent block. Rules have been updated to follow this logic:
def calc_excess_blob_gas(parent: Header) -> int:
    target_blob_gas = GAS_PER_BLOB * blobSchedule.target
    if parent.excess_blob_gas + parent.blob_gas_used < target_blob_gas:
        return 0

    if BLOB_BASE_COST * parent.base_fee_per_gas > GAS_PER_BLOB * get_base_fee_per_blob_gas(parent):
        return parent.excess_blob_gas + parent.blob_gas_used * (blobSchedule.max - blobSchedule.target) // blobSchedule.max
    else:
        return parent.excess_blob_gas + parent.blob_gas_used - target_blob_gas
  • A new previousBaseFee cell has been added to track the base fee of the parent block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants