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

The slot parameter of eth_getStorageAt should accept hex encoded unsigned integers #2230

Closed
fvictorio opened this issue Jan 8, 2022 · 7 comments
Assignees

Comments

@fvictorio
Copy link
Member

We are expecting the storage slot parameter of getStorageAt to be a QUANTITY, but the spec says that the parameter should be:

title  hex encoded unsigned integer
type  string
pattern  ^0x[0-9a-f]{64}$

Notice that the value should have a length of 64, but we'll reject many of those (because values with leading zeros are not a valid QUANTITY)

I don't know if we can start rejecting shorter values though. On one hand, we try to be as spec-compliant as possible, but in the other hand that would be a breaking change.

@meetmangukiya
Copy link

Maybe we should just support pattern ^0x[0-9a-f]{0,64}$ until next major version update so we cover all the cases while also fixing the current bug?

@meetmangukiya
Copy link

@fvictorio is there any easy workaround known for this for now until this gets fixed? Turn off the validation somehow?

@fvictorio
Copy link
Member Author

@meetmangukiya no workaround AFAIK, but I'll try to get this prioritized.

@RomiRand
Copy link

Bump, I'd love to see this fixed 🙂

@fvictorio
Copy link
Member Author

We are working on a set of helpers that should make this kind of stuff way easier and less error-prone. We are going to release it in the coming weeks.

@brockelmore
Copy link

Did #2581 close this?

@fvictorio
Copy link
Member Author

Yes! Thanks for the reminder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants