fix: use exact-key for MemoryLocationHash instead of u64 to defend ha…#517
fix: use exact-key for MemoryLocationHash instead of u64 to defend ha…#517phuocthanhdo wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
benchmark |
There was a problem hiding this comment.
Code Review
This pull request replaces the u64 type alias for MemoryLocationHash with a dedicated struct containing both the precomputed u64 hash and the underlying MemoryLocation. This prevents hash collisions (aliasing) by implementing custom PartialEq and Hash traits that compare the full location on hash hits while preserving the fast u64 path for distinct locations. Corresponding updates are made to MemoryLocation (deriving Copy), hash_deterministic, get_rewards signatures, and the initial from_hash value in vm.rs. There are no review comments, so no additional feedback is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
✅ Gigagas benchmark for commit 4519033 Detail |
|
✅ Mainnet benchmark for commit 4519033 This pr: Detail |
…sh collision