Skip to content

Commit 415e691

Browse files
authored
Remove the unused app/benchmark harness and benchmark scripts (#4673)
`app/benchmark` is an in-node load generator that only runs in a `seid` built with the `benchmark` tag (`make install-bench`). It builds synthetic blocks and hands them out on `Manager.ProposalChannel`, and `benchmark/` holds the shell scripts and scenario JSON that drive it. On main nothing outside its own test reads that channel, so even a tagged build generates blocks that are never proposed. Nothing builds or runs it either: no CI workflow, Makefile caller, image or test references either directory. External RPC load is generated by sei-load, and in-process executor ceilings are measured with `giga/evmonly/cmd/evmonly-loadtest`, which uses neither. It is also the last thing holding sei-chain's sei-load pin at v0.0.1, because it imports generator APIs that sei-load has since removed. This removes `app/benchmark`, `benchmark/`, the `App` hooks that fed it (`InitBenchmark`, the block-timing and receipt hooks in `ProcessProposalHandler`/`FinalizeBlocker`, `RecordBenchmarkCommitTime` in `Commit`), the `benchmarkEnabled` build-tag constants in `app` and `sei-tendermint/types` (the latter was never read), the `install-bench` target and the root `AGENTS.md` pointer to the deleted guide. `mock_balances` and `make install-mock-balances` stay, since the nightly images build with them. There is no consensus or state impact. In a default build `benchmarkEnabled` was false, so the manager was nil and every removed hook already returned without doing anything. `go build ./...`, `go build -tags mock_balances ./cmd/seid`, `make fmtcheck`, golangci-lint on the touched packages and the `app` tests pass. `go mod tidy` changes nothing, so bumping the sei-load pin is a separate PR.
1 parent 612b4a4 commit 415e691

24 files changed

Lines changed: 0 additions & 2493 deletions

‎AGENTS.md‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,3 @@ Size from the peak each run reports.
213213
- Each worktree gets its own volume, so parallel agents do not collide. Within one
214214
worktree only one run at a time: a second is refused, because both would share the
215215
volume and wipe each other's scratch directories.
216-
217-
## Benchmarking
218-
219-
See [`benchmark/AGENTS.md`](benchmark/AGENTS.md) for benchmark usage, environment
220-
variables, and comparison workflows.

‎Makefile‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ ldflags := $(strip $(ldflags))
8989
# BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' -race
9090
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
9191
BUILD_FLAGS_MOCK_BALANCES := -tags "$(build_tags) mock_balances" -ldflags '$(ldflags)'
92-
BUILD_FLAGS_BENCHMARK := -tags "$(build_tags) benchmark mock_balances" -ldflags '$(ldflags)'
9392

9493
#### Command List ####
9594

@@ -101,9 +100,6 @@ install: go.sum
101100
install-mock-balances: go.sum
102101
go install $(BUILD_FLAGS_MOCK_BALANCES) ./cmd/seid
103102

104-
install-bench: go.sum
105-
go install $(BUILD_FLAGS_BENCHMARK) ./cmd/seid
106-
107103
install-with-race-detector: go.sum
108104
go install -race $(BUILD_FLAGS) ./cmd/seid
109105

‎app/abci.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ func (app *App) Commit(ctx context.Context) (res *abci.ResponseCommit, err error
303303
elapsed := time.Since(start)
304304
// legacy: telemetry.MeasureSince in sei-cosmos/baseapp/abci.go TODO(PLT-353)
305305
appMetrics.commitDuration.Record(ctx, elapsed.Seconds())
306-
app.RecordBenchmarkCommitTime(elapsed)
307306
// After a successful Commit, publish the pending committed-block
308307
// event stashed by FinalizeBlocker. newHeads and newBlockFilter
309308
// see only committed state.

‎app/app.go‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ import (
9595

9696
"github.com/gogo/protobuf/proto"
9797
appante "github.com/sei-protocol/sei-chain/app/ante"
98-
"github.com/sei-protocol/sei-chain/app/benchmark"
9998
"github.com/sei-protocol/sei-chain/app/legacyabci"
10099
"github.com/sei-protocol/sei-chain/app/migration"
101100
appparams "github.com/sei-protocol/sei-chain/app/params"
@@ -131,7 +130,6 @@ import (
131130
"github.com/sei-protocol/sei-chain/x/evm"
132131
evmante "github.com/sei-protocol/sei-chain/x/evm/ante"
133132
"github.com/sei-protocol/sei-chain/x/evm/blocktest"
134-
evmconfig "github.com/sei-protocol/sei-chain/x/evm/config"
135133
evmkeeper "github.com/sei-protocol/sei-chain/x/evm/keeper"
136134
"github.com/sei-protocol/sei-chain/x/evm/querier"
137135
"github.com/sei-protocol/sei-chain/x/evm/replay"
@@ -430,8 +428,6 @@ type App struct {
430428

431429
txPrioritizer sdk.TxPrioritizer
432430

433-
benchmarkManager *benchmark.Manager
434-
435431
// GigaExecutorEnabled controls whether to use the Giga executor.
436432
GigaExecutorEnabled bool
437433
// GigaOCCEnabled controls whether to use OCC with the Giga executor
@@ -891,12 +887,6 @@ func New(
891887
app.SetAnteHandler(anteHandler)
892888
app.SetMidBlocker(app.MidBlocker)
893889

894-
// benchmarkEnabled is enabled via build flag (make install-bench)
895-
if benchmarkEnabled {
896-
evmChainID := evmconfig.GetEVMChainID(app.ChainID).Int64()
897-
app.InitBenchmark(context.Background(), app.ChainID, evmChainID)
898-
}
899-
900890
app.SetProcessProposalHandler(app.ProcessProposalHandler)
901891
app.SetFinalizeBlocker(app.FinalizeBlocker)
902892
app.SetInplaceTestnetInitializer(app.inplacetestnetInitializer)
@@ -1127,9 +1117,6 @@ func (app *App) ClearOptimisticProcessingInfo() {
11271117
}
11281118

11291119
func (app *App) ProcessProposalHandler(ctx sdk.Context, req *abci.RequestProcessProposal) (resp *abci.ResponseProcessProposal, err error) {
1130-
// Start block processing timing (ends at FinalizeBlock)
1131-
app.StartBenchmarkBlockProcessing()
1132-
11331120
typedTxs, err := app.DecodeTxBytesConcurrently(ctx.Context(), req.Txs)
11341121
if err != nil {
11351122
appMetrics.failedGasWantedCheck.Add(ctx.Context(), 1,
@@ -1231,10 +1218,6 @@ func (app *App) FinalizeBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock)
12311218
app.ClearOptimisticProcessingInfo()
12321219
duration := time.Since(startTime)
12331220
logger.Info("FinalizeBlock complete", "took-ms", duration/time.Millisecond)
1234-
// End block processing timing (started at ProcessProposal)
1235-
app.EndBenchmarkBlockProcessing()
1236-
// Process receipts for benchmark deployment tracking
1237-
app.ProcessBenchmarkReceipts(ctx)
12381221
}()
12391222

12401223
// Get all optimistic processing info atomically

‎app/benchmark.go‎

Lines changed: 0 additions & 99 deletions
This file was deleted.

‎app/benchmark/benchmark.go‎

Lines changed: 0 additions & 98 deletions
This file was deleted.

‎app/benchmark/config.go‎

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)