-
Notifications
You must be signed in to change notification settings - Fork 232
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
refactor trie_prefetcher to be similar to upstream structurally #1395
Conversation
|
|
Let's wait for Etna to activate then we can ship this in the following version |
Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
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.
NIce 👍
I'm just worried about func (p *subfetcherPool) execute(fn func(Trie))
which looks a bit strange
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com> Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com> Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com> Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com> Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
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 but with my limited knowledge especially on geth original and modified files though
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com> Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
Why this should be merged
The current trie_prefetcher is modified significantly compared to upstream, which makes it difficult to merge changes from upstream.
This PR aims to preserve the existing behavior but only with minor inline modifications to upstream code.
How this works
Uses a wrapper for DB to track the central worker pool.
Adds a couple hooks for stopping the background processes.
How this was tested
CI, benchmark for trie size ~50m k/vs and adding 100, 200, 500 kvs/ block
Should be added to release notes?
Added