diff --git a/go/enclave/rpc/EstimateGas.go b/go/enclave/rpc/EstimateGas.go index c0821c4874..20708601d0 100644 --- a/go/enclave/rpc/EstimateGas.go +++ b/go/enclave/rpc/EstimateGas.go @@ -86,6 +86,11 @@ func EstimateGasExecute(builder *CallBuilder[CallParamsWithBlock, hexutil.Uint64 // where BaseFee is bigger than the l1cost. publishingGas = big.NewInt(0).Add(publishingGas, gethcommon.Big1) + // Overestimate the publishing cost in case of spikes. + // Batch execution still deducts normally. + // TODO: Change to fixed time period quotes, rather than this. + publishingGas = publishingGas.Mul(publishingGas, gethcommon.Big2) + executionGasEstimate, err := rpc.doEstimateGas(txArgs, blockNumber, rpc.config.GasLocalExecutionCapFlag) if err != nil { err = fmt.Errorf("unable to estimate transaction - %w", err)