polkadot-js / apps

Basic Polkadot/Substrate UI for interacting with a Polkadot and Substrate node. This is the main user-facing application, allowing access to all features available on Substrate chains.
https://dotapps.io
Apache License 2.0
1.75k stars 1.54k forks source link

Add generator to api.derive.staking.query #10503

Closed TarikGul closed 4 months ago

TarikGul commented 5 months ago

Currently I had to disable withClaimedRewardsEras since there is a performance regression. It will call 297 x historyDepth all at once. Because of this we are not able to get the claimedRewards storage query from the api. In this case the main option I am thinking is adding a generator and querying 1 validator at a time, and printing them as the data comes.

TarikGul commented 5 months ago

The main issue here is api.derive.staking.queryMulti calls over 1024 observables at the same time causing the node to respond with an error. The best option here is to use api.derive.staking.query instead, and add a generator behind it that yields once each call is done.

TarikGul commented 4 months ago

Completed via: https://github.com/polkadot-js/apps/pull/10552

polkadot-js-bot commented 4 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.