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

Fix key iterator in lazy loading mode #2971

Merged
merged 7 commits into from
Sep 26, 2024
Merged

Conversation

RomarQ
Copy link
Contributor

@RomarQ RomarQ commented Sep 23, 2024

What does it do?

Adds a disclaimer when starting the node in lazy loading mode.

This PR fixes a issues related to the lazy loading node feature:

  • Properly caches already fetched storage
  • Discards storage keys removed after the fork checkpoint
  • Support querying paginated storage keys by prefix
  • Disable offchain-worker when in lazy loading mode (If needed in the future, we need to create a tokio runtime to be used by that thread)

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@RomarQ RomarQ self-assigned this Sep 23, 2024
@RomarQ RomarQ added B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime code (so can't be audited) labels Sep 23, 2024
Copy link
Contributor

github-actions bot commented Sep 24, 2024

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2196 KB (no changes) ✅

Moonbeam runtime: 2140 KB (no changes) ✅

Moonriver runtime: 2132 KB (no changes) ✅

Compared to latest release (runtime-3200)

Moonbase runtime: 2196 KB (+236 KB compared to latest release) ⚠️

Moonbeam runtime: 2140 KB (+216 KB compared to latest release) ⚠️

Moonriver runtime: 2132 KB (+208 KB compared to latest release) ⚠️

Copy link
Contributor

github-actions bot commented Sep 24, 2024

Coverage Report

@@                       Coverage Diff                        @@
##           master   rq/lazy-loading-improvements      +/-   ##
================================================================
- Coverage   79.31%                         79.22%   -0.09%     
+ Files         298                            299       +1     
+ Lines       87140                          87253     +113     
================================================================
+ Hits        69114                          69118       +4     
+ Misses      18026                          18135     +109     
Files Changed Coverage
/node/cli/src/command.rs 23.55% (+0.42%) 🔼

Coverage generated Wed Sep 25 17:59:27 UTC 2024

@RomarQ RomarQ marked this pull request as ready for review September 24, 2024 13:11
@noandrea noandrea merged commit 7fb1b17 into master Sep 26, 2024
39 checks passed
@noandrea noandrea deleted the rq/lazy-loading-improvements branch September 26, 2024 08:52
@RomarQ RomarQ added the lazy-loading These changes affect the lazy loading feature label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime code (so can't be audited) lazy-loading These changes affect the lazy loading feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants