Skip to content

Conversation

@rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Apr 26, 2023

Problem

Incremental state root calculation takes a lot of time. Flamegraph showed that most of the time is spent on PrefixSet::contains.

Screenshot_2023-04-25_at_18 42 30

Solution

Optimize prefix set based on silkworm implementation.

Related PRs

#2406

@rkrasiuk rkrasiuk added C-enhancement New feature or request A-trie Related to Merkle Patricia Trie implementation labels Apr 26, 2023
Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

wish we had a more Rust-y way to do this but lgtm - needs lint

@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.64%. Comparing base (503748b) to head (f6f8a1c).
Report is 8588 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2417      +/-   ##
==========================================
- Coverage   71.65%   71.64%   -0.01%     
==========================================
  Files         486      486              
  Lines       59792    59811      +19     
==========================================
+ Hits        42843    42852       +9     
- Misses      16949    16959      +10     
Flag Coverage Δ
integration-tests 18.36% <0.00%> (-0.04%) ⬇️
unit-tests 66.53% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@gakonst gakonst merged commit c7341b5 into main Apr 26, 2023
@gakonst gakonst deleted the rkrasiuk/optimized-prefix-set branch April 26, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-trie Related to Merkle Patricia Trie implementation C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants