-
Notifications
You must be signed in to change notification settings - Fork 249
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
fix: deserialization of null storage keys in AccessListItem #955
fix: deserialization of null storage keys in AccessListItem #955
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supportive, the spec does not properly specify this but I think it's reasonable to interpret null as [].
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty
Thank you for your reviews! What timeline do alloy releases normally follow? |
likely when we have #950 in |
This PR unfortunately makes it so all types inheriting I think a good solution could be to instead make the type I could make a PR to fix this if that sounds good @mattsse? |
hey @Wodann please remind me, why should a null value be supported? I believe a storagekey field should always be required: |
Historically, Hardhat allows specification of the null value in storage keys to signal the same thing as an empty array of storage keys. It could very well be that the spec has changed since. If this change is causing issues, we're happy to perform a breaking change in Hardhat's JSON-RPC spec. |
We decided to remove support for |
…#955) * fix: deserialization of null storage keys in AccessListItem * test: add test * misc: apply review suggestions * Update crates/eips/src/eip2930.rs Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * misc: apply review suggestion --------- Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
…y-rs#955 (alloy-rs#1058) * fix: broken bincode serialization from alloy-rs#955 * remove optional in alloy-serde * resolve matt's comments * get rid of broken test * fix cargo fmt * enforce storage key --------- Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
…y-rs#955 (alloy-rs#1058) * fix: broken bincode serialization from alloy-rs#955 * remove optional in alloy-serde * resolve matt's comments * get rid of broken test * fix cargo fmt * enforce storage key --------- Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Motivation
We recently adopted the
AccessList
andAccessListItem
types for EDR/Hardhat. This fixes an issue when deserializing anAccessListItem
where thenull
value for storage keys was not accepted.Solution
Added a custom serde deserialization handler.
PR Checklist