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

Mj/radio location forwarder update #889

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
41e4186
Add radio location estimates ingest
macpie Sep 30, 2024
7393e46
Add ingest test
macpie Sep 30, 2024
05ef185
basic verifier daemon
macpie Oct 1, 2024
a0f186f
Process reports
macpie Oct 1, 2024
6722fd0
Clippy
macpie Oct 1, 2024
d118874
Order dependencies
macpie Oct 1, 2024
f8e3bee
Add lat/long to estimates
macpie Oct 2, 2024
ab8636e
Update proto to branch and not local
macpie Oct 2, 2024
5a06691
Change is_valid to invalided_at and invalidate old estimate when new …
macpie Oct 10, 2024
1a2b445
More rebase fix
macpie Oct 10, 2024
9c18874
Add test for verifier
macpie Oct 11, 2024
dd11bda
Fix hash key timestamp
macpie Oct 11, 2024
0727393
Add clear_invalided and improve test
macpie Oct 11, 2024
5d708a0
Maybe ban
macpie Oct 11, 2024
0a633b2
Comment unused code for now
macpie Oct 11, 2024
92c4879
Update proto and add Entity
macpie Oct 14, 2024
baf36bc
Add location cache as a top level thingy
macpie Oct 16, 2024
ff5ccc4
Update location cache to handle cbrs and wifi
macpie Oct 16, 2024
e669c4b
Populate cache with cbrs as well
macpie Oct 16, 2024
62d5ac4
Fix test
macpie Oct 16, 2024
aa9c78f
Update Location Cache
macpie Oct 16, 2024
496a12d
Make rewarder calculate distance
macpie Oct 16, 2024
b5cf377
Update long to lon
macpie Oct 17, 2024
0aedbee
Improve query
macpie Oct 17, 2024
a787bce
Comments
macpie Oct 17, 2024
6a5a084
Update cbrs id
macpie Oct 17, 2024
d70ce5a
fmt clippy test
macpie Oct 17, 2024
a4e9d19
Fix heartbeat_does_not_use_last_good_location_when_more_than_12_hours
macpie Oct 17, 2024
89d00fd
- Rework location cache to have 2 hashmap and not cleanup anymore
macpie Oct 17, 2024
1309282
Update cache to hydrate on new
macpie Oct 17, 2024
279f304
remove old promotion code after rebase
michaeldjeffrey Oct 31, 2024
cec9ea0
update to use proto with hex as a CellIndex and grid_distance
michaeldjeffrey Nov 4, 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
62 changes: 41 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 = "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 @@ -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" }
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