Skip to content

[staking-runtime-api] Backport of #4301 to sdk 1.7.0#4525

Merged
Ank4n merged 1 commit into
release-crates-io-v1.7.0from
ankan/backport-staking-runtime-api
May 20, 2024
Merged

[staking-runtime-api] Backport of #4301 to sdk 1.7.0#4525
Ank4n merged 1 commit into
release-crates-io-v1.7.0from
ankan/backport-staking-runtime-api

Conversation

@Ank4n

@Ank4n Ank4n commented May 20, 2024

Copy link
Copy Markdown
Contributor

Backport of #4301 to polkadot-sdk 1.7.0.

Expect patch pallet-staking from 29.0.2 to 29.0.3 and pallet-staking-runtime-api from 15.0.0 to 15.0.01.

closes #426.
related to #1189.

Would help offchain programs to query if there are unclaimed pages of
rewards for a given era.

The logic could look like below

```js
// loop as long as all era pages are claimed.
while (api.call.stakingApi.pendingRewards(era, validator_stash)) {
  api.tx.staking.payout_stakers(validator_stash, era)
}
```
@Ank4n Ank4n added A3-backport Pull request is already reviewed well in another branch. T4-runtime_API This PR/Issue is related to runtime APIs. labels May 20, 2024
@paritytech-cicd-pr

Copy link
Copy Markdown

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: check-tracing
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6246578

@Ank4n Ank4n merged commit 2fa39cf into release-crates-io-v1.7.0 May 20, 2024
@Ank4n Ank4n deleted the ankan/backport-staking-runtime-api branch May 20, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-backport Pull request is already reviewed well in another branch. T4-runtime_API This PR/Issue is related to runtime APIs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants