Skip to content

chore: remove dead code#3384

Merged
tac0turtle merged 1 commit into
mainfrom
marko/remove-dead-code
Jul 15, 2026
Merged

chore: remove dead code#3384
tac0turtle merged 1 commit into
mainfrom
marko/remove-dead-code

Conversation

@tac0turtle

@tac0turtle tac0turtle commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Overview

Removes code that is unreachable from any binary or test, verified with whole-program reachability analysis (golang.org/x/tools/cmd/deadcode across all workspace modules), staticcheck -checks U1000, and cross-checked against integration-tagged tests (//go:build integration), the test/e2e / test/docker-e2e modules, 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): PostTxCmd was added in feat(evm): add force inclusion command #2888 but never registered in apps/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: handleChainID was never routed — the JSON-RPC switch only handles eth_sendRawTransaction, and eth_chainId falls through to the execution RPC proxy, so behavior is unchanged.
  • apps/testapp/kv/http_server.go: HTTPServer.Stop is redundant — Start(ctx) already performs a graceful Shutdown on context cancellation, and nothing calls Stop.
  • node/helpers.go: MockTester has no users anywhere (the rest of the file is kept — it is used by the integration-tagged tests).
  • pkg/da/types/types.go: SplitID is a dead duplicate of pkg/da/jsonrpc.SplitID, which is the copy used by block/internal/da and downstream by ev-metrics.
  • pkg/store/kv.go: GetPrefixEntries has no callers.

Deliberately not removed despite being unreachable in-repo: types.HeaderFromContext, config.LoadFromViper, test/testda, execution/evm/test_helpers.go, types.NewSigner, and pkg/rpc/client — all are used by downstream repos or the e2e test modules.

Verification

  • go build ./... and go vet ./... on root, apps/evm, apps/testapp
  • go vet -tags integration ./node/... (compiles the integration tests that use node/helpers.go)
  • Full root-module go test ./... green; apps/evm/server and apps/testapp/kv tests green
  • golangci-lint run on all touched packages: no new issues (removes one pre-existing unused finding)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Removed Features
    • Removed the post-tx command for submitting signed transactions for forced inclusion.
    • Removed local handling for chain ID requests in the force-inclusion service.
    • Removed the test app’s HTTP server shutdown helper.
    • Removed unused datastore, identifier, and test utility helpers.

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>
@github-actions

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed⏩ skippedJul 15, 2026, 10:05 AM

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 73434f0a-acf4-48f1-8c00-7d12ae1cc1ec

📥 Commits

Reviewing files that changed from the base of the PR and between dd99033 and cbc859f.

📒 Files selected for processing (6)
  • apps/evm/cmd/post_tx_cmd.go
  • apps/evm/server/force_inclusion.go
  • apps/testapp/kv/http_server.go
  • node/helpers.go
  • pkg/da/types/types.go
  • pkg/store/kv.go

📝 Walkthrough

Walkthrough

This change removes the EVM post-tx command, local chain ID handling, datastore and DA helper functions, the test HTTP server shutdown method, and the MockTester test utility.

Changes

Obsolete API and helper removal

Layer / File(s) Summary
EVM command and RPC cleanup
apps/evm/cmd/post_tx_cmd.go, apps/evm/server/force_inclusion.go
Removes the post-tx command and its transaction submission helpers, plus local eth_chainId handling from the force-inclusion server.
Shared helper API cleanup
pkg/da/types/types.go, pkg/store/kv.go
Removes SplitID and GetPrefixEntries, along with imports used only by those helpers.
Test support cleanup
apps/testapp/kv/http_server.go, node/helpers.go
Removes the HTTP server Stop() method and the MockTester type with its logging and failure methods.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: randygrok

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch marko/remove-dead-code

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tac0turtle tac0turtle merged commit 67b2dbc into main Jul 15, 2026
23 of 24 checks passed
@tac0turtle tac0turtle deleted the marko/remove-dead-code branch July 15, 2026 10:06
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.34%. Comparing base (dd99033) to head (cbc859f).
⚠️ Report is 1 commits behind head on main.

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              
Flag Coverage Δ
combined 62.34% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant