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

last moment reward aggregation #2117

Merged
merged 2 commits into from
Feb 1, 2021

Conversation

JaredCorduan
Copy link
Contributor

Rewards are now separated by whether they are member or leader rewards, and by which pool the reward is associated with (a reward account can get rewards from multiple pools). The rewards are now aggregated when applying a reward update instead of when creating a reward update. This should make it a lot easier for applications such as db-sync to be able to track reward provenance.

Jared Corduan added 2 commits January 27, 2021 13:42
Rewards are now separated by whether they are memember or leader
rewards, and by which pool the reward iss associated with (a reward
account can get rewards from multiple pools). The rewards are now
aggregated when applying a reward update instead of when creating a
reward update.
in if Set.null withoutZeros
then Nothing
else Just withoutZeros
rewards' = Map.mapMaybe removeDegenerate potentialRewards
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nc6 I know we talked about alter, but I've convinced myself that mapMaybe works better. yea?

Copy link
Contributor

@nc6 nc6 left a comment

Choose a reason for hiding this comment

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

Reviewed in a call, this looks great!

NonMyopic crypto ->
Coin ->
Map (KeyHash 'StakePool crypto) Likelihood ->
NonMyopic crypto
updateNonMypopic nm rPot newLikelihoods =
Copy link
Contributor

Choose a reason for hiding this comment

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

Goodbye, non-mypopic :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😭

@JaredCorduan JaredCorduan merged commit 0930347 into master Feb 1, 2021
@iohk-bors iohk-bors bot deleted the jc/last-moment-reward-aggregation branch February 1, 2021 18:07
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.

None yet

2 participants