-
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
Inconsistent debug_storageRangeAt
behavior
#14186
Comments
@AskAlexSharov this seems a minor issue |
@Wollac Erigon doesn't store hashed state (where keys are hashed). So, we can't iterate by hashed state keys in sorted order. Can only iterate by preimages (plain state). and in Deep reason is: actually Ethereum blocks execution doesn't require hashed state - and Erigon executing blocks on plain state. "Hashed state" only exists in Merkle tree root calculation spec and we using it only there. |
hmm... we of-course can hack empty key for compatibility... why not... let me take a look. |
but no. order will not match anyway - even if we start from same key as geth. |
@awskii do you think we can do this by looking at |
@AskAlexSharov I ran into this issue as some RPC providers were using Geth or Erigon to process |
Yes, but maybe we can user-understandable error for next 2 cases:
And support only next cases:
|
VBulikov added Imp2 as Importance |
System information
v3.0.0-rc.3
Expected behaviour
The
debug_accountRange
RPC call should be consistent with Geth and behave as follows:blockNrOrHash
start
maxResults
nocode
nostorage
incompletes
start
parameter is the hashed address (i.e. its hexadecimal representation).address
andkey
(which is the hash of the address).This behaviour appears to be related to #12726.
For example, executing the following command on Geth:
returns a response similar to:
In this example,
keccak(0xbb0588062f133b31d4665e10c145888850cb686c) = 0x01f9eab6ce456de98d44b5351258dfc60630594a62e80f0c82744c0df9b848cc
which is the closest such hash to the zero hash.
If the
incompletes
flag is set totrue
, Geth will also return accounts from the MPT for which it does not know the address (denoted bypre(...)
in the map key).Actual behaviour
When calling:
on Erigon, the response is similar to:
Here, Erigon returns accounts starting with the address closest to zero, and the additional details (such as the actual account
address
and its correspondingkey
) are missing.Steps to reproduce the behaviour
v3.0.0-rc.3
) on your system.curl
command with the parameters:See the Erigon command example above for further details.
The text was updated successfully, but these errors were encountered: