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

Modeled Coverage Phase 3 #620

Merged
merged 54 commits into from
Dec 4, 2023
Merged

Modeled Coverage Phase 3 #620

merged 54 commits into from
Dec 4, 2023

Conversation

maplant
Copy link
Contributor

@maplant maplant commented Aug 28, 2023

No description provided.

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.

Am I understanding correctly that the split between indoor and outdoor covered hexes is intended to be generic across both CBRS and Wifi hotspots, since CBRS gateways can have multiple radios, both indoor and outdoor (hypothetically) and thus might have results in both hashmaps while a wifi hotspot should only have a single set of either indoor or outdoor hashmap entries in any nearby covered hexes since they map 1-to-1 hotspot key/gateway-to-radio?

mobile_verifier/src/coverage.rs Show resolved Hide resolved
mobile_verifier/src/coverage.rs Show resolved Hide resolved
mobile_verifier/src/coverage.rs Show resolved Hide resolved
mobile_verifier/src/coverage.rs Show resolved Hide resolved
mobile_verifier/src/coverage.rs Outdated Show resolved Hide resolved
mobile_verifier/src/coverage.rs Show resolved Hide resolved
mobile_verifier/src/heartbeats/mod.rs Show resolved Hide resolved
mobile_verifier/src/reward_shares.rs Show resolved Hide resolved
mobile_verifier/src/reward_shares.rs Outdated Show resolved Hide resolved
mobile_verifier/src/reward_shares.rs Show resolved Hide resolved
epoch: &Range<DateTime<Utc>>,
_max_distance: f64,
max_distance: f64,
Copy link
Contributor

Choose a reason for hiding this comment

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

noting here reminder to derive wifi indoor from the coverage object rather than defaulting to indoor in the validate_heartbeat function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm planning on doing that as a PR after.

Copy link
Contributor

Choose a reason for hiding this comment

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

Brian mentioned yesterday that wifi outdoor should just work with this PR, but this wont be the case here where we default to wifi indoor. Wifi outdoor is also not supported in the cell_type.rs. As such it is not the case that wifi outdoor should just work. We should confirm expectation re wifi outdoor and this PR

mobile_verifier/src/reward_shares.rs Show resolved Hide resolved
mobile_verifier/src/reward_shares.rs 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.

I recognize it went in already from a previous PR but I would really like KeyType and OwnedKeyType to get renamed to something that makes them distinct from the public key "key type" that PublicKeyBinary might actually refer to (RSA, Ed25519, EccCompact, etc). Something more like "Address" or "Identifier" which I think more clearly illustrates that the type is used to find a printable (or easily converted to printable) identifier

mobile_verifier/src/cell_type.rs Show resolved Hide resolved
mobile_verifier/src/heartbeats/mod.rs Show resolved Hide resolved
@@ -253,7 +298,7 @@ impl HeartbeatReward {
}

pub fn reward_weight(&self) -> Decimal {
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks to be unsued now, any reason not to remove it?

epoch: &Range<DateTime<Utc>>,
_max_distance: f64,
max_distance: f64,
Copy link
Contributor

Choose a reason for hiding this comment

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

Brian mentioned yesterday that wifi outdoor should just work with this PR, but this wont be the case here where we default to wifi indoor. Wifi outdoor is also not supported in the cell_type.rs. As such it is not the case that wifi outdoor should just work. We should confirm expectation re wifi outdoor and this PR


let diff = expected_total_rewards - distributed_total_rewards;
let diff = expected_total_rewards as i128 - distributed_total_rewards as i128;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need i128 here? Nothing here should be breaching i64 limits and if they are its a bit of a red flag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the expected could be greater or less, and these are u64s not i64s

Comment on lines 1468 to 1471
// confirm owner 1 reward is 0.1 of owner 2's reward
// owner 1 is a wifi indoor with a distance_to_asserted > max
// and so gets the reduced reward scale of 0.1 ( radio reward scale of 0.4 * location scale of 0.25)
// owner 2 is a cbrs sercomm indoor which has a reward scale of 1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// confirm owner 1 reward is 0.1 of owner 2's reward
// owner 1 is a wifi indoor with a distance_to_asserted > max
// and so gets the reduced reward scale of 0.1 ( radio reward scale of 0.4 * location scale of 0.25)
// owner 2 is a cbrs sercomm indoor which has a reward scale of 1.0
// confirm owner 1 reward is 0.25 of owner 2's reward
// owner 1 is a wifi indoor with a distance_to_asserted > max
// and so gets a location scale of 0.25
// owner 2 is a cbrs sercomm indoor which has a location scale of 1.0

@maplant maplant merged commit 1a4d893 into main Dec 4, 2023
1 check passed
@maplant maplant deleted the map/mc-p3 branch December 4, 2023 17:18
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