diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 06fff579..7fc27a85 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -390,6 +390,47 @@ service poc_mobile { returns (hex_usage_stats_res_v1); rpc submit_radio_usage_stats_report(radio_usage_stats_req_v1) returns (radio_usage_stats_res_v1); + rpc submit_unique_connections(unique_connections_req_v1) + returns (unique_connections_resp_v1); +} + +message unique_connections_req_v1 { + // Wifi Radio pubkey + bytes pubkey = 1; + // Start timestamp in milliseconds of window used + // to calculate unique connections + uint64 start_timestamp = 2; + // End timestamp in milliseconds of window used + // to calculate unique connections + uint64 end_timestamp = 3; + // Number of unique connection over the window looking + // backwards from timestamp + uint64 unique_connections = 4; + + // Timestamp unique counts was sent in milliseconds + uint64 timestamp = 5; + bytes carrier_key = 6; + bytes signature = 7; +} + +message unique_connections_resp_v1 { uint64 timestamp = 1; } + +message unique_connections_ingest_report_v1 { + // Timestamp in milliseconds report was received by ingestor + uint64 received_timestamp = 1; + unique_connections_req_v1 report = 2; +} + +enum verified_unique_connections_ingest_report_status { + verified_unique_connections_ingest_report_status_valid = 0; + verified_unique_connections_ingest_report_status_invalid_carrier_key = 1; +} + +message verified_unique_connections_ingest_report_v1 { + // Timestamp in milliseconds report was verified by oracles + uint64 timestamp = 1; + unique_connections_ingest_report_v1 report = 2; + verified_unique_connections_ingest_report_status status = 3; } message file_info { @@ -547,12 +588,21 @@ message radio_reward { repeated boosted_hex boosted_hexes = 10; } -enum boosted_hex_status { - boosted_hex_status_eligible = 0; - boosted_hex_status_location_score_below_threshold = 1; - boosted_hex_status_radio_threshold_not_met = 2; - boosted_hex_status_service_provider_ban = 3; - boosted_hex_status_average_asserted_distance_over_limit = 4; +enum sp_boosted_hex_status { + sp_boosted_hex_status_eligible = 0; + sp_boosted_hex_status_location_score_below_threshold = 1; + sp_boosted_hex_status_radio_threshold_not_met = 2; + sp_boosted_hex_status_service_provider_ban = 3; + sp_boosted_hex_status_average_asserted_distance_over_limit = 4; +} + +enum oracle_boosted_hex_status { + oracle_boosted_hex_status_eligible = 0; + oracle_boosted_hex_status_banned = 1; + // Radio meets the requirements to be a "Qualified Hotspot" + // laid out in HIP-134 + // https://github.com/helium/HIP/blob/main/0134-reward-mobile-carrier-offload-hotspots.md#detailed-explanation + oracle_boosted_hex_status_qualified = 2; } message radio_reward_v2 { @@ -621,13 +671,16 @@ message radio_reward_v2 { Decimal speedtest_multiplier = 14; // eligibility of radio to earn service provider boosted rewards - boosted_hex_status boosted_hex_status = 15; + sp_boosted_hex_status sp_boosted_hex_status = 15; // all hexes covered by the radio repeated covered_hex covered_hexes = 16; // average speedtests result speedtest speedtest_average = 17; + + // eligibility of radio to earn oracle boosted rewards + oracle_boosted_hex_status oracle_boosted_hex_status = 18; } message boosted_hex {