Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-service: support storage key RPC response with <32 bytes #12576

Conversation

meyer9
Copy link
Contributor

@meyer9 meyer9 commented Oct 22, 2024

Description

Supports truncated storage keys (0x123 instead of 0x0000...000123) which can be returned by geth or reth if a truncated key is passed in. reth always returns truncated keys currently which is incorrect behavior and will be fixed. Even when fixed, truncated keys will still be returned if truncated keys are passed, so this type is incorrect regardless.

Geth uses a string here, but hexutils.Big will ensure the key is always <= 32 bytes.

Tests

Added a test to ensure unmarshalling truncated storage key works.

Additional context

Discord conversation with reth contributors: https://discord.com/channels/1244729134312198194/1244729507588608040/1298354265294770196

@meyer9 meyer9 force-pushed the meyer9/fix/account-proof-storage-key-type branch from 1703d7c to ba32a7c Compare October 22, 2024 19:30
@meyer9 meyer9 marked this pull request as ready for review October 22, 2024 19:50
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Spec does say these are QUANTITY values so they should actually be truncated, but that doesn't normally seem to be the case. Being flexible about the parsing makes sense.

@ajsutton ajsutton added this pull request to the merge queue Oct 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 23, 2024
@ajsutton ajsutton added this pull request to the merge queue Oct 23, 2024
Merged via the queue into ethereum-optimism:develop with commit 93f5d41 Oct 23, 2024
47 checks passed
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
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.

2 participants