Skip to content

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

@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