docs: add the block-building benchmark design plan - #594
Conversation
🤖 Kimi Code ReviewReview of PR #594 — Block Building Benchmark Plan Overall Assessment: Well-structured design document with clear milestones. Several implementation details need correction before M2/M3 to avoid performance overhead and consensus risks. Critical Issues1. Incorrect RocksDB constraint (Section: Harness design)
2. Mock crypto safety boundary (Section: Harness design)
Consensus & Security Concerns3. Determinism guarantees (M1 deliverables)
4.
Performance & Correctness5. Histogram sampling thread safety (Phase capture section)
6. Datadir consistency during copy (Replay mode)
Code Quality7. CLI token dispatch fragility (CLI section)
8. XMSS key window validation (Keys section)
Minor Suggestions9. Schema versioning (Report section)
10. Memory backend cleanup (Synthetic corpus)
11. Error handling in synchronous main (CLI section)
SummaryThe plan is architecturally sound but Item 1 (RocksDB read-only) eliminates a major performance bottleneck in replay mode. Item 3 (determinism) is critical for the "identical block-root sequences" verification gate to be meaningful across different machines. Address these before M2 implementation. The Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Codex Code ReviewFindings:
No executable code is changed in this PR, so I don’t have code-correctness, security, memory-safety, or consensus-behavior findings beyond the documentation accuracy issues above. Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
🤖 Claude Code ReviewReview:
|
2e66c63 to
c443f6b
Compare
"Optimize block building" (#465) is the top roadmap item, but the only observability today is Prometheus histograms on a live devnet: noisy, not reproducible, and unable to compare an optimization against a baseline. Records the design of an offline `ethlambda benchmark` sub-command ahead of the implementation, so the parts worth arguing about are on the table before there is code to argue around: what is inside the measured span and what is deliberately outside it, how per-phase attribution reuses the existing block-proposal histogram rather than adding hot-path instrumentation, why outliers are never auto-discarded, how the CLI gains a second entry point without disturbing the flat node invocation every deployment uses, and which workloads land in which milestone.
c443f6b to
346832e
Compare
🗒️ Description / Motivation
"Optimize block building" (#465) is the top roadmap item, but the only observability today
is Prometheus histograms on a live devnet: noisy, not reproducible, and unable to compare
an optimization against a baseline.
This records the design of an offline
ethlambda benchmarksub-command ahead of theimplementation, so the parts worth arguing about are on the table before there is code
to argue around. First of a three-PR series (see below); nothing here changes behavior.
What Changed
docs/plans/block-building-benchmark.mdWhat is worth reviewing
publish, slot-alignment sleep, block import) — the same boundary as the node's own
time_block_buildingmetric.lean_block_proposal_attestation_build_phase_secondshistogram accumulates exact f64sums, observed once per phase per build, so the harness can delta the per-label sums
between iterations instead of adding instrumentation.
OTS window advancement produce legitimate tails — and a CV above 10% is flagged rather
than smoothed.
invocation the Dockerfile, lean-quickstart, the hive shim and the devnet skills all use,
and why the clap-native
subcommand_negates_reqsapproach was rejected.replay-from-datadir.
Correctness / Behavior Guarantees
Documentation only.
Tests Added / Run
None; no code changes.
Related Issues / PRs
nodesub-command for running the node #591 (CLI seam) and the two PRs that follow it✅ Verification Checklist
make fmt— cleanmake lint(clippy with-D warnings) — cleanmake test(cargo test --workspace --profile release-fast) — all passing