Skip to content

Conversation

hero5512
Copy link
Contributor

This pr tries to close #32922. It refactors IntermediateRoot to parallelize account trie updates, improving performance by hashing the account trie and storage tries concurrently.

@hero5512 hero5512 changed the title Parallize account update core/state: parallelize account trie updates in IntermediateRoot Oct 21, 2025
// only a single trie is used for state hashing. Replacing a non-nil verkle tree
// here could result in losing uncommitted changes from storage.
if s.prefetcher != nil {
if trie := s.prefetcher.trie(common.Hash{}, s.originalRoot); trie == nil {
Copy link
Member

Choose a reason for hiding this comment

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

This step will block until all account prefetching tasks have been fully executed.

Originally, we deliberately processed the storage tries first, followed by the account trie, to give the account prefetcher additional time to complete its work.

However, since #32134 optimized the prefetcher, we now need to measure whether it can finish all tasks at this stage.

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.

Hash the account trie along with storage tries in parallel

2 participants