Skip to content

Radio Location Estimates ingest #899

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

Draft
wants to merge 48 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5b5568a
Add radio location estimates ingest
macpie Sep 30, 2024
2362d90
Add ingest test
macpie Sep 30, 2024
0103e39
basic verifier daemon
macpie Oct 1, 2024
948e642
Process reports
macpie Oct 1, 2024
a8894f7
Clippy
macpie Oct 1, 2024
1805c02
Order dependencies
macpie Oct 1, 2024
8719248
Add lat/long to estimates
macpie Oct 2, 2024
145c2b0
Update proto to branch and not local
macpie Oct 2, 2024
4e518fc
Change is_valid to invalided_at and invalidate old estimate when new …
macpie Oct 10, 2024
3309a74
More rebase fix
macpie Oct 10, 2024
ea28196
Add test for verifier
macpie Oct 11, 2024
489ee6f
Fix hash key timestamp
macpie Oct 11, 2024
e4d4fab
Add clear_invalided and improve test
macpie Oct 11, 2024
0047515
Maybe ban
macpie Oct 11, 2024
a6ec57f
Comment unused code for now
macpie Oct 11, 2024
5205d74
Update proto and add Entity
macpie Oct 14, 2024
126085c
Add location cache as a top level thingy
macpie Oct 16, 2024
73aee29
Update location cache to handle cbrs and wifi
macpie Oct 16, 2024
fc89ea3
Populate cache with cbrs as well
macpie Oct 16, 2024
5ec1239
Fix test
macpie Oct 16, 2024
f24ae0d
Update Location Cache
macpie Oct 16, 2024
67f040e
Make rewarder calculate distance
macpie Oct 16, 2024
3acaa02
Update long to lon
macpie Oct 17, 2024
8ccb3db
Improve query
macpie Oct 17, 2024
649c0c8
Comments
macpie Oct 17, 2024
d52a785
Update cbrs id
macpie Oct 17, 2024
1b22529
fmt clippy test
macpie Oct 17, 2024
3b900bd
Fix heartbeat_does_not_use_last_good_location_when_more_than_12_hours
macpie Oct 17, 2024
5121497
- Rework location cache to have 2 hashmap and not cleanup anymore
macpie Oct 17, 2024
b2ee232
Update cache to hydrate on new
macpie Oct 17, 2024
ca98082
remove old promotion code after rebase
michaeldjeffrey Oct 31, 2024
5b1cf94
update to use proto with hex as a CellIndex and grid_distance
michaeldjeffrey Nov 4, 2024
be98ec1
fix db field typo
michaeldjeffrey Nov 5, 2024
4f4aca1
Start for rewarder work
macpie Oct 17, 2024
c17d66d
Make it a function for testing
macpie Oct 17, 2024
908ed90
test for get_untrusted_radios
macpie Oct 18, 2024
d8cb4e9
missed typo fix
michaeldjeffrey Nov 5, 2024
e68a4ac
add method for turning cached latlng into cell
michaeldjeffrey Nov 5, 2024
6eba267
update to use hex and grid_distance over latlng radius
michaeldjeffrey Nov 5, 2024
b3e6f79
try fold valid estimates
michaeldjeffrey Nov 5, 2024
bc99dd0
trying to simplify this collecting into collections
michaeldjeffrey Nov 6, 2024
a66ac6b
remove radio location correlation for updated proto
michaeldjeffrey Nov 19, 2024
194688d
group proto into nice namespace
michaeldjeffrey Nov 19, 2024
ac009b0
fix typo
michaeldjeffrey Nov 19, 2024
83e3bb8
remove dead code allow
michaeldjeffrey Nov 19, 2024
e38a159
update to latest proto
michaeldjeffrey Nov 19, 2024
fa2a4b8
rename migrations to handle PRs merged in between
michaeldjeffrey Nov 19, 2024
870f29e
fixup tests
michaeldjeffrey Nov 20, 2024
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
56 changes: 38 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ helium-lib = { git = "https://github.com/helium/helium-wallet-rs.git", branch =
hextree = { git = "https://github.com/jaykickliter/HexTree", branch = "main", features = [
"disktree",
] }
helium-proto = { git = "https://github.com/helium/proto", branch = "master", features = [
helium-proto = { git = "https://github.com/helium/proto", branch = "mj/radio_location_esimates_with_hexes", features = [
"services",
] }
beacon = { git = "https://github.com/helium/proto", branch = "master" }
beacon = { git = "https://github.com/helium/proto", branch = "mj/radio_location_esimates_with_hexes" }
solana-client = "1.18"
solana-sdk = "1.18"
solana-program = "1.18"
Expand Down Expand Up @@ -134,4 +134,3 @@ sqlx = { git = "https://github.com/launchbadge/sqlx.git", rev = "42dd78fe931df65
#
# [patch.'https://github.com/helium/proto']
# helium-proto = { path = "../proto" }
# beacon = { path = "../proto/beacon" }
2 changes: 2 additions & 0 deletions file_store/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ pub enum Error {
//Not recommended for internal use!
#[error("external error")]
ExternalError(#[from] Box<dyn std::error::Error + Send + Sync>),
#[error("error parsing decimal")]
IntoDecimal(#[from] rust_decimal::Error),
}

#[derive(Error, Debug)]
Expand Down
11 changes: 11 additions & 0 deletions file_store/src/file_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ pub const VERIFIED_SUBSCRIBER_VERIFIED_MAPPING_INGEST_REPORT: &str =
pub const PROMOTION_REWARD_INGEST_REPORT: &str = "promotion_reward_ingest_report";
pub const VERIFIED_PROMOTION_REWARD: &str = "verified_promotion_reward";
pub const SERVICE_PROVIDER_PROMOTION_FUND: &str = "service_provider_promotion_fund";
pub const RADIO_LOCATION_ESTIMATES_INGEST_REPORT: &str = "radio_location_estimates_ingest_report";
pub const VERIFIED_RADIO_LOCATION_ESTIMATES_REPORT: &str =
"verified_radio_location_estimates_report";

#[derive(Debug, PartialEq, Eq, Clone, Serialize, Copy, strum::EnumCount)]
#[serde(rename_all = "snake_case")]
Expand Down Expand Up @@ -228,6 +231,8 @@ pub enum FileType {
PromotionRewardIngestReport,
VerifiedPromotionReward,
ServiceProviderPromotionFund,
RadioLocationEstimatesIngestReport,
VerifiedRadioLocationEstimatesReport,
}

impl fmt::Display for FileType {
Expand Down Expand Up @@ -303,6 +308,8 @@ impl fmt::Display for FileType {
Self::PromotionRewardIngestReport => PROMOTION_REWARD_INGEST_REPORT,
Self::VerifiedPromotionReward => VERIFIED_PROMOTION_REWARD,
Self::ServiceProviderPromotionFund => SERVICE_PROVIDER_PROMOTION_FUND,
Self::RadioLocationEstimatesIngestReport => RADIO_LOCATION_ESTIMATES_INGEST_REPORT,
Self::VerifiedRadioLocationEstimatesReport => VERIFIED_RADIO_LOCATION_ESTIMATES_REPORT,
};
f.write_str(s)
}
Expand Down Expand Up @@ -381,6 +388,8 @@ impl FileType {
Self::PromotionRewardIngestReport => PROMOTION_REWARD_INGEST_REPORT,
Self::VerifiedPromotionReward => VERIFIED_PROMOTION_REWARD,
Self::ServiceProviderPromotionFund => SERVICE_PROVIDER_PROMOTION_FUND,
Self::RadioLocationEstimatesIngestReport => RADIO_LOCATION_ESTIMATES_INGEST_REPORT,
Self::VerifiedRadioLocationEstimatesReport => VERIFIED_RADIO_LOCATION_ESTIMATES_REPORT,
}
}
}
Expand Down Expand Up @@ -458,6 +467,8 @@ impl FromStr for FileType {
PROMOTION_REWARD_INGEST_REPORT => Self::PromotionRewardIngestReport,
VERIFIED_PROMOTION_REWARD => Self::VerifiedPromotionReward,
SERVICE_PROVIDER_PROMOTION_FUND => Self::ServiceProviderPromotionFund,
RADIO_LOCATION_ESTIMATES_INGEST_REPORT => Self::RadioLocationEstimatesIngestReport,
VERIFIED_RADIO_LOCATION_ESTIMATES_REPORT => Self::VerifiedRadioLocationEstimatesReport,
_ => return Err(Error::from(io::Error::from(io::ErrorKind::InvalidInput))),
};
Ok(result)
Expand Down
3 changes: 3 additions & 0 deletions file_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ pub mod mobile_radio_threshold;
pub mod mobile_session;
pub mod mobile_subscriber;
pub mod mobile_transfer;
pub mod radio_location_estimates;
pub mod radio_location_estimates_ingest_report;
pub mod reward_manifest;
mod settings;
pub mod speedtest;
pub mod subscriber_verified_mapping_event;
pub mod subscriber_verified_mapping_event_ingest_report;
pub mod traits;
pub mod verified_radio_location_estimates;
pub mod verified_subscriber_verified_mapping_event_ingest_report;
pub mod wifi_heartbeat;

Expand Down
Loading