Conversation
|
Claude finished @cicr99's task in 10m 51s —— View job Review complete
Summary: This is a clean, mechanical refactor. Verified:
Note: I wasn't able to actually execute No bugs, concurrency issues, or correctness regressions found. Nothing to flag as blocker/important. One nit-level observation only: Nit: |
Standalone PR ReviewPR-Agent could not safely update the persistent review. This standalone result will not replace the canonical review. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4084 +/- ##
==========================================
- Coverage 79.47% 79.37% -0.11%
==========================================
Files 466 466
Lines 36015 36011 -4
==========================================
- Hits 28623 28583 -40
- Misses 7383 7419 +36
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude finished @cicr99's task in 9m 56s —— View job Review complete
Summary: This is a clean, mechanical refactor with no behavioral changes.
Verified:
No bugs, concurrency issues, or correctness regressions found. Nit: |
User description
This PR refactors trie proof generation so the single-key Prove method delegates to the shared multi-key proof traversal.
ProveMulti is now the primary implementation for proof generation in both trie implementations, while Prove remains as a compatibility wrapper for existing single-key callers.
Old Prove logic was moved for testing purposes.
This PR also includes some cleanup regarding variable and method naming, and general organization of the file.
RPC v8 note
RPC v8 is close to being removed, so this PR intentionally avoids changing that folder. Because v8 still has single-key proof call sites, Prove is kept for now as a compatibility wrapper. Once v8 is removed and remaining callers are migrated, we can revisit whether ProveMulti should become the main public proof API or whether the single-key wrapper can be removed.
PR Type
Enhancement, Tests
Description
Refactor
Proveto delegate toProveMultiin bothcore/trieandcore/trie2packagesRename variables/methods in
proof.gotraversal logic for clarity (cur→currentKey,knownChildren→knownStorageNodes,binaryProofNode→createBinaryProofNode,proofNode→readProofNode,shouldSkipMultiProofNode→isEndOfBranchReached)Reorganize
ensureNoUnhashedWritesplacement inproof.goAdd
prove_legacy_test.goto verify newProvematches legacy single-key proof logicRename local variables (
tr/t) to more descriptive names inrpc/v9andrpc/v10storage proof handlersFile Walkthrough
proof.go
Simplify Prove via ProveMulti and rename internalscore/trie/proof.go
Provenow delegates toProveMultiwith a single-key slice instead ofduplicating traversal logic
ensureNoUnhashedWritesbelowProveMulticur→currentKey,shouldSkipMultiProofNode→isEndOfBranchReached,proofNode→readProofNode,knownChildren→knownStorageNodes,binaryProofNode→createBinaryProofNode,tri→trieproof.go
Simplify Prove to use ProveMulticore/trie2/proof.go
Provenow delegates toProveMultiwith a single-key slice instead ofcustom traversal implementation
prove_legacy_test.go
Add regression test comparing Prove to legacy logiccore/trie/prove_legacy_test.go
Proveimplementation matches legacysingle-key proof logic
proveLegacyForTesthelper reimplementing old proof traversalrequireProofNodeSetEqualForTesthelper to compare proof nodesets by hash and string
storage.go
Rename trie variables for clarityrpc/v10/storage.go
tr/tto more descriptive names (trieReader,stateTrie,contractTrie,storageTrie) for readabilitystorage.go
Rename trie variables for clarityrpc/v9/storage.go
tr/tto more descriptive names (trieReader,stateTrie,contractTrie,storageTrie) for readability