mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
consensus/misc/eip4844: update
This commit is contained in:
parent
f21a1e9781
commit
660bbee5d4
1 changed files with 4 additions and 2 deletions
|
|
@ -80,12 +80,14 @@ func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTim
|
|||
return 0
|
||||
}
|
||||
if !config.IsOsaka(config.LondonBlock, headTimestamp) {
|
||||
// Pre-Osaka, we use the formula defined by EIP-4844.
|
||||
return excessBlobGas - targetGas
|
||||
}
|
||||
|
||||
// EIP-7918 (post-Osaka).
|
||||
// EIP-7918 (post-Osaka) introduces a different formula for computing excess.
|
||||
var (
|
||||
reservePrice = new(big.Int).Mul(parent.BaseFee, big.NewInt(params.BlobBaseCost))
|
||||
baseCost = big.NewInt(params.BlobBaseCost)
|
||||
reservePrice = baseCost.Mul(baseCost, parent.BaseFee)
|
||||
blobPrice = calcBlobPrice(config, parent)
|
||||
)
|
||||
if reservePrice.Cmp(blobPrice) > 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue