chore: remove dead code#3384
Conversation
Remove code unreachable from any binary, test (including integration-tagged tests), or known downstream consumer: - apps/evm/cmd/post_tx_cmd.go: PostTxCmd was added in #2888 but never registered in the CLI; ev-abci carries its own copy - apps/evm/server: handleChainID was never routed; eth_chainId falls through to the execution RPC proxy - apps/testapp/kv: HTTPServer.Stop is redundant, Start already shuts down via context cancellation - node: MockTester has no users - pkg/da/types: SplitID duplicates pkg/da/jsonrpc.SplitID, which is the copy in use - pkg/store: GetPrefixEntries has no callers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis change removes the EVM ChangesObsolete API and helper removal
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3384 +/- ##
==========================================
+ Coverage 62.26% 62.34% +0.07%
==========================================
Files 121 120 -1
Lines 13439 13425 -14
==========================================
+ Hits 8368 8370 +2
+ Misses 4132 4116 -16
Partials 939 939
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Overview
Removes code that is unreachable from any binary or test, verified with whole-program reachability analysis (
golang.org/x/tools/cmd/deadcodeacross all workspace modules),staticcheck -checks U1000, and cross-checked against integration-tagged tests (//go:build integration), thetest/e2e/test/docker-e2emodules, and downstream consumers (ev-abci, go-execution-abci, apex, ev-metrics, ev-toolbox).289 deletions, 0 additions:
apps/evm/cmd/post_tx_cmd.go(entire file):PostTxCmdwas added in feat(evm): add force inclusion command #2888 but never registered inapps/evm/main.go, so it never shipped in the CLI. ev-abci carries its own independent copy and does not import this one.apps/evm/server/force_inclusion.go:handleChainIDwas never routed — the JSON-RPC switch only handleseth_sendRawTransaction, andeth_chainIdfalls through to the execution RPC proxy, so behavior is unchanged.apps/testapp/kv/http_server.go:HTTPServer.Stopis redundant —Start(ctx)already performs a gracefulShutdownon context cancellation, and nothing callsStop.node/helpers.go:MockTesterhas no users anywhere (the rest of the file is kept — it is used by the integration-tagged tests).pkg/da/types/types.go:SplitIDis a dead duplicate ofpkg/da/jsonrpc.SplitID, which is the copy used byblock/internal/daand downstream by ev-metrics.pkg/store/kv.go:GetPrefixEntrieshas no callers.Deliberately not removed despite being unreachable in-repo:
types.HeaderFromContext,config.LoadFromViper,test/testda,execution/evm/test_helpers.go,types.NewSigner, andpkg/rpc/client— all are used by downstream repos or the e2e test modules.Verification
go build ./...andgo vet ./...on root,apps/evm,apps/testappgo vet -tags integration ./node/...(compiles the integration tests that usenode/helpers.go)go test ./...green;apps/evm/serverandapps/testapp/kvtests greengolangci-lint runon all touched packages: no new issues (removes one pre-existingunusedfinding)🤖 Generated with Claude Code
Summary by CodeRabbit
post-txcommand for submitting signed transactions for forced inclusion.