From d67d4dd127e8da6a6ff83b480ea1343d6b19de01 Mon Sep 17 00:00:00 2001 From: Julian Meyer Date: Fri, 15 May 2026 11:18:55 -0700 Subject: [PATCH] fix(simulator): remove double-application of scaleFactor in targetCalls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scaleFactor is applied per-tx inside sendTxs at line 608: expected = payloadParams.Mul(numCalls+1 * scaleFactor) meaning each tx already does scaleFactor times the base operations. targetCalls was then computed as: numCallsPerBlock * scaleFactor which multiplied scaleFactor in again — resulting in 5.71x more txs being targeted than actually needed (e.g. 572 instead of 100 for base-mainnet-simulation with GasLimit=200M, avg_gas_used=35M). Since the builder only absorbs ~100 txs/block worth of those scaled ops, pendingTxs accumulated beyond targetCalls after 2 blocks, causing callsToSend=0 forever and 7,000+ consecutive empty (deposit-only) blocks in a 900-block run. Fix: targetCalls = numCallsPerBlock (the tx count, not the ops count). scaleFactor belongs only in the per-tx operation calculation. --- runner/payload/simulator/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/payload/simulator/worker.go b/runner/payload/simulator/worker.go index 65c6071..1a228c7 100644 --- a/runner/payload/simulator/worker.go +++ b/runner/payload/simulator/worker.go @@ -595,7 +595,7 @@ func (t *simulatorPayloadWorker) sendTxs(ctx context.Context, pendingTxs int) (i sendTxsStartTime := time.Now() - targetCalls := uint64(math.Ceil(float64(t.numCallsPerBlock) * t.scaleFactor)) + targetCalls := t.numCallsPerBlock var callsToSend uint64 if uint64(pendingTxs) >= targetCalls { callsToSend = 0