You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Storage cache: Use HashMap, group by ContractId - #1010
Medium Risk
Touches core interpreter storage caching that affects hot/cold read behavior and gas determinism; while mostly a data-structure refactor, incorrect cache updates could change gas charges or storage results.
Overview
Refactors the VM storage_slot_cache from a single BTreeMap<(ContractId, Bytes32), ...> into a nested HashMap<ContractId, HashMap<Bytes32, ...>>, updating all storage read/write/clear paths to use the new grouped layout.
Updates reset_vm_state to correctly reconcile cached storage slots when applying diffs (overwrite stale cached values, convert stale present values to warm-absent None, and preserve cold-absent slots as uncached), and adjusts the diff tests accordingly. Adds a changelog entry documenting the cache change.
Reviewed by Cursor Bugbot for commit 1efdec5. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes storage cache smaller and faster.
Checklist
Before requesting review