-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
eth_getProof
does not support short storage keys
#2046
Comments
yeh seems like the consensus is that they are quantity however the spec does not mention that: I remember that this was incredibly annoying in anvil as well, and we eventually settled on H256, but can't remember the details. how does geth deserialize the keys? |
It looks like they are strings for both They are then deserialized with a |
I see, we need a compatible deserialize function for this then |
Hmmm, given this: + "key": "0x01", The |
Describe the bug
The
rpc-compat
testeth_getProof/get-account-proof-with-storage
fails with the following error:This is because our keys are
H256
:reth/crates/rpc/rpc-api/src/eth.rs
Lines 241 to 249 in 195d781
The input storage key is
0x01
, which I guess should represent the following entry from the test'sgenesis.json
:https://github.com/ethereum/execution-apis/blob/3e381a7b32c105f1aa62086b9bdcab57d8e3427c/tests/genesis.json#L38
Maybe the storage keys should be
U256
, if its deserialization trims trailing zeros. We would then need to convert back into aH256
for the state providerproof
method:reth/crates/storage/provider/src/traits/state.rs
Lines 22 to 24 in 195d781
We would also need to make sure the key shows up as
"key": "0x01"
in the response.Steps to reproduce
Run hive:
Node logs
No response
Platform(s)
No response
What version/commit are you on?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: