Skip to content

Commit

Permalink
Bump staking and nomination pools (#318)
Browse files Browse the repository at this point in the history
Changes:
- Fixes the issue [preventing nomination pools from getting
destroyed](paritytech/polkadot-sdk#4440).
- Adds a new staking runtime api to Kusama and Polkadot to help with
checking if era rewards are pending for a validator. Refer
paritytech/polkadot-sdk#4301.
  • Loading branch information
Ank4n authored May 21, 2024
1 parent 3ccb13d commit e859933
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Changelog for the runtimes governed by the Polkadot Fellowship.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Added

- Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318))

### Fixed

- Handle extra erroneous consumer reference when a nomination pool is destroying ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318))

## [1.2.4] 20.05.2024

### Changed
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pallet-nft-fractionalization = { version = "11.0.0", default-features = false }
pallet-nfts = { version = "23.0.0", default-features = false }
pallet-nfts-runtime-api = { version = "15.0.0", default-features = false }
pallet-nis = { version = "29.0.0", default-features = false }
pallet-nomination-pools = { version = "26.0.0", default-features = false }
pallet-nomination-pools = { version = "26.0.1", default-features = false }
pallet-nomination-pools-benchmarking = { version = "27.0.0", default-features = false }
pallet-nomination-pools-runtime-api = { version = "24.0.0", default-features = false }
pallet-offences = { version = "28.0.0", default-features = false }
Expand All @@ -143,10 +143,10 @@ pallet-scheduler = { version = "30.0.0", default-features = false }
pallet-session = { version = "29.0.0", default-features = false }
pallet-session-benchmarking = { version = "29.0.0", default-features = false }
pallet-society = { version = "29.0.0", default-features = false }
pallet-staking = { version = "29.0.2", default-features = false }
pallet-staking = { version = "29.0.3", default-features = false }
pallet-staking-reward-curve = { version = "11.0.0" }
pallet-staking-reward-fn = { version = "20.0.0", default-features = false }
pallet-staking-runtime-api = { version = "15.0.0", default-features = false }
pallet-staking-runtime-api = { version = "15.0.1", default-features = false }
pallet-state-trie-migration = { version = "30.0.0", default-features = false }
pallet-sudo = { version = "29.0.0", default-features = false }
pallet-timestamp = { version = "28.0.0", default-features = false }
Expand Down
4 changes: 4 additions & 0 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2565,6 +2565,10 @@ sp_api::impl_runtime_apis! {
fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page {
Staking::api_eras_stakers_page_count(era, account)
}

fn pending_rewards(era: sp_staking::EraIndex, account: AccountId) -> bool {
Staking::api_pending_rewards(era, account)
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
Expand Down
4 changes: 4 additions & 0 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,10 @@ sp_api::impl_runtime_apis! {
fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page {
Staking::api_eras_stakers_page_count(era, account)
}

fn pending_rewards(era: sp_staking::EraIndex, account: AccountId) -> bool {
Staking::api_pending_rewards(era, account)
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down

0 comments on commit e859933

Please sign in to comment.