From 778d5ceea583544762e3ffaaf73bc984863ea19e Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Fri, 2 May 2025 19:10:39 +0800 Subject: [PATCH] consensu/misc/eip4844: implement EIP-7918 adjustments to excess blobgas calculation --- consensus/misc/eip4844/eip4844.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/consensus/misc/eip4844/eip4844.go b/consensus/misc/eip4844/eip4844.go index 32b34f4e53..d453ecf085 100644 --- a/consensus/misc/eip4844/eip4844.go +++ b/consensus/misc/eip4844/eip4844.go @@ -76,6 +76,9 @@ func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTim if excessBlobGas < targetGas { return 0 } + if config.IsOsaka(new(big.Int).Add(big.NewInt(1), parent.Number), headTimestamp) { + return excessBlobGas / 3 + } return excessBlobGas - targetGas }