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

Calculating reward distribution #124

Merged
merged 8 commits into from
Nov 12, 2020
Merged

Conversation

MakMuftic
Copy link
Member

@MakMuftic MakMuftic commented Nov 11, 2020

Implement logic for calculating reward distribution based on node stats (part of payout script). Some additional minor changes described below

PR Checklist

  • I have run linter localy
  • I have run unit and integration tests locally
  • Rebased to master branch / merged master
  • Updated CHANGELOG.md

Changes

  • Refactor stats endpoint to return payout addresses for nodes and loadbalancer fee percentage
  • Create initial (empty) payout on the first loadbalancer start
  • Add function for calculating reward distribution for nodes CalculatePayoutDistributionByNode + unit tests (@mpetrun5 @mpetrunic please check this thoroughly)
  • Add function for aggregating information on payout stats + unit tests

Issues

Closes #125

This was linked to issues Nov 11, 2020
Copy link
Member

@mpetrunic mpetrunic left a comment

Choose a reason for hiding this comment

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

@mpetrun5 Could probably review this beteer.

It would be easier to review if tx submit (rpc call) and reward calculation would be in separate PRs

@MakMuftic MakMuftic force-pushed the mmuftic/payout-script-implementation branch from c27c689 to 4478fc6 Compare November 11, 2020 12:42
@MakMuftic MakMuftic marked this pull request as draft November 11, 2020 12:42
@MakMuftic MakMuftic changed the title Payout script implementation Calculating reward distribution Nov 11, 2020
This was unlinked from issues Nov 11, 2020
@MakMuftic MakMuftic linked an issue Nov 11, 2020 that may be closed by this pull request
@MakMuftic
Copy link
Member Author

@mpetrun5 @mpetrunic I decided to separate changes in multiple PRs as suggested by @mpetrunic.

@MakMuftic MakMuftic marked this pull request as ready for review November 11, 2020 13:15
@MakMuftic MakMuftic requested a review from mpetrunic November 11, 2020 13:15
Co-authored-by: Marin Petrunić <[email protected]>
Copy link
Member

@mpetrun5 mpetrun5 left a comment

Choose a reason for hiding this comment

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

LGTM

@mpetrunic mpetrunic merged commit f58f034 into dev Nov 12, 2020
@mpetrunic mpetrunic deleted the mmuftic/payout-script-implementation branch November 12, 2020 08:34
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.

Implement reward distribution function
3 participants