Skip to content

core: exit prefetch just after block processed #31903

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

Closed
wants to merge 1 commit into from

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented May 26, 2025

As the tx prefetches are used to pre-warm the account/storage states, which will be used for the block processing. Currently we will exit the tx prefetch goroutines after the block has been processed + state validated, but the later should be omited, so try to stop the prefetches just after the block have been processed

Signed-off-by: jsvisa <delweng@gmail.com>
@jsvisa jsvisa requested a review from rjl493456442 as a code owner May 26, 2025 04:25
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

I would prefer to keep it as now, reasons:

  • the prefetcher will also do the state hashing to warm the trie node cache
  • the prefetcher might be optimized a bit more in the future, (e.g., efficient trie node preloading) and the state hashing is performed after the block processing
  • there is no big downside to let the prefetcher run a bit more

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