Tvl pool staking (#1322)
What does this PR do? - Introduced the TotalValueLocked storage for nomination-pools. - introduced a slashing api in mock.rs - additional test for tracking a slashing event towards a pool without sub-pools - migration for the nomination-pools (V6 to V7) with `VersionedMigration` Why are these changes needed? this is the continuation of the work by @Kianenigma in this [PR](https://github.com/paritytech/substrate/pull/13319) How were these changes implemented and what do they affect? - It's an extra StorageValue that's modified whenever funds flow in or out of staking for any of the `bonded_account` of `BondedPools` - The `PoolSlashed`event is now emitted even when no `SubPools` are found Closes https://github.com/paritytech/polkadot-sdk/issues/155 KSM: HHEEgVzcqL3kCXgsxSfJMbsTy8dxoTctuXtpY94n4s8F4pS --------- Co-authored-by:Liam Aharon <liam.aharon@hotmail.com> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by:
Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by:
Ankan <ankan.anurag@gmail.com> Co-authored-by: command-bot <>
Showing
- polkadot/runtime/westend/src/lib.rs 1 addition, 0 deletionspolkadot/runtime/westend/src/lib.rs
- substrate/frame/nomination-pools/src/lib.rs 120 additions, 35 deletionssubstrate/frame/nomination-pools/src/lib.rs
- substrate/frame/nomination-pools/src/migration.rs 87 additions, 0 deletionssubstrate/frame/nomination-pools/src/migration.rs
- substrate/frame/nomination-pools/src/mock.rs 35 additions, 13 deletionssubstrate/frame/nomination-pools/src/mock.rs
- substrate/frame/nomination-pools/src/tests.rs 187 additions, 38 deletionssubstrate/frame/nomination-pools/src/tests.rs
- substrate/frame/staking/src/lib.rs 8 additions, 2 deletionssubstrate/frame/staking/src/lib.rs
- substrate/frame/staking/src/mock.rs 1 addition, 0 deletionssubstrate/frame/staking/src/mock.rs
- substrate/primitives/staking/src/lib.rs 2 additions, 0 deletionssubstrate/primitives/staking/src/lib.rs
Please register or sign in to comment