bor icon indicating copy to clipboard operation
bor copied to clipboard

Add prefetch trie nodes

Open Raneet10 opened this issue 3 months ago • 2 comments

Description

This PR enables prefetching of trie nodes before execution of block. It adds a waitforwarm config which if enabled will block execution of block until the warming finishes.

Changes

  • [ ] Bugfix (non-breaking change that solves an issue)
  • [ ] Hotfix (change that solves an urgent issue, and requires immediate attention)
  • [x] New feature (non-breaking change that adds functionality)
  • [ ] Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • [ ] Changes only for a subset of nodes

Checklist

  • [x] I have added at least 2 reviewer or the whole pos-v1 team
  • [x] I have added sufficient documentation in code
  • [x] I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • [ ] Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • [ ] Includes RPC methods changes, and the Notion documentation has been updated

Testing

  • [ ] I have added unit tests
  • [ ] I have added tests to CI
  • [ ] I have tested this code manually on local environment
  • [ ] I have tested this code manually on remote devnet using express-cli
  • [ ] I have tested this code manually on amoy
  • [ ] I have created new e2e tests into express-cli

Raneet10 avatar Nov 06 '25 10:11 Raneet10

Codecov Report

:x: Patch coverage is 49.66667% with 151 lines in your changes missing coverage. Please review. :warning: Please upload report for BASE (src-optimizations@a63c799). Learn more about missing BASE report.

Files with missing lines Patch % Lines
core/blockchain.go 49.45% 39 Missing and 7 partials :warning:
core/state/reader.go 2.70% 36 Missing :warning:
core/state/statedb.go 0.00% 22 Missing :warning:
core/blockchain_insert.go 57.50% 13 Missing and 4 partials :warning:
miner/worker.go 63.41% 10 Missing and 5 partials :warning:
core/state_prefetcher.go 86.53% 7 Missing :warning:
eth/ethconfig/gen_config.go 0.00% 6 Missing :warning:
eth/backend.go 0.00% 1 Missing :warning:
miner/fake_miner.go 0.00% 1 Missing :warning:
Additional details and impacted files
@@                 Coverage Diff                  @@
##             src-optimizations    #1871   +/-   ##
====================================================
  Coverage                     ?   47.92%           
====================================================
  Files                        ?      844           
  Lines                        ?   143880           
  Branches                     ?        0           
====================================================
  Hits                         ?    68959           
  Misses                       ?    70402           
  Partials                     ?     4519           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 07 '25 10:11 codecov[bot]