Skip to content

fix: clean up flashblock settings and QoL features#168

Open
meyer9 wants to merge 6 commits intomainfrom
meyer9/fix-block-time-setting
Open

fix: clean up flashblock settings and QoL features#168
meyer9 wants to merge 6 commits intomainfrom
meyer9/fix-block-time-setting

Conversation

@meyer9
Copy link
Copy Markdown
Collaborator

@meyer9 meyer9 commented Feb 24, 2026

Description

Fixes flashblock and block time settings so the benchmark harness respects configurable block times instead of hardcoding 1-second blocks. Also fixes several bugs discovered while debugging CI failures.

Changes

Block time & flashblocks config

  • Configurable block time: Add top-level block_time field to BenchmarkConfig (parsed as a Go duration, default \"1s\"). Plumbed through ResolveTestRunsFromMatrixRunParams.BlockTime → consensus client and rollup config.
  • Configurable flashblocks block time: Add flashblocks.block_time config field (default \"250ms\"). Passed through RuntimeConfig to the builder client as --flashblocks.block-time.
  • Builder args: Pass --flashblocks.block-time and --rollup.chain-block-time to the builder binary.
  • Rollup config: GetRollupConfig now accepts blockTimeSec instead of hardcoding BlockTime: 1.
  • Sequencer benchmark: Sleep duration uses params.BlockTime instead of hardcoded 1000ms.
  • OP program benchmark: Passes blockTimeSec from params to NewOPProgramBenchmark.
  • CLI defaults: --root-dir defaults to ./data-dir and --output-dir defaults to ./output (no longer required flags).

Bug fixes (found while debugging CI)

  • Block time sleep bug: Fixed time.Sleep(time.Duration(params.BlockTime) * time.Second)time.Sleep(params.BlockTime). BlockTime is already a time.Duration, so the multiplication produced a ~31-year sleep, causing the benchmark to hang indefinitely after the final block.
  • --flashblocks.fixed removed: This flag no longer exists in base-builder and caused the binary to exit immediately with "unexpected argument" — making it look like an RPC connection failure.
  • Flashblocks block time format: Changed DefaultFlashblocksBlockTime from "250ms" to "250" — the builder binary expects plain milliseconds as an integer, not a Go duration string.
  • Reth cache step ID: Fixed id: cache-optimismid: cache-reth in _build-binaries.yaml. The mismatched ID meant the cache hit was never detected and reth was rebuilt from source (~20 min) on every CI run.
  • EL log dump on failure: On benchmark failure, the last 1 MB of the sequencer and validator el.log files are now printed inline to CI stdout. Previously, subprocess output was only available in expiring gzipped artifacts, making failures impossible to debug after ~30 days.

Testing

  • go build ./... passes
  • go test ./... passes (matrix_test.go updated to use explicit 1 * time.Second)
  • Full local repro: benchmark runs end-to-end (numSuccess=1 numFailure=0, 14 blocks built and validated)
  • CI passing on this branch

@meyer9 meyer9 force-pushed the meyer9/improve-gas-estimation branch from 1ac186b to fc32ba8 Compare February 25, 2026 17:49
Base automatically changed from meyer9/improve-gas-estimation to main February 27, 2026 15:33
@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented Feb 27, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@meyer9 meyer9 force-pushed the meyer9/fix-block-time-setting branch from d9c7ce9 to 94daed8 Compare March 27, 2026 18:33
@meyer9 meyer9 marked this pull request as ready for review March 27, 2026 18:52
@meyer9 meyer9 force-pushed the meyer9/fix-block-time-setting branch 2 times, most recently from 9676005 to 50b2f40 Compare April 6, 2026 18:23
@meyer9 meyer9 changed the title fix: flashblock and block time settings fix: clean up flashblock settings and QoL features May 4, 2026
meyer9 added 5 commits May 4, 2026 13:16
On failure, read the last 1MB of the sequencer and validator el.log
files and print them to CI stdout. This surfaces subprocess output
(reth/geth) that was previously only available in gzipped artifacts.
- Remove --flashblocks.fixed (flag no longer exists in base-builder)
- Change DefaultFlashblocksBlockTime from "250ms" to "250" (binary
  expects milliseconds as a plain integer, not a Go duration string)
- Fix time.Sleep(time.Duration(params.BlockTime) * time.Second) to
  time.Sleep(params.BlockTime) -- BlockTime is already a time.Duration
  so the multiplication produced a ~31-year sleep, causing the hang
@meyer9 meyer9 force-pushed the meyer9/fix-block-time-setting branch from 8c17f4c to 1ebd883 Compare May 4, 2026 20:17
Add aliases field to ChartConfig so each metric definition can list
legacy/alternate key names. ChartGrid resolves the first key that has
data, so old reports using reth_op_rbuilder_* names still render
alongside new reports using reth_base_builder_*_avg keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants