Skip to content

all: remove empty files#21254

Merged
yperbasis merged 1 commit into
mainfrom
yperbasis/empty_files
May 18, 2026
Merged

all: remove empty files#21254
yperbasis merged 1 commit into
mainfrom
yperbasis/empty_files

Conversation

@yperbasis

Copy link
Copy Markdown
Member

Summary

Remove 11 Go files and 1 readme that contain only a license header and package declaration, only commented-out code, or document a package that no longer exists. Follow-up to #19665.

Removed

  • cl/transition/impl/funcmap/impl.go — entire Impl struct/methods in a block comment; only file in the package; no external references.
  • cl/utils/time_test.go — both test bodies commented out.
  • cmd/rpcdaemon/graphql/graph/model/test.go — just package model.
  • cmd/sentinel/sentinelcli/flags/{flags,defaultFlags}.go — the whole package was empty (only these two files, neither imported anywhere).
  • common/log/skip.go — just package log.
  • db/integrity/receipts_no_duplicates_test.go — just package integrity.
  • db/kv/temporal/historyv2/{changeset.go,readme.md} — the package was intentionally removed in all: remove dead code and empty files #19665 but was accidentally re-introduced by a rebase artifact in execution: fix 37 failing state tests on stable shard #21124 (whose commit message is entirely about state-test fixes and never mentions historyv2); the codebase has zero references to it.
  • db/state/reconst.go — orphan package state declaration in a 66-file package.
  • execution/tracing/tracers/tracer.go — just package tracers; the sibling tracers.go is the real file.
  • execution/tracing/tracers/logger/logger2_test.go — test body fully commented out.

Intentionally kept

Several other files matched "empty-except-package-and-comments" but serve real purposes and were left alone:

  • doc.go files in common/log/v3/{,term/}, execution/rlp/, execution/vm/{,runtime/}, p2p/dnsdisc/, node/{,app/workerpool/}, rpc/ — godoc package documentation.
  • gen.go / mockgen.go / abi.go files in cmd/pics/contracts/, txnprovider/shutter/internal/contracts/, execution/tests/contracts/, execution/state/contracts/, rpc/jsonrpc/contracts/, execution/protocol/rules/aura/auraabi/, node/gointerfaces/{sentryproto,remoteproto,downloaderproto}///go:generate hosts.
  • node/interfaces/{,p2psentinel/,types/,web3/,downloader/,txpool/,execution/,p2psentry/,remote/}keep.go — package markers for the .proto-only sub-module rooted at node/interfaces/ (has its own go.mod).
  • execution/commitment/bin_patricia_hashed{,_test}.go — commented-out reference implementation worth preserving for future work.

Test plan

  • make erigon integration — clean build.
  • make lint0 issues.
  • CI green.

Remove 11 Go files and 1 readme that contain only a license header and
package declaration, only commented-out code, or document a package that
no longer exists. Follow-up to #19665.

- cl/transition/impl/funcmap/impl.go - entire Impl struct/methods in a
  block comment; only file in the package; no external references.
- cl/utils/time_test.go - both test bodies commented out.
- cmd/rpcdaemon/graphql/graph/model/test.go - just `package model`.
- cmd/sentinel/sentinelcli/flags/{flags,defaultFlags}.go - the whole
  package was empty (only these two files, neither imported anywhere).
- common/log/skip.go - just `package log`.
- db/integrity/receipts_no_duplicates_test.go - just `package integrity`.
- db/kv/temporal/historyv2/{changeset.go,readme.md} - the package was
  intentionally removed in #19665 but was accidentally re-introduced by
  a rebase artifact in #21124 (whose commit message is entirely about
  state-test fixes and never mentions historyv2); the codebase has zero
  references to it.
- db/state/reconst.go - orphan `package state` declaration in a 66-file
  package.
- execution/tracing/tracers/tracer.go - just `package tracers`; the
  sibling `tracers.go` is the real file.
- execution/tracing/tracers/logger/logger2_test.go - test body fully
  commented out.

Intentionally kept: doc.go files (godoc), gen.go/mockgen.go/abi.go
(//go:generate hosts), node/interfaces/*/keep.go (sub-module package
markers), and execution/commitment/bin_patricia_hashed{,_test}.go
(commented-out reference implementation worth preserving).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes a set of effectively-empty/orphaned source files (license+package only, or fully commented-out code/tests) and one README for a package that is no longer present, keeping the tree consistent after earlier dead-code cleanup work.

Changes:

  • Delete 11 Go files that were empty placeholders or contained only commented-out code/tests.
  • Remove the stale db/kv/temporal/historyv2/ README and leftover package stub.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cl/transition/impl/funcmap/impl.go Removes an entirely commented-out implementation; package directory no longer needed.
cl/utils/time_test.go Removes commented-out tests.
cmd/rpcdaemon/graphql/graph/model/test.go Removes empty package stub; package has real model files.
cmd/sentinel/sentinelcli/flags/flags.go Removes empty flags package stub (unused).
cmd/sentinel/sentinelcli/flags/defaultFlags.go Removes empty flags package stub (unused).
common/log/skip.go Removes empty common/log package stub (repo uses common/log/v3).
db/integrity/receipts_no_duplicates_test.go Removes empty test file stub.
db/kv/temporal/historyv2/changeset.go Removes leftover historyv2 package stub.
db/kv/temporal/historyv2/readme.md Removes stale documentation for removed historyv2 package.
db/state/reconst.go Removes orphan package state stub file.
execution/tracing/tracers/tracer.go Removes redundant empty file; tracers package remains backed by tracers.go etc.
execution/tracing/tracers/logger/logger2_test.go Removes fully commented-out test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yperbasis yperbasis added this pull request to the merge queue May 18, 2026
Merged via the queue into main with commit 30954c9 May 18, 2026
73 checks passed
@yperbasis yperbasis deleted the yperbasis/empty_files branch May 18, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants