fix: batch simulator init txs to avoid receipt timeout#178
Merged
Conversation
Collaborator
✅ Heimdall Review Status
|
f549c89 to
190335c
Compare
Storage-reads and storage-update payloads require pre-initializing tens of thousands of storage slots before the benchmark run. Previously all init transactions were submitted in a single mineAndConfirm call, which waited on the receipt of the very last tx. At ~640k txs (storage-reads-full-block at 150M gas), this far exceeded the 240-second waitForReceipt retry window, causing Setup() to time out and all benchmark metrics to be zeroed. Fix: process init transactions in batches of 50, confirming each batch before submitting the next. Each batch settles in seconds, well within the timeout. Affected payloads (100% failure rate): storage-reads-full-block, storage-update-full-block, base-mainnet-simulation. Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
190335c to
ec85519
Compare
wlawt
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Storage-based simulator payloads (
storage-reads-full-block,storage-update-full-block,base-mainnet-simulation) have been failing with 100% failure rate since ~May 1. All benchmark metrics were zeroed out becauseSetup()never completed.Root cause:
mineAndConfirmsubmitted all initialization transactions in a single batch, then waited for the last receipt withwaitForReceipt(240 retries × 1s). At 150M gas limit,storage-reads-full-blockgenerates ~640,000InitializeStorageChunktxs — 2,538× the retry budget. The wait always timed out.storage-create-full-blockwas immune because itsNumStorageSlotsNeededis always zero (only creates new slots, never loads existing ones).Fix
Process init transactions in batches of
mineAndConfirmBatchSize = 50, confirming each batch before submitting the next. Each batch of 50 txs settles in seconds, comfortably within the 240s window.Validation
Ran a full devnet benchmark job (
devnet-benchmark-manual-1-q7kkc) onblockchain-core-public-devagainst the fixed binary. All threestorage-update-full-blockiterations (150M / 200M / 250M gas) completed in ~2 minutes each — vs. guaranteed timeout with the old code.storage-update-full-blockstorage-update-full-blockstorage-update-full-blockTests
Added unit tests in
worker_test.gocovering:Affected Payloads
storage-reads-full-block— 0/33 passing → fixedstorage-update-full-block— 12/45 passing → fixedbase-mainnet-simulation— 0/33 passing → fixed