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

use query storage helper #1051

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

use query storage helper #1051

wants to merge 8 commits into from

Conversation

shunjizhan
Copy link
Collaborator

@shunjizhan shunjizhan commented Nov 11, 2024

Change

Using api to query storage still has the memory issue polkadot-js/api#5981, so we switch back to the original query storage helper, but removed all cache for storage query, because there was a bug in the cache, and as we mentioned in #1039, caching storage won't be too useful.

We still keep the blockHash => { blockNumber, Header, BlockData } cache introduced in #1039 , which are commonly used. We keep the apiAt cache as well, which can speed up runtime calls.

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.15%. Comparing base (38be323) to head (02e724d).

Files with missing lines Patch % Lines
packages/eth-providers/src/utils/queryStoarge.ts 95.23% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1051      +/-   ##
==========================================
+ Coverage   78.09%   78.15%   +0.05%     
==========================================
  Files          55       56       +1     
  Lines        2721     2737      +16     
  Branches      616      624       +8     
==========================================
+ Hits         2125     2139      +14     
- Misses        583      585       +2     
  Partials       13       13              
Files with missing lines Coverage Δ
packages/eth-providers/src/base-provider.ts 83.53% <100.00%> (-0.22%) ⬇️
packages/eth-providers/src/utils/parseBlock.ts 95.40% <100.00%> (ø)
packages/eth-providers/src/utils/queryStoarge.ts 95.23% <95.23%> (ø)

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.

1 participant