Commit 2f1ec079 authored by Gonçalo Pestana's avatar Gonçalo Pestana Committed by GitHub
Browse files

Staking and nomination pools runtime API improvements (#13119)



* Adds StakingAPI_nominations_quota and NominationPoolsApi_balanceToPoint and NominationPoolsApi_pointsToBalance runtime APIs

* Adds balance param to api_nominations_quota

* Update frame/nomination-pools/src/lib.rs

Co-authored-by: default avatarAnton <[email protected]>

* Update frame/nomination-pools/src/lib.rs

Co-authored-by: default avatarAnton <[email protected]>

* Addresses comments - returns zero instead of error in runtime api

* Update frame/staking/runtime-api/src/lib.rs

Co-authored-by: default avatarKian Paimani <[email protected]>

* Update frame/staking/runtime-api/src/lib.rs

Co-authored-by: default avatarKian Paimani <[email protected]>

* Addresses PR comments

* Update frame/nomination-pools/runtime-api/Cargo.toml

Co-authored-by: default avatarKian Paimani <[email protected]>

* Fixes points_to_balance logic; adds tests

* test comment fix

* Update frame/nomination-pools/runtime-api/src/lib.rs

Co-authored-by: default avatarKian Paimani <[email protected]>

* Update frame/nomination-pools/runtime-api/src/lib.rs

Co-authored-by: default avatarKian Paimani <[email protected]>

* Fix block pruning (#13323)

* Referendum proposal's metadata (#12568)

* referenda metadata

* todo comment

* remove TODO, update rustdocs

* referenda clear_metadata origin signed or root

* referenda metadata unit tests

* drop schema type for referenda metadata

* remove metadata type

* referenda metadata benches

* note different preimages

* metadata for democracy pallet

* metadata democracy pallet tests and benches

* fix cargo clippy

* update docs

* ".git/.scripts/bench-bot.sh" pallet dev pallet_democracy

* ".git/.scripts/bench-bot.sh" pallet dev pallet_referenda

* Update the doc frame/democracy/src/lib.rs

Co-authored-by: default avatarRoman Useinov <[email protected]>

* Update the doc frame/democracy/src/lib.rs

Co-authored-by: default avatarAnthony Alaribe <[email protected]>

* reference instead clone for take

Co-authored-by: default avatarAnthony Alaribe <[email protected]>

* error rename BadMetadata to PreimageNotExist

* clear metadata within internal_cancel_referendum fn

* remove redundant clone

* collapse metadata api into one set_metadata method

* fmt

* review fixes

* not request preimage on set_metadata

* rename events and update docs

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_democracy

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_referenda

* rename reset_metadata to transfer_metadata

---------

Co-authored-by: command-bot <>
Co-authored-by: default avatarRoman Useinov <[email protected]>
Co-authored-by: default avatarAnthony Alaribe <[email protected]>

* Improve test coverage of the `Notifications` protocol (#13033)

* Add handler and upgrade tests

* Add tests for `behaviour.rs`

* Apply review comments

* Update dependencies

* Apply suggestions from code review

Co-authored-by: default avatarDmitry Markin <[email protected]>

* Apply review comments

* Fix clippy

* Update mockall

* Apply review comment

---------

Co-authored-by: default avatarDmitry Markin <[email protected]>

* refactors runtime API logic to own pallet impl block

* removes unrelated changes

* Fixes cargo doc comments lint

* fixes node cargo

* fixes comment

* restart ci

* restart ci

* restart ci

---------

Co-authored-by: default avatarAnton <[email protected]>
Co-authored-by: default avatarKian Paimani <[email protected]>
Co-authored-by: parity-processbot <>
Co-authored-by: default avatarArkadiy Paronyan <[email protected]>
Co-authored-by: default avatarMuharem Ismailov <[email protected]>
Co-authored-by: default avatarRoman Useinov <[email protected]>
Co-authored-by: default avatarAnthony Alaribe <[email protected]>
Co-authored-by: default avatarAaro Altonen <[email protected]>
Co-authored-by: default avatarDmitry Markin <[email protected]>
parent 67c250fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment