We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b433488 commit d55b789Copy full SHA for d55b789
packages/block/src/header/header.ts
@@ -560,6 +560,11 @@ export class BlockHeader {
560
* Calculates the excess blob gas for next (hopefully) post EIP 4844 block.
561
*/
562
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
+ }
568
// The validation of the fields and 4844 activation is already taken care in BlockHeader constructor
569
const targetGasConsumed = (this.excessBlobGas ?? BIGINT_0) + (this.blobGasUsed ?? BIGINT_0)
570
const targetBlobGasPerBlock = childCommon.param('targetBlobGasPerBlock')
0 commit comments