Skip to content

Commit

Permalink
cleanup fee fn
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Oct 23, 2024
1 parent a01e294 commit 8186c8d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions EIPS/eip-7742.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,16 @@ def calc_excess_blob_gas(block: Header) -> int:
return (normalizedParentExcessBlobGas + (block.blob_gas_used - blockTargetBlobGas) * 100E6 // blockTargetBlobGas)

def get_base_fee_per_blob_gas(parent: Header) -> int:
if parent.timestamp < FORK_TIMESTAMP
updateFraction = BLOB_BASE_FEE_UPDATE_FRACTION
else
updateFraction = NORMALIZED_BLOB_BASE_FEE_UPDATE_FRACTION

return fake_exponential(
MIN_BASE_FEE_PER_BLOB_GAS,
parent.excess_blob_gas,
NORMALIZED_BLOB_BASE_FEE_UPDATE_FRACTION
)
updateFraction
)
```

### Block processing
Expand Down

0 comments on commit 8186c8d

Please sign in to comment.