From 59617bacd87a6bfbf00c021338910ed8bcdd68eb Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Sat, 28 Mar 2026 18:11:30 +0000 Subject: [PATCH] core: remove per-tx state gas pre-check from parallel processor The per-tx state gas check reserved a transaction's full gas limit against the state gas budget, double-counting across both dimensions. Block-end validation (max(regular, state) <= gas_limit) catches state gas overflow. See ethereum/execution-specs#2578. --- core/parallel_state_processor.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/parallel_state_processor.go b/core/parallel_state_processor.go index adb229f8e9..ef025efd32 100644 --- a/core/parallel_state_processor.go +++ b/core/parallel_state_processor.go @@ -106,12 +106,10 @@ func (p *ParallelStateProcessor) prepareExecResult(block *types.Block, tExecStar var allReceipts []*types.Receipt for _, result := range results { // EIP-8037 check_transaction: verify this tx fits in remaining - // block capacity per-dimension BEFORE adding its actual usage. - // Regular gas is capped at MaxTxGas; state gas uses full tx.gas. + // regular gas capacity. State gas is not checked per-tx; + // block-end validation enforces max(regular, state) <= gas_limit. regularAvailable := header.GasLimit - sumRegular - stateAvailable := header.GasLimit - sumState - if min(params.MaxTxGas, result.txGasLimit) > regularAvailable || - result.txGasLimit > stateAvailable { + if min(params.MaxTxGas, result.txGasLimit) > regularAvailable { return &ProcessResultWithMetrics{ ProcessResult: &ProcessResult{Error: ErrGasLimitReached}, }