-
Notifications
You must be signed in to change notification settings - Fork 21
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
Include share values in rewards manifest #827
Conversation
This is preparing for being able to make sure boosted rewards do not take more than 10% of the reward shares. base_coverage_points will always be recieved, but boosted_coverage_points may receive less rewards per share depending on how many there are in a reward epoch. Note that boosted_coverage_points _do not_ contain base_coverage_points.
If boosted rewards are above the allowed 10% of total emissions, the rewards per share needs to be recalculated _not including_ leftover DC from Data Transfer rewards. To make this easier, we store data transfer allocated rewards and resulting unallocated rewards separately from the 10% buckets for poc and boosting.
Points considered when doing math for shares for a radio should always include speedtest and location multipliers.
- Add a way for receiving rewards from the mock sink to determine if it needs to await for an unallocated msg. - Derive the expected rewards from math outside the oracles repo
This test really illustrates the preference for coverage over boosting. A hotspot covering 2 hexes can far surpass a hotspot covering a single hex with a strong boost multiplier.
This tests math looks different because it's the first time we're dealing with different coverage point values from radios because of degraded location trust scores.
This test almost exactly the same as `test_poc_with_multi_coverage_boosted_hexes` but the last radio is CBRS instead of a WIFI with a degraded location score. Interestingly, the coverage points work out to the same values between the differences.
…e-values-in-manifest
- Break out getting the poc allocation bucket sizes. - Make sure math in comments checks out. - Try to make the math for rewards look similar enough to feel good.
- coverage_point_calculator -> reward_shares as it has to do directly with reward shares, and is not about calculating coverage points. - AllocatedRewardShares -> DataTransferAndPocAllocatedRewardBuckets
- `HexPoints` to public so the doc comment can be seem
bumper rails retracting
There will soon be a mobile rewards v2 proto. In which we better define what a "point" means. It was considered that Location Trust was part of a "coverage", that will no longer be the case. Points are the base value provided from covering a Hex, a "coverage point" if you will. Combining those points with location and speedtest multipliers, both things having to with the radio directly, we arrive at "shares".
…ence coverage points including the location trust multiplier, but not the speedtest multiplier has been a source of confusion. Shortly, that will no longer be the case. This method has been renamed to raise an eyebrow as to why it needs a v1 specifier.
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.
lgtm, but as a committer i cant approve
…m-poc-bucket' into andymck/includes-share-values-in-manifest
…m:helium/oracles into andymck/includes-share-values-in-manifest
…e-values-in-manifest
@@ -301,12 +305,21 @@ where | |||
transaction.commit().await?; | |||
|
|||
// now that the db has been purged, safe to write out the manifest | |||
let reward_data = ManifestMobileRewardData { | |||
poc_bones_per_coverage_point: Some(helium_proto::Decimal { | |||
value: poc_dc_shares.normal.to_string(), |
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.
Do we want to support a maximum amount precision?
The rust_decimal docs says trailing zeros may be exposed when in string form, do we want to remove those?
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.
To more precisely address this, here is what the google decimal specification says (which we are adhering to):
Additionally, services **may** preserve trailing zeroes in the fraction
to indicate increased precision, but are not required to do so.
so either option is fine
This PR adds the
bones_per_coverage_point
among other information to the rewards manifest.