-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
Database cachednode callback walk #20529
Conversation
It only gathers the direct children of a node, not recursively the entire subtrie. |
You are correct. I suspect the problem is that we did a |
A bug was in there, fixed now hopefully |
Giving this a shot on the benchmarkers, replacing the current run (https://geth-bench.ethdevops.io/d/Jpk-Be5Wk/dual-geth?orgId=1&var-exp=mon08&var-master=mon09&var-percentile=50&from=1578482122263&to=now ) without restarting them. The experimental ( |
Ah, immediate crash on the gpo thingy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ereum#20529) * trie/tests: add benchmarks and update trie tests * trie: update benchmark tests * trie: utilize callbacks instead of amassing lists of hashes in database ref/unref * trie: replace remaining non-callback based accesses
Replaces #20527 , this one does not contain all the other experimental fluff.
In the trie database, there are several operations that recursively walk children of nodes, and collect them into lists of hashes.
This means that on the leaf level, all the upper levels hold N lists with hashes. So at root level, the list contains all leaf hashes, at level below, a list with 1/16th of the entries, and so on.This PR changes it to walk the nodes with a callback instead. Needs to be benchmarked and tested IRL, of course.
before
after