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

Refactor to support IotRewardShare and multiple sub reward types. Add support for operation fund rewards #429

Merged
merged 9 commits into from
Apr 10, 2023

Conversation

andymck
Copy link
Contributor

@andymck andymck commented Apr 4, 2023

Depends on proto branch: https://github.com/helium/proto

Refactor to replace GatewayRewardShare with IotRewardShare. IotRewardShare now supports multiple reward types each with their own data requirements.

Adds output of operational fund rewards

@andymck andymck force-pushed the andymck/operation-fund-rewards branch 2 times, most recently from 710502d to d47f6f3 Compare April 6, 2023 12:08
@andymck andymck changed the title initial pass at including non gateway rewards, specifically operational fund Refactor to support IotRewardShare and multiple sub reward types. Add support for operation fund rewards Apr 6, 2023
@andymck andymck force-pushed the andymck/operation-fund-rewards branch 2 times, most recently from 3e416a4 to 39aed05 Compare April 6, 2023 12:20
@andymck andymck marked this pull request as ready for review April 6, 2023 12:53
@andymck andymck force-pushed the andymck/operation-fund-rewards branch from 431b777 to ef4f1f0 Compare April 7, 2023 13:40
reward_index/migrations/5_add_type_to_index.sql Outdated Show resolved Hide resolved
iot_verifier/src/reward_share.rs Show resolved Hide resolved
iot_verifier/src/reward_share.rs Outdated Show resolved Hide resolved
iot_verifier/src/rewarder.rs Outdated Show resolved Hide resolved
reward_index/migrations/5_add_type_to_index.sql Outdated Show resolved Hide resolved
Copy link
Contributor

@jeffgrunewald jeffgrunewald left a comment

Choose a reason for hiding this comment

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

just one more nit and a question; otherwise looks good

Co-authored-by: Matthew Plant <matty@nova-labs.com>
Comment on lines 23 to 30
static ref WITNESS_REWARDS_PER_DAY_PERCENT: Decimal = dec!(0.24);
// Data transfer is allocated 50% of daily rewards
static ref DATA_TRANSFER_REWARDS_PER_DAY_PERCENT: Decimal = dec!(0.50);
// Operations fund is allocated 7% of daily rewards
static ref OPERATIONS_REWARDS_PER_DAY_PERCENT: Decimal = dec!(0.07);
// dc remainer distributed at ration of 4:1 in favour of witnesses
// ie WITNESS_REWARDS_PER_DAY_PERCENT:BEACON_REWARDS_PER_DAY_PERCENT
static ref WITNESS_DC_REMAINER_PERCENT: Decimal = dec!(0.80);
Copy link
Contributor

Choose a reason for hiding this comment

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

All of these can be constants instead of lazy statics

@jeffgrunewald jeffgrunewald merged commit 8b80d33 into main Apr 10, 2023
@jeffgrunewald jeffgrunewald deleted the andymck/operation-fund-rewards branch April 10, 2023 19:19
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.

4 participants