-
Notifications
You must be signed in to change notification settings - Fork 4
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
Geth-statediff doesn't save storage if value is empty #57
Comments
Here JSON-RPC request to verify against geth leveldb:
Replace |
Related to vulcanize/ipld-eth-indexer#72 |
Per out conversation in slack: zeroed values aren't stored in the trie, the real issue is that we are not correctly signifying when a zero-value node at a specific leaf key is pruned away (due to not including the leaf_key for the removed node in the row representing it) To fix we should include the leaf key in the removed-node-type entries. mhKey should still be empty since there is technically no node at that path that we should be referencing, we are just signifying that a node has been removed. |
We also need to a script to update the current entries in our db0 |
Fixed in #58 , although I will open a separate issue to track the separate script for repairing the current db. |
Also of note, the fix is for both state and storage tries |
System information
Geth
Version: 1.10.1-statediff-0.0.15
Git Commit: daa2cdd
Git Commit Date: 20210313
Architecture: amd64
Go Version: go1.15.5
Operating System: linux
Expected behaviour
In
storage_cids
table should be row with non-emptystorage_leaf_key
and mhKey should point toblock
table with RLP encoded empty stringActual behaviour
In
storage_cids
table there is a row with emptystorage_leaf_key
and mhKey points toblock
table with emptydata
fieldSteps to reproduce the behaviour
setMessage
function and pass empty string as inputThe text was updated successfully, but these errors were encountered: