Skip to content
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

[memtrie] Simplify MemTries interface #12073

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

shreyan-gupta
Copy link
Contributor

@shreyan-gupta shreyan-gupta commented Sep 10, 2024

Review this PR after #12069

Couple of changes to the memtrie interface

  • New function get_iter to avoid the two step process of first getting root and then iterator for memtrie
  • Simplification of the load_trie_from_flat_state function
  • Remove infamous construct_root function as that was one too many layers of indirection
  • New function apply_memtrie_changes
  • New function lookup to simplify calls to memtrie key lookups

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 80.29197% with 27 lines in your changes missing coverage. Please review.

Project coverage is 71.58%. Comparing base (167172b) to head (e6afe27).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/store/src/trie/mem/loading.rs 65.11% 7 Missing and 8 partials ⚠️
core/store/src/trie/mem/mem_tries.rs 81.25% 4 Missing and 5 partials ⚠️
core/store/src/trie/mod.rs 50.00% 0 Missing and 2 partials ⚠️
core/store/src/trie/mem/updating.rs 97.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12073      +/-   ##
==========================================
- Coverage   71.60%   71.58%   -0.03%     
==========================================
  Files         816      816              
  Lines      164374   164337      -37     
  Branches   164374   164337      -37     
==========================================
- Hits       117705   117645      -60     
- Misses      41526    41555      +29     
+ Partials     5143     5137       -6     
Flag Coverage Δ
backward-compatibility 0.17% <0.00%> (+<0.01%) ⬆️
db-migration 0.17% <0.00%> (+<0.01%) ⬆️
genesis-check 1.26% <0.00%> (+<0.01%) ⬆️
integration-tests 38.70% <67.15%> (-0.03%) ⬇️
linux 71.20% <80.29%> (+<0.01%) ⬆️
linux-nightly 71.12% <80.29%> (-0.02%) ⬇️
macos 52.82% <79.56%> (-1.24%) ⬇️
pytests 1.53% <0.00%> (+<0.01%) ⬆️
sanity-checks 1.33% <0.00%> (+<0.01%) ⬆️
unittests 65.37% <79.56%> (-0.03%) ⬇️
upgradability 0.22% <0.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.

Base automatically changed from shreyan/memtrie/refactor1 to master September 12, 2024 20:55
@shreyan-gupta shreyan-gupta added this pull request to the merge queue Sep 12, 2024
Merged via the queue into master with commit cf47d81 Sep 12, 2024
27 of 29 checks passed
@shreyan-gupta shreyan-gupta deleted the shreyan/memtrie/simplify_interface branch September 12, 2024 21:48
github-merge-queue bot pushed a commit that referenced this pull request Sep 12, 2024
Review this PR after #12073

This PR introduces HybridArena which represents a combination of owned
and shared memory.

This is useful during resharding to create temporary memtries for the
children of a split parent shard.
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