-
Notifications
You must be signed in to change notification settings - Fork 155
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
Conversation
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this 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 = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goodbye, non-mypopic :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😭
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.