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

Coverage Point Calculator Integration with mobile-verifier #830

Merged
merged 42 commits into from
Jun 21, 2024

Conversation

michaeldjeffrey
Copy link
Contributor

@michaeldjeffrey michaeldjeffrey commented Jun 13, 2024

  • CoveragePoints has been renamed to CoverageRewards.
  • Queries to get information for rewarding radios is done upon construction.
    • CoverageRewards::aggregate_points() renamed to CoverageRewards::new().
  • We now use coverage-map and coverage-point-calculator. (-1,348 huzzah!)

will help with the switchover
This makes coverage points async internally. When cleanup is done there will be a single instance of CoveragePoints.
thresholds being met for a radio are not only about subscribers.
It's the responsibility of the report to only include hexes with active boost values
Keep disctinction between SignalLevel in coverage and coverage-map, this way coverage-map doesn't need to bring in sqlx as a dependency
rewards should never fail. but we can skip a radio and have an alert that says something went wrong.
Move zipping trust scores with their distances to heartbeatreward.
Leave

I put the use statements above where they are in the function because the names of the types kind of overlap with the names used in the mobile verifier, and I wanted to make it extra clear to anyone reading, this function is transforming those values into calculator types.
we can clone the speed_tests and trust_scores as they enter the calculator, but everything else can work with a reference for much longer.
The constructor no longer tries to calculate points, it collects information about radios and coverage. All the pointing happens in into_rewards.
This matches with the other reward structs `MapperShares`, `ServiceProviderShares`. 

And reflects more that we're talking about `reward_shares`, where `coverage_points` is starting to mean points provided towards shares relating only to coverage (excluding backhaul (speedtests)).
This all lives in the coverage-point-calculator now
We can insert coverage objects directly after iterating over them, radio_info only needs to know if the radio `is_indoor`. Moving that binding to the top helps hint that it's set by something in the block and returned.

And we don't need to carry around covered_hexes for any longer than necessary.
@michaeldjeffrey michaeldjeffrey merged commit 6ce7d68 into main Jun 21, 2024
17 checks passed
@michaeldjeffrey michaeldjeffrey deleted the mj/calculator-integration branch June 21, 2024 18:35
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.

3 participants