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
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1cfff2a
Modeled coverage phase 1
maplant Aug 28, 2023
aeb9e0a
Address comments
maplant Aug 29, 2023
cc4d148
Fmt
maplant Aug 29, 2023
2570f8a
Modeled coverage phase 3
maplant Aug 28, 2023
a79c151
Add coverage points, seniority, and coverage object to radio output
maplant Aug 30, 2023
45379ac
Merge remote-tracking branch 'origin/main' into map/mc-p1
maplant Aug 31, 2023
f76cccc
Merge remote-tracking branch 'origin/map/mc-p1' into map/mc-p3
maplant Aug 31, 2023
c1015e7
Fix error in test that snuck in somehow
maplant Aug 31, 2023
03d7230
Merge remote-tracking branch 'origin/map/mc-p1' into map/mc-p3
maplant Aug 31, 2023
d9d0126
Merge remote-tracking branch 'origin/main' into map/mc-p1
maplant Sep 1, 2023
5f8db85
Merge remote-tracking branch 'origin/map/mc-p1' into map/mc-p3
maplant Sep 1, 2023
c5bf10a
Add on conflict to hex_coverage insertion
maplant Sep 5, 2023
7efabf0
Add on conflict to hex_coverage insertion
maplant Sep 5, 2023
a018fa7
Merge remote-tracking branch 'origin/map/mc-p1' into map/mc-p3
maplant Sep 6, 2023
e383f73
Fix gateway issue
maplant Sep 6, 2023
0a32b19
Check if hex_coverage is empty in coalesce
maplant Sep 11, 2023
b232e6d
Merge remote-tracking branch 'origin/map/mc-p1' into map/mc-p3
maplant Sep 11, 2023
188aada
Remove duplicate hex coverage checks for testing
maplant Sep 12, 2023
a717365
Merge remote-tracking branch 'origin/map/mc-p1' into map/mc-p3
maplant Sep 12, 2023
73e7f85
Move to invalidating previous coverage objects
maplant Sep 14, 2023
cf8edd7
Add is null check for invalidated_at in update
maplant Sep 15, 2023
7e4afbb
Merge remote-tracking branch 'origin/main' into map/mc-p1
maplant Oct 6, 2023
1ab933c
Merge remote-tracking branch 'origin/main' into map/mc-p1
maplant Oct 30, 2023
19b2cea
Fix up MC Phase 1 to handle wifi coverage objects
maplant Nov 1, 2023
8a724d4
Make coverage objects optional for phase 1
maplant Nov 1, 2023
c5d32b0
Fix iot-beacon-report
maplant Nov 1, 2023
57c1f1c
Merge remote-tracking branch 'origin/map/mc-p1' into map/mc-p3
maplant Nov 2, 2023
6f726cb
Merge remote-tracking branch 'origin/main' into map/mc-p3
maplant Nov 13, 2023
443e8c6
Fix unit tests
maplant Nov 13, 2023
8b6d764
Add random asserted location
maplant Nov 13, 2023
68ac513
Implement HIP 85
maplant Nov 15, 2023
66d87a4
Merge remote-tracking branch 'origin/main' into map/mc-p3
maplant Nov 15, 2023
35437d4
Add back bad coverage object check
maplant Nov 16, 2023
ee3d68a
Use zip instead of enumerate
maplant Nov 16, 2023
8a8e51d
Add signal_power to SELECTs where it was missing
maplant Nov 16, 2023
14ca562
Fix tests (except for scenario six which doesn't map well to HIP85)
maplant Nov 16, 2023
fb578de
Remove NULL and invalid coverage objects
maplant Nov 16, 2023
f12f387
Fmt
maplant Nov 16, 2023
8f8b818
Remove the notion of radio reward weights. Fix tests
maplant Nov 17, 2023
9005fa0
Fix issues in reward shares
Nov 20, 2023
8a03310
Fix test case
Nov 21, 2023
c4eb946
Rename reward_weight to location_trust_score_multiplier
Nov 21, 2023
17940e5
Address some comments
Nov 21, 2023
3bb4e28
Clippy
Nov 21, 2023
2caaa53
Merge remote-tracking branch 'origin/main' into map/mc-p3
Nov 22, 2023
9b4bf23
Fix test
maplant Nov 27, 2023
6732928
Fix empty coverage object
maplant Nov 28, 2023
cdb79d4
Allow for updating hex coverage, add log for rewards per share
maplant Nov 29, 2023
4672a28
Rename coverage claim time to seniority timestamp
maplant Nov 29, 2023
f040626
Remove distance check
maplant Dec 4, 2023
0c23cb8
Revert "Remove distance check"
maplant Dec 4, 2023
d754245
Make distance check only for CBRS radios
maplant Dec 4, 2023
ff93d95
Revert "Make distance check only for CBRS radios"
maplant Dec 4, 2023
914bfe5
Reapply "Remove distance check"
maplant Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ sqlx = {version = "0", features = [
"macros",
"runtime-tokio-rustls"
]}

helium-crypto = {version = "0.8.1", features=["sqlx-postgres", "multisig"]}
helium-proto = {git = "https://github.com/helium/proto", branch = "master", features = ["services"]}
hextree = "*"
Expand Down
11 changes: 11 additions & 0 deletions mobile_verifier/migrations/20_remove_null_coverage_objects.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- Remove NULL and invalid coverage objects from WiFi heartbeats:
DELETE FROM wifi_heartbeats WHERE coverage_object IS NULL;
DELETE FROM wifi_heartbeats WHERE coverage_object NOT IN (SELECT uuid FROM hex_coverage);

-- Remove NULL and invalid coverage objects from CBRS heartbeats:
DELETE FROM cbrs_heartbeats WHERE coverage_object IS NULL;
DELETE FROM cbrs_heartbeats WHERE coverage_object NOT IN (SELECT uuid FROM hex_coverage);

-- Add the NOT NULL constraint to coverage objects for wifi and cbrs heartbeats:
ALTER TABLE wifi_heartbeats ALTER COLUMN coverage_object SET NOT NULL;
ALTER TABLE cbrs_heartbeats ALTER COLUMN coverage_object SET NOT NULL;
12 changes: 0 additions & 12 deletions mobile_verifier/src/cell_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@ impl CellType {
}
}

pub fn reward_weight(&self) -> Decimal {
jeffgrunewald marked this conversation as resolved.
Show resolved Hide resolved
match self {
Self::Nova436H => dec!(4.0),
Self::Nova430I => dec!(2.5),
Self::Neutrino430 => dec!(1.0),
Self::SercommIndoor => dec!(1.0),
Self::SercommOutdoor => dec!(2.5),
Self::CellTypeNone => dec!(0.0),
Self::NovaGenericWifiIndoor => dec!(0.4),
}
}

pub fn location_weight(
&self,
location_validation_timestamp: Option<DateTime<Utc>>,
Expand Down
5 changes: 3 additions & 2 deletions mobile_verifier/src/cli/reward_from_db.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
heartbeats::HeartbeatReward,
reward_shares::{get_scheduled_tokens_for_poc_and_dc, PocShares},
reward_shares::{get_scheduled_tokens_for_poc_and_dc, CoveragePoints},
speedtests_average::SpeedtestAverages,
Settings,
};
Expand Down Expand Up @@ -39,7 +39,8 @@ impl Cmd {
HeartbeatReward::validated(&pool, &epoch, settings.max_asserted_distance_deviation);
let speedtest_averages =
SpeedtestAverages::aggregate_epoch_averages(epoch.end, &pool).await?;
let reward_shares = PocShares::aggregate(heartbeats, &speedtest_averages).await?;
let reward_shares =
CoveragePoints::aggregate_points(&pool, heartbeats, &speedtest_averages, end).await?;

let mut total_rewards = 0_u64;
let mut owner_rewards = HashMap::<_, u64>::new();
Expand Down
Loading