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.
What was wrong?
No convenient way to generate a trie diff without iterating all keys.
How was it fixed?
This is suuuper WIP. It was really just a "scratch my own itch" thing while I was debugging the difference between two different state roots.
I'd say it's only ~1/4 implemented, and probably isn't the final API I would choose. But, it was already handy, definitely saved me time working on the state root. I was able to run it on a real state root on a real mainnet block (both account and storage state) to get meaningful results. There's probably a better approach, I didn't spend any time cleaning it up or looking for obvious dedup opportunities.
So this is a reminder to myself to come back to it when I'm not driving so hard on trinity mainnet support. Also, in case anyone else wants to crib the code, or pick it up where I left off...
Tangent: it's might be way simpler to use the
KeyAccessLogger
to generate the required proofs than the current method. (inget_proof()
). Seems worth checking out.Cute Animal Picture