Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make distribute_rewards transactional #299

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

nanocryk
Copy link
Contributor

Make reward distribution reverts if anything goes wrong.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2023

Master coverage: 70.97%
Coverage generated "Thu Oct 26 13:37:00 UTC 2023":
https://d3gkbsry1ehhqi.cloudfront.net/tanssi-coverage/pulls/299/index.html
Pull coverage: 71.04%

Copy link
Collaborator

@girazoki girazoki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@girazoki girazoki merged commit 3be9f61 into elois-pallet-rewards Oct 27, 2023
23 checks passed
@girazoki girazoki deleted the jeremy-staking-transactional branch October 27, 2023 07:56
girazoki added a commit that referenced this pull request Oct 31, 2023
* reward trait

* reward distribution code

* tests (wip)

* reward distribution tests

* fix test + remove warning

* chore: create pallet inflation-rewards and primitive tp-maths

* chore: move trait DistributeRewards in tp-traits

* ref: move AuthorNotingHook in tp-traits

* ref: pooled-staking: use Credit for rewards

* reword pallet inflation rewards

* ref: use bounded vec for container chains

* fix existing rust tests compilation

* reward orchestrator chain

* add rust tests for pallet inflation-rewards

* fmt

* remove dead code

Co-authored-by: tmpolaczyk <[email protected]>

* note container author only if block increase

* fmt

* cleanup merge

* reward author if it increases

* Re-design on-container-author-noted to simplify it for now

* adapt to 1.1.0

* fmt

* fix merge mistakes and benchmarking

* types and unitest error

* take invulnerables into account

* fmt

* let's use collatorAssignment to fethc the author account

* hack around how to get the collator account to be rewarded

* fix rust tests

* TODO: important!

* events for inflation rewards and benchmark for rewards

* add runtime event to mock

* substitute extractFee for extractFeeAuthor

* fix ts-tests and local interfaceS

* fix linting and fmt

* first ts-tests dedicated to inflation

* add new parafchain bond account

* add more test

* fmt lint

* wire in container rewarding

* fmt

* add more test, including container-chain reward

* try-runtime

* staking rewards tests, not through invlunerables

* test fixed

* a couple of tests for staking

* make distribute_rewards transactional (#299)

* make distribute_rewards transactional

* fmt

---------

Co-authored-by: girazoki <[email protected]>

* reward the author of the first container block

* PR feedback

* compile

* Inflation rewards integration tests (#295)

* test reward distribution

* ensure it still works even with key change

* find_map + fmt

* fmt

* remove dbg!

* a few todos added and cleaning the remaining feedback

---------

Co-authored-by: nanocryk <[email protected]>
Co-authored-by: tmpolaczyk <[email protected]>
Co-authored-by: girazoki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants