getStorageAt from empty cell now returns 0x0 instead of null #1482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
JSON RPC method
eth_getStorageAt
now returns0x0
instead of null if the storage cell to be retrieved is empty (the default value is then zero)Motivation and Context
Returning null riases some issues with the ecosystem, ie
geth
console and other integration toolsHow Has This Been Tested?
Adding code tests, and manually
Types of changes
Checklist:
Please, we need more info about other
getStorageAt
compatibility. For example, our implementation returns0x0000000000000000000000000000000000000000000000000000000000000001
when the storage cell contains the value ONE, butganache
returns0x01
. Is it an issue? Which is the value returned bygeth
and other implementations? Maybe they expect0x1
as in other cases (with leading zeroes removed)