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

Landtype Boosting #789

Merged
merged 15 commits into from
Apr 24, 2024
Merged

Landtype Boosting #789

merged 15 commits into from
Apr 24, 2024

Conversation

michaeldjeffrey
Copy link
Contributor

helium/proto#398

Add Landtype to Hex Boosting.


struct HexAssignments

Assignments are never considered individually, nor should they be. This type packs them together, allowing any code that requires specific use of Assignment order to attach itself here.

It also allows boostring_oracles/mod.rs to reduce it's reliance on traits. There is now a single exported BoostedHexAssignments that allows for getting a HexAssignments.


HexBoostData and CoverageDaemon

With only exporting a single trait from boosting_oracles/mod.rs, the CoverageDaemon now takes the concrete struct HexBoostData with no generic arguments.

Downstream from the CoverageDaemon, functions will take impl BoostedHexAssignments so they can be used in tests.


verify-disktree --path <PATH> --type <TYPE> CLI Command

A CLI command was added to mobile-verifier.
It verifies a .h3tree file by making sure that every cell can be turned into an Assignment.

Current only Landtype is supported.

NOTE: In release mode, this function took about 8 minutes to run on my 2.3GHz Intel MacBook Pro for a 28gb file.

cargo run --release --features "file-store/local" -p mobile-verifier -- -c <CONFIG> verify-disktree --help

Other

  • Replaced Geofence::new with Geofence::from_paths so new could used without touching the filesystem.

- initialize hexes without a landtype assignment
- load landtype disktree
- update tests to match HIP-103 chart with all 3 data sets
HexAssignemnts wrap and labels Assignments. The order Assignments are
considered is not always clear unless you have HIP-103 up next to the
code. So we try to funnel all uses of the fields together into one
place, and callers deal with Assignments as a collection.
This is an attempt to simplify the trait soup hex boosting was starting
to become. Until there is a concrete need for more traits, I believe
this flow is easier to follow, and easier to mock at the level desired
in tests.
This command makes sure all values in a disktree file can be turned into
Assignment.
Now a geofence can be constructed directly without needing to go through
a file if you have a HexTreeSet.
The tables in HIP-103 list the assignments (AAA, ABC, etc,.) in the
order (footfall, landtype, urbanized). Having the Debug repr of
Assignments print in the same order makes it easier to cross reference
with the tables.
This test will break if the logic for deriving scores changes. If the
break is on purpose, the test should be updated.
This forces us to go through the proto enum, but provides a stronger
contract for going between types. very nice
Comment on lines +94 to +95
// gray - Outside of USA
(_, _, C) => dec!(0.00),
Copy link
Member

@kurotych kurotych Apr 24, 2024

Choose a reason for hiding this comment

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

Does it mean that all radios outside of the USA won't receive any coverage points?
What about Mexico?

Copy link
Contributor

Choose a reason for hiding this comment

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

HIP-103 contains this paragraph, so radios in Mexico only get PoC if they are in a boosted hex and the oracle_multiplier is auto set to 1.

Further, the HIP authors acknowledge that areas that Service Providers boost through hex boosting are areas where coverage is needed the most. Therefore, if a res12 hex is boosted by a Service Provider of ≥1, the Oracle Multiplier will automatically be 1.00X, regardless of what combination value it is assigned.

@michaeldjeffrey michaeldjeffrey merged commit f4a60da into main Apr 24, 2024
1 check passed
@michaeldjeffrey michaeldjeffrey deleted the mj/landtype-boosting branch April 24, 2024 17:36
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.

5 participants