From 3140668d496c77fe4f4b08b123919667b782b0ab Mon Sep 17 00:00:00 2001 From: cui Date: Mon, 13 Jul 2026 18:13:15 +0800 Subject: [PATCH] miner: cap configured MaxBlobsPerBlock to protocol limit (#35295) ## Summary - Only apply user-configured `MaxBlobsPerBlock` when it is strictly below the protocol-defined maximum. - Prevents the miner from building blocks that exceed the consensus blob limit. ## Test plan - [x] `go test -short ./miner/` --- miner/worker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index 7f0e11f30a..cd53addf9b 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -51,8 +51,8 @@ var ( // Users can specify the maximum number of blobs per block if necessary. func (miner *Miner) maxBlobsPerBlock(time uint64) int { maxBlobs := eip4844.MaxBlobsPerBlock(miner.chainConfig, time) - if miner.config.MaxBlobsPerBlock != 0 { - maxBlobs = miner.config.MaxBlobsPerBlock + if configured := miner.config.MaxBlobsPerBlock; configured != 0 && configured < maxBlobs { + maxBlobs = configured } return maxBlobs }