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

Add radio location estimates #869

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bf03e02
Add radio location estimates ingest
macpie Sep 30, 2024
22f9ffc
Add ingest test
macpie Sep 30, 2024
4ae1e0d
basic verifier daemon
macpie Oct 1, 2024
d9fc8e9
Process reports
macpie Oct 1, 2024
da4d5e8
Clippy
macpie Oct 1, 2024
cfbcc1a
Order dependencies
macpie Oct 1, 2024
6190857
Add lat/long to estimates
macpie Oct 2, 2024
e6859f8
Update proto to branch and not local
macpie Oct 2, 2024
a9ed267
Change is_valid to invalided_at and invalidate old estimate when new …
macpie Oct 10, 2024
7ec39de
Fix lock after rebase
macpie Oct 10, 2024
85942f2
More rebase fix
macpie Oct 10, 2024
1e42e4c
Add test for verifier
macpie Oct 11, 2024
f8d2bd3
Fix hash key timestamp
macpie Oct 11, 2024
6cf9779
Add clear_invalided and improve test
macpie Oct 11, 2024
1e47db4
Maybe ban
macpie Oct 11, 2024
72526b9
Comment unused code for now
macpie Oct 11, 2024
e3f4c9f
Update proto and add Entity
macpie Oct 14, 2024
865b6d1
Add location cache as a top level thingy
macpie Oct 16, 2024
1167c2d
Update location cache to handle cbrs and wifi
macpie Oct 16, 2024
925e64e
Populate cache with cbrs as well
macpie Oct 16, 2024
2e57553
Fix test
macpie Oct 16, 2024
04ccd71
Update Location Cache
macpie Oct 16, 2024
45fda23
Make rewarder calculate distance
macpie Oct 16, 2024
42a3bd0
Update long to lon
macpie Oct 17, 2024
e3ad81f
Improve query
macpie Oct 17, 2024
0b63522
Comments
macpie Oct 17, 2024
d17932a
Update cbrs id
macpie Oct 17, 2024
28df640
fmt clippy test
macpie Oct 17, 2024
eeea8e9
Fix heartbeat_does_not_use_last_good_location_when_more_than_12_hours
macpie Oct 17, 2024
1004ffb
- Rework location cache to have 2 hashmap and not cleanup anymore
macpie Oct 17, 2024
62bde0f
Update cache to hydrate on new
macpie Oct 17, 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
61 changes: 40 additions & 21 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 = "macpie/radio_location_estimates", features = [
"services",
] }
beacon = { git = "https://github.com/helium/proto", branch = "master" }
beacon = { git = "https://github.com/helium/proto", branch = "macpie/radio_location_estimates" }
solana-client = "1.18"
solana-sdk = "1.18"
solana-program = "1.18"
Expand Down Expand Up @@ -132,4 +132,3 @@ sqlx = { git = "https://github.com/helium/sqlx.git", rev = "92a2268f02e0cac6fccb
#
# [patch.'https://github.com/helium/proto']
# helium-proto = { path = "../proto" }
# beacon = { path = "../proto/beacon" }
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 @@ -21,12 +21,15 @@ pub mod mobile_session;
pub mod mobile_subscriber;
pub mod mobile_transfer;
pub mod promotion_reward;
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