Skip to content
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

[WIP] Trie diff #89

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

[WIP] Trie diff #89

wants to merge 3 commits into from

Conversation

carver
Copy link
Contributor

@carver carver commented Apr 2, 2019

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. (in get_proof()). Seems worth checking out.

Cute Animal Picture

Cute animal picture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant