Open
Conversation
connormck333
commented
Dec 19, 2025
Cargo.toml
Outdated
| # [patch.'https://github.com/helium/proto'] | ||
| # helium-proto = { git = "https://www.github.com/helium/proto.git", branch = "dcyoung/radio-usage-stats-req-v2" } | ||
| [patch.'https://github.com/helium/proto'] | ||
| helium-proto = { git = "https://www.github.com/helium/proto.git", branch = "connor/missing-bones-sp-rewards" } |
Contributor
|
I'd like to see if we can tighten some of this up.
Also wondering if we still need to be committing speedtest_averages during rewards? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the current rewarding, depending on the total epoch emissions there may be a bone unaccounted for due to rounding. Currently, we write an unallocated reward for unaccounted for bones during poc rewarding. We do not write unallocated rewards for service providers because the full amount is rewarded. In total, this accounts for 94% of the total epoch emissions.
If the poc unallocated amount is less than 1, it will not be written. The problem is that when we calculate the reward amount for service providers, we round to 0, which could dismiss 0.8 of a bone. If we are dismissing 0.6 of a bone during poc rewarding, and dismissing 0.8 of a bone during service provider rewarding, we then have 1.4 bones that are unaccounted for.
Example:
Total epoch emissions 82191780821915
poc and dc rewards: 57534246575340
sp: 19726027397259
poc unallocated: 0.5
sp unallocated: 0.6 (both less than 0 so no unallocated reward written)
result: 77260273972599
94%: 77260273972600.1
Missing 1.1 bones
In this PR, I have moved the writing of unallocated rewards out of poc. Now we calculate the difference between 94% of total rewards and the allocated poc and dc rewards which is to be rewarded to service providers.