Skip to content
Commit 20d5e358 authored by Ross Bulat's avatar Ross Bulat Committed by GitHub
Browse files

Nomination Pool Commission (#13128)



* + nomination pool commission

* fmt

* use register_update()

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

Co-authored-by: default avatarGonçalo Pestana <[email protected]>

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

Co-authored-by: default avatarGonçalo Pestana <[email protected]>

* fmt

* amend comments

* + test for set_commission

* fix

* Update frame/nomination-pools/fuzzer/src/call.rs

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

* rm comment

* use PalletError

* some feedback item amendments

* update weights

* revert PalletError stuff

* ".git/.scripts/commands/fmt/fmt.sh"

* make pool_events_since_last_call more modular

* fmt

* fix call indexes + test

* add payout teste

* add event to max_commisson updating current

* begin refactor

* some debugging

* update

* more tests

* rewardpol not working

* commission refactor

* pending rewards returns commission

* fmt

* add claim_commission call

* + claim_commission

* fix benchmarks

* weight 0 for now

* + claim_commission benchmark

* fmt

* apply commission to benchmarks

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

* ".git/.scripts/commands/fmt/fmt.sh"

* clippy

* + pending

* add RewardPool.total_rewards_acounted

* fixes

* println

* more logs

* Fix plus cleanups

* fix assert

* tidy up

* tests work + tidy up

* rm unused

* clippy fix

* persist reward_pool update

* claim_commission_works tests

* .

* some test formatting

* add high level docs

* add calls

* docs

* rename

* rename

* docs

* rename

* fmt

* use matches!

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

Co-authored-by: default avatarGonçalo Pestana <[email protected]>

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

Co-authored-by: default avatarGonçalo Pestana <[email protected]>

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

Co-authored-by: default avatarGonçalo Pestana <[email protected]>

* comment

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

Co-authored-by: default avatarGonçalo Pestana <[email protected]>

* .

* weights order

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

* use from_parts

* comment

* ".git/.scripts/commands/fmt/fmt.sh"

* revert clippy suggestions on old migrations

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

* add InitialGlobalMaxCommission

* fix migration

* reward counter comments & explanations

* format

* add commission implementation note

* fmt

* revert InitialGlobalMaxCommission

* global max commission migration generic

* text

* 100% commission no payout test

* add commission_accumulates_on_multiple_rewards

* non-zero fuzzer GlobalMaxCommission

* add last_recorded_total_payouts_needs_commission

* commission event fix + claim commission test

---------

Co-authored-by: default avatarGonçalo Pestana <[email protected]>
Co-authored-by: default avatarKian Paimani <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: default avatarBastian Köcher <[email protected]>
parent 5e3f1b1a
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