cmd/geth, core/rawdb: add inspect-contract and inspect-trie#33721
cmd/geth, core/rawdb: add inspect-contract and inspect-trie#33721weiihann wants to merge 5 commits intoethereum:masterfrom
Conversation
|
Probably we can unify them to |
|
this duplicates a bit the work from here: #28892 |
|
The older tool is a bit different, it logs the node types and their count, but does not track the total size of each level. We do think it's useful to know the node types, so this PR could be extended to cover this. |
|
To track the short, full, and hash nodes, we need to actually walk the trie as in #28892, so right now I'm integrating the size tracking there to print the same "Trie Depth Distribution" chart that this PR introduces. The "Contract Inspection" chart needs some info from the snapshot to compute the storage sizes and the slot counts, so it would make sense to keep in this PR in rawdb. @weiihann would you mind removing |
Yup I just checked the latest changes in #28892. I think this PR is no longer useful, as we can add an optional |
|
Gary was concurrent |
inspect-contractCommand:
geth inspect-contract 0x06450dEe7FD2Fb8E39061434BAbCFC05599a6Fb8Output:
inspect-trieCommand:
geth inspect-trie db inspect-trieOutput: