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

feat(core/state): async trie prefetching #76

Merged
merged 9 commits into from
Nov 26, 2024
Merged

Conversation

ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Nov 22, 2024

Why this should be merged

Performs trie prefetching concurrently, required for equivalent performance with coreth / subnet-evm implementations.

How this works

StateDB.StartPrefetcher() accepts variadic options (for backwards compatibility of function signatures). An option to specify a WorkerPool is provided which, if present, is used to call Trie.Get{Account,Storage}(); the pool is responsible for concurrency but does not need to be able to wait on the work as that is handled by this change.

How this was tested

Unit test demonstrating hand-off of work to a WorkerPool as well as API-guaranteed ordering of events.

@ARR4N ARR4N marked this pull request as ready for review November 23, 2024 19:17
Copy link
Collaborator

@darioush darioush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ARR4N ARR4N requested a review from darioush November 26, 2024 09:49
@ARR4N ARR4N enabled auto-merge (squash) November 26, 2024 12:02
@ARR4N ARR4N merged commit 4feb960 into main Nov 26, 2024
3 checks passed
@ARR4N ARR4N deleted the arr4n/async-trie-prefetcher branch November 26, 2024 16:01
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.

2 participants