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

better way to one-shot query storage #6015

Open
1 of 4 tasks
shunjizhan opened this issue Nov 4, 2024 · 0 comments
Open
1 of 4 tasks

better way to one-shot query storage #6015

shunjizhan opened this issue Nov 4, 2024 · 0 comments
Labels
Feature New functionality expanding SDK’s capabilities, adding tools or APIs for developers. P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.

Comments

@shunjizhan
Copy link
Contributor

shunjizhan commented Nov 4, 2024

  • I'm submitting a ...
  • Bug report
  • Feature request
  • Support request
  • Other
  • What is the current behavior and expected behavior?

When querying storage for historical blocks, we need to decorate a whole apitAt object with await api.at(blockHash). However, if we only need to one-shot query for storage for a certain block, there will be a lot of wasted resources decorating api.*.

As a result, if we need to query storage for a lot of blocks (not simultaneously, but at high frequency), this will cause significant performance issue.

Can we have a more efficient way to query one-shot storage, such as await api.queryAt(blockHash).section.method()? In this way, we know it's only querying storage so can skip other unnecessary decoration.

For multiple queries among api.* for the same block, we can still use apiAt(blockHash)

@TarikGul TarikGul added Feature New functionality expanding SDK’s capabilities, adding tools or APIs for developers. P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first. labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality expanding SDK’s capabilities, adding tools or APIs for developers. P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.
Projects
Status: P4 - Needs Investigation
Development

No branches or pull requests

2 participants