Skip to content

execution/commitment: drop dead accessors and a vestigial parameter - #23185

Merged
AskAlexSharov merged 4 commits into
mainfrom
awskii/cmt-dead-code
Aug 12, 2026
Merged

execution/commitment: drop dead accessors and a vestigial parameter#23185
AskAlexSharov merged 4 commits into
mainfrom
awskii/cmt-dead-code

Conversation

@awskii

@awskii awskii commented Aug 11, 2026

Copy link
Copy Markdown
Member

Three unreferenced things in the commitment package, found while auditing the parallel path.

Changes

  • cell.GetAccountAddr / cell.GetStorageAddr — no reference anywhere, including tests.
  • CompactKey — no reference anywhere, including tests.
  • collectDeleteUpdate's evictCache parameter — State Cache Consolidation (PR #1 of the perf stack) #21380 removed the hph.cache.EvictBranch call it gated when the trie stopped owning a cache, leaving the parameter unread and its docstring describing eviction that no longer happens. All three call sites passed true. EvictBranch no longer exists in the tree, so the invalidation moved rather than being lost.

- cell.GetAccountAddr / cell.GetStorageAddr: no reference anywhere,
  including tests.
- CompactKey: no reference anywhere, including tests.
- collectDeleteUpdate's evictCache parameter: #21380 removed the
  hph.cache.EvictBranch call it gated when the trie stopped owning a cache,
  leaving the parameter unread and its docstring describing eviction that no
  longer happens. All three call sites passed true. EvictBranch no longer
  exists in the tree, so nothing moved rather than being lost.

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

This PR cleans up the execution/commitment package by removing unused accessors/helpers and simplifying an internal API after the cache-ownership changes introduced in the parallel-path audit.

Changes:

  • Removed dead cell accessors (GetAccountAddr, GetStorageAddr) from the trie reader.
  • Removed the unreferenced CompactKey helper (and its now-unused errors import).
  • Dropped the vestigial evictCache parameter from HexPatriciaHashed.collectDeleteUpdate and updated all call sites accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
execution/commitment/trie_reader.go Removes unused cell address accessor methods.
execution/commitment/streaming_deep_fold.go Updates collectDeleteUpdate call to match the simplified signature.
execution/commitment/keys_nibbles.go Removes unreferenced CompactKey helper and cleans up imports.
execution/commitment/hex_patricia_hashed.go Simplifies collectDeleteUpdate signature and updates internal callers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread execution/commitment/hex_patricia_hashed.go Outdated
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Aug 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 11, 2026
# Conflicts:
#	execution/commitment/trie_reader.go
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit f72b646 Aug 12, 2026
133 checks passed
@AskAlexSharov
AskAlexSharov deleted the awskii/cmt-dead-code branch August 12, 2026 08:25
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.

3 participants