Skip to content

Commit d55b789

Browse files
committed
block: update calculateExcessBlobGas method
1 parent b433488 commit d55b789

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/block/src/header/header.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,11 @@ export class BlockHeader {
560560
* Calculates the excess blob gas for next (hopefully) post EIP 4844 block.
561561
*/
562562
public calcNextExcessBlobGas(childCommon: Common): bigint {
563+
const osakaForkBlock = this.common.hardforkBlock(Hardfork.Osaka)
564+
if (osakaForkBlock !== null && this.number === osakaForkBlock - BIGINT_1) {
565+
// at the fork, set excess_blob_gas to 0
566+
return BIGINT_0
567+
}
563568
// The validation of the fields and 4844 activation is already taken care in BlockHeader constructor
564569
const targetGasConsumed = (this.excessBlobGas ?? BIGINT_0) + (this.blobGasUsed ?? BIGINT_0)
565570
const targetBlobGasPerBlock = childCommon.param('targetBlobGasPerBlock')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy