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.07k stars 354 forks source link

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

Closed TarikGul closed 4 months ago

TarikGul commented 8 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 7 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 7 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 7 months ago

I changed the title to be more less confusing.

TarikGul commented 4 months ago

Keeping erasStakersClipped as a future backwards compatible even though the migration is done with Polkadot. I just want to ensure any other chains who use this functionality don't have their api broken.

polkadot-js-bot commented 3 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.