Skip to content

Commit

Permalink
Feat/1207513338125664 delayed staking rewards (#280)
Browse files Browse the repository at this point in the history
* taking staking snapshot at start_session

* implemented delayed payouts

* use take instead of get for AtStake

* prepare to refresh staking snapshot even if selected candidates dont change

* staking snapshot refreshes if collator set doesn't change

* setup storage migration for moving to delayed rewards distribution

* fix build issue with parachain staking unit tests

* (bugfix) payout_collator at on_finalize and skip delayed reward calc at genesis

* updated some unit tests, improved distribution mechanism to consider genesis states

* (chore): cargo fmt

* Fixued up most unit tests on parachain staking, ensure correct round info is used where needed

* (chore) cargo fmt

* fix coinbase_rewards_many_blocks_simple_check unit test in parachain staking

* fixed up further unit tests in parachain staking

* Some enw and some updated unit tests on parachain staking pallet, mitigate prepare_delayed_reward from running twice at genesis

* fixed unit tests on parachain staking, incorporate delayed staking rewards changes

* use BlockNumberFor<T> instead of T::BlockNumber for parachain staking

* (chore): cargo fmt and clippy

* (chore) minor cargo clippy fix

* use end_session and new_session hooks in parachain staking

* minor fix to parachain-staking tests

* fixed prepare_delayed_rewards to use updated RoundInfo

* (chore) cargo clippy

* restrict sudo from forcing new round before payouts are finished

* (chore) cargo fmt and clippy

* remove unused code

* added weights to parachain staking hooks

* account for ED when taking staking pot issuance
  • Loading branch information
talhadaar authored Nov 22, 2024
1 parent 0a6f37e commit 756f984
Show file tree
Hide file tree
Showing 4 changed files with 633 additions and 323 deletions.
Loading

0 comments on commit 756f984

Please sign in to comment.