polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.06k stars 342 forks source link

[Tracking upstream] Remove `erasStakersClipped` from `api.derive.staking._erasExposure` when applicable #5819

Open TarikGul opened 3 months ago

TarikGul commented 3 months ago

Via https://github.com/polkadot-js/api/issues/5771 api.derive.staking._erasExposure needed to change its internal functionality to accommodate the new changes. Currently the derive has forward and backwards compatibility via https://github.com/polkadot-js/api/pull/5815.

That being said, once all relay chain runtimes are updated to 1004000 it is safe to say we can remove the erasStakersClipped, and have support for only erasStakersPaged. This means we can also adjust the types to ensure there is a single source of truth for the _eraExposure.

This is a tracking issue to ensure we stay on top of it and will be added to the projects board tracking column.

ScepticMatt commented 2 months ago

how would you get erasStakersClipped from api.at(hash) then? I haven't been able to use derive API with historical data

TarikGul commented 2 months ago

That being said, once all relay chain runtimes are updated to 1004000 it is safe to say we can remove the erasStakersClipped, and have support for only erasStakersPaged

This is referring only to the functionality in the derive, not api.query

TarikGul commented 2 months ago

I changed the title to be more less confusing.