Skip to content

trie/bintrie: fix overflow management in slot key computation - #33951

Merged
s1na merged 4 commits into
ethereum:masterfrom
gballet:fix-main-storage-key-computation
Mar 5, 2026
Merged

s1na merged 4 commits into
ethereum:masterfrom
gballet:fix-main-storage-key-computation

Conversation

@gballet

@gballet gballet commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

The computation of MAIN_STORAGE_OFFSET was incorrect, causing the last byte of the stem to be dropped. This means that there would be a collision in the hash computation (at the preimage level, not a hash collision of course) if two keys were only differing at byte 31.

@gballet gballet added this to the 1.17.2 milestone Mar 4, 2026
@gballet
gballet requested a review from rjl493456442 as a code owner March 4, 2026 12:22

@s1na s1na 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.

LGTM

@s1na
s1na merged commit a0fb810 into ethereum:master Mar 5, 2026
7 of 8 checks passed
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.

2 participants