docs(runbooks): add EVM gas-vs-execution-time benchmarking runbook#455
Conversation
Gives an engineer's agent a self-contained procedure for testing whether Sei's EVM gas schedule tracks real compute: personal single-validator + RPC-follower chain, differential-loop bytecode isolation, the privileged eBPF-attach gate on harbor's eng-<alias> namespaces, and concrete probe design against real seid/go-ethereum symbols. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PR SummaryLow Risk Overview The runbook documents two measurement paths: historical block replay (replayer at height It also adds a harbor eBPF privileged-attach gate (sign-off, scoped
Reviewed by Cursor Bugbot for commit 6140dd3. Bugbot is set up for automated code reviews on this repo. Configure here. |
…ayer/archive nodes Replaces the from-scratch synthetic genesis chain with the actual infra the gas-repricing project needs: a replayer-mode SeiNode restoring state at Y and replaying forward through block X (functionality 1), and an archive-backed path for arbitrary bytecode against state at Y (functionality 2). Confirms hardware parity with prod validators is already automatic via NodepoolForMode/nodepoolName/nodepoolArchive, cited against the controller source and both clusters' Karpenter config. Peer-reviewed with the systems-engineer agent, which traced Sei's OCC scheduler in sei-cosmos and found that per-tx timing correlation inside a replayed multi-tx block breaks under parallel/re-executed scheduling unless OCC is disabled for the measurement run (new §3a). Also fixed: Path A can't get eBPF timing off the shared archive node (not your node to instrument), and block-window detection must be continuous/post-hoc rather than reactive given ~25ms block-application windows during replay. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Adds
.agent/runbooks/benchmarking-evm-gas-vs-execution-time.mdfor the gas-repricing project: a self-contained procedure covering both target functionalities —Revision history on this PR: the first version (this PR's initial commit) proposed a from-scratch synthetic single-validator + RPC-follower genesis chain with fabricated state. After more context surfaced on what the actual environment needs to support, this was reworked entirely around real infrastructure:
replayer-modeSeiNode(spec.replayer.snapshot.s3.targetHeight) — the same real, documented state-restore-and-forward-replay mechanism behindvalidating-flatkv-memiavl-parity-via-sharded-replay.md— instead of synthesizing state from genesis. Verified gap: the existing replay/comparator tooling captures gas but has no timing field anywhere in any of its three comparison layers, which is the actual eBPF opportunity.eth_call+ state-override against an archive node (flagged as an unverified RPC capability — confirm before relying on it, since it isn't documented inoperating-archive-node-byov.mdor anywhere else in this repo), falling back to the original differential-loop bytecode technique against a private writable fork of real state-at-Y (rather than an empty synthetic chain).internal/platform/platform.go'sNodepoolForMode()plus identicalnodepoolName/nodepoolArchive/tolerationKeyconfig and Karpenter NodePool definitions (r6i/r7i, Nitro) between harbor and prod. Zero engineer-side configuration needed — just verify it (§2).Peer-reviewed collaboratively with the systems-engineer agent, which traced Sei's OCC scheduler in
sei-cosmos(app/abci.go,tasks/scheduler.go) and found that naive per-tx timing correlation breaks down inside a replayed multi-tx block under OCC's parallel/re-execution scheduling. Fix: disable OCC (occ-enabled = false,concurrency-workers = 1) on the replayer for the measurement run, which serializes execution without corrupting per-tx gas or compute (new §3a) — flaggedVERIFYpending confirmation that the SeiNode/seictl spec actually exposes those app.toml keys. Also caught: Path A can't get eBPF-grade timing off the shared archive node (not yours to instrument — the §6 privileged-attach gate applies), and that block-window detection during replay must be continuous/post-hoc rather than reactive, since a block's application window (~25ms at replay speed) commits before RPC/logs can report it.Retains the original PR's still-valid content: the governance-mutable
SSTOREgas trap, the differential-loop bytecode-crafting technique, the privileged eBPF-attach gate (verified against the platform repo:eng-<alias>namespaces enforce no Pod Security Standard today — an unhardened gap, not a green light), and symbol resolution against the realseid/go-ethereum fork (go.mod'sreplacedirective preserves the upstream import path in compiled symbols).Test plan
x/evm/types/params.go,internal/platform/platform.go, the platform PSS/NodePool/controller-config files) still say what's claimedocc-enabled/concurrency-workersapp.toml keys are actually exposed on the SeiNode/seictl render path (flagged VERIFY in §3a) before the team depends on themeth_call(flagged VERIFY in §4, Path A) before building a campaign on that assumption🤖 Generated with Claude Code