From 63add3db8b3ce95dcf81d46a7332d2e09a920eb4 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Sat, 4 Jul 2026 15:08:39 +0800 Subject: [PATCH] miner: cap configured MaxBlobsPerBlock to protocol limit Previously the user-configured MaxBlobsPerBlock replaced the protocol limit unconditionally, allowing the miner to build blocks exceeding the consensus maximum. Only apply the configured value when it is below the protocol-defined cap. --- miner/worker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index 01a14b8a02..e871ec9be0 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 }