Skip to content

Conversation

@yperbasis
Copy link
Member

No description provided.

if cfg.miningState.MiningConfig.MaxBlobsPerBlock != nil {
maxBlobs = min(maxBlobs, *cfg.miningState.MiningConfig.MaxBlobsPerBlock)
}
remainingBlobGas = maxBlobs*params.GasPerBlob - *header.BlobGasUsed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addTransactionsToMiningBlock has similar logic for the blob gas pool, e.g.:

if header.BlobGasUsed != nil {
		gasPool.AddBlobGas(chainConfig.GetMaxBlobGasPerBlock(header.Time) - *header.BlobGasUsed)
	}

we should update that there too or even better to extract it in a shared func and re-use in both places

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but, since addTransactionsToMiningBlock is always called after getNextTransactions, it's unnecessary to re-apply the cap logic there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I thought the same but saw it as a 2nd line of defence in case the txnprovider doesn't exactly honour the blob gas target. And also for consistency between the 2 code points. But not a big deal, it is for a minor override flag anyway.

@taratorio taratorio merged commit a2fb0d8 into main Jan 7, 2026
18 checks passed
@taratorio taratorio deleted the yperbasis/max-blobs branch January 7, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bpo3] EL: add max blobs config parameter for block production

3 participants