From 0dca1c52219b4e5b6c13e3d6b42aa7414997eab1 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Wed, 6 Nov 2024 11:11:38 +0000 Subject: [PATCH 1/4] add epoch fields to msgs, add transfer volume fields --- src/service/poc_mobile.proto | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index ff5b4094..5a0c8910 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -7,6 +7,81 @@ import "mapper.proto"; import "hex_boosting.proto"; import "service_provider.proto"; +message hex_usage_counts_req_v1 { + // H3 resolution 10 tile + uint64 hex = 1; + // Average count of unique service provider subscribers active in the hex + // during the epoch ( inclusive of discovery mapping subscribers ) + uint64 service_provider_subscriber_avg_count = 2; + // Average count of unique discovery mapping enabled subscribers active + // in the hex during the epoch + uint64 disco_mapping_avg_count = 3; + // Average count of unique offload users active in the hex during the epoch + uint64 offload_avg_count = 4; + // Unix timestamp in milliseconds of the epoch start + uint64 epoch_start_timestamp = 5; + // Unix timestamp in milliseconds of the epoch end + uint64 epoch_end_timestamp = 6; + // Unix timestamp in milliseconds of when the report was generated + uint64 timestamp = 7; + // Carrier pubkey from verification mapping service + bytes carrier_mapping_key = 8; + // Signed payload of the verification mapping service + bytes signature = 9; +} + +message hex_usage_counts_res_v1 { string id = 1; } + +message hex_usage_counts_ingest_report_v1 { + // Timestamp in milliseconds since unix epoch + uint64 received_timestamp = 1; + // the verified report + hex_usage_counts_req_v1 report = 2; +} + +message radio_usage_counts_req_v1 { + // The onchain address of the hotspot + bytes hotspot_pubkey = 1; + // the cbsd id of the radio if it is a cbrs radio otherwise empty + string cbsd_id = 2; + // Average count of unique service provider subscribers which have connected + // to the radio during the epoch ( inclusive of discovery mapping + // subscribers ) + uint64 service_provider_subscriber_avg_count = 3; + // Average count of unique discovery mapping subscribers which + // have connected to the radio during the epoch + uint64 disco_mapping_avg_count = 4; + // Average count of unique offload users which have connected to the radio + // during the epoch + uint64 offload_avg_count = 5; + // total count of bytes transferred via the radio by service provider + // subscribers during the epoch made up of a sum of upload and download bytes + uint64 service_provider_transfer_bytes = 6; + // total count of bytes transferred via the radio by offload users + // during the epoch + // made up of a sum of upload and download bytes + uint64 offload_transfer_bytes = 7; + // Unix timestamp in milliseconds of the epoch start + uint64 epoch_start_timestamp = 8; + // Unix timestamp in milliseconds of the epoch end + uint64 epoch_end_timestamp = 9; + // Unix timestamp in milliseconds of when the report was generated + uint64 timestamp = 10; + // Carrier pubkey from verification mapping service + bytes carrier_mapping_key = 11; + // Signed payload of the verification mapping service + bytes signature = 12; +} + +message radio_usage_counts_res_v1 { string id = 1; } + +message radio_usage_counts_ingest_report_v1 { + // Timestamp in milliseconds since unix epoch + uint64 received_timestamp = 1; + // the verified report + radio_usage_counts_req_v1 report = 2; +} + message speedtest_req_v1 { bytes pub_key = 1; string serial = 2; @@ -303,6 +378,10 @@ service poc_mobile { rpc submit_subscriber_verified_mapping_event( subscriber_verified_mapping_event_req_v1) returns (subscriber_verified_mapping_event_res_v1); + rpc submit_hex_usage_counts_report(hex_usage_counts_req_v1) + returns (hex_usage_counts_res_v1); + rpc submit_radio_usage_counts_report(radio_usage_counts_req_v1) + returns (radio_usage_counts_res_v1); } message file_info { From ab4fc88af901cbb09a520cc86c8e029021e7bbc7 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Thu, 7 Nov 2024 12:01:30 +0000 Subject: [PATCH 2/4] remove average references --- src/service/poc_mobile.proto | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 5a0c8910..f8563ebd 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -10,14 +10,14 @@ import "service_provider.proto"; message hex_usage_counts_req_v1 { // H3 resolution 10 tile uint64 hex = 1; - // Average count of unique service provider subscribers active in the hex - // during the epoch ( inclusive of discovery mapping subscribers ) - uint64 service_provider_subscriber_avg_count = 2; - // Average count of unique discovery mapping enabled subscribers active + // Number of unique service provider subscribers active in the hex + // during the epoch ( inclusive of discovery mapping enabled subscribers ) + uint64 service_provider_subscriber_count = 2; + // Number of unique discovery mapping enabled subscribers active // in the hex during the epoch - uint64 disco_mapping_avg_count = 3; - // Average count of unique offload users active in the hex during the epoch - uint64 offload_avg_count = 4; + uint64 disco_mapping_count = 3; + // Number of unique offload users active in the hex during the epoch + uint64 offload_count = 4; // Unix timestamp in milliseconds of the epoch start uint64 epoch_start_timestamp = 5; // Unix timestamp in milliseconds of the epoch end @@ -44,22 +44,22 @@ message radio_usage_counts_req_v1 { bytes hotspot_pubkey = 1; // the cbsd id of the radio if it is a cbrs radio otherwise empty string cbsd_id = 2; - // Average count of unique service provider subscribers which have connected + // Number of unique service provider subscribers which have connected // to the radio during the epoch ( inclusive of discovery mapping - // subscribers ) - uint64 service_provider_subscriber_avg_count = 3; - // Average count of unique discovery mapping subscribers which + // enabled subscribers ) + uint64 service_provider_subscriber_count = 3; + // Number of unique discovery mapping subscribers which // have connected to the radio during the epoch - uint64 disco_mapping_avg_count = 4; - // Average count of unique offload users which have connected to the radio + uint64 disco_mapping_count = 4; + // Number of unique offload users which have connected to the radio // during the epoch - uint64 offload_avg_count = 5; + uint64 offload_count = 5; // total count of bytes transferred via the radio by service provider - // subscribers during the epoch made up of a sum of upload and download bytes + // subscribers during the epoch, inclusive of upload and download uint64 service_provider_transfer_bytes = 6; // total count of bytes transferred via the radio by offload users // during the epoch - // made up of a sum of upload and download bytes + // inclusive of upload and download uint64 offload_transfer_bytes = 7; // Unix timestamp in milliseconds of the epoch start uint64 epoch_start_timestamp = 8; From 238ac3e532215b35f719daba3b9fa59079318388 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Fri, 8 Nov 2024 13:45:43 +0000 Subject: [PATCH 3/4] add byte counts to hex usage proto --- src/service/poc_mobile.proto | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index f8563ebd..11ba92ef 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -18,16 +18,24 @@ message hex_usage_counts_req_v1 { uint64 disco_mapping_count = 3; // Number of unique offload users active in the hex during the epoch uint64 offload_count = 4; + // total count of bytes transferred via radios located in the hex + // by service provider subscribers during the epoch, + // inclusive of upload and download + uint64 service_provider_transfer_bytes = 5; + // total count of bytes transferred via radios located in the hex + // by offload users during the epoch + // inclusive of upload and download + uint64 offload_transfer_bytes = 6; // Unix timestamp in milliseconds of the epoch start - uint64 epoch_start_timestamp = 5; + uint64 epoch_start_timestamp = 7; // Unix timestamp in milliseconds of the epoch end - uint64 epoch_end_timestamp = 6; + uint64 epoch_end_timestamp = 8; // Unix timestamp in milliseconds of when the report was generated - uint64 timestamp = 7; + uint64 timestamp = 9; // Carrier pubkey from verification mapping service - bytes carrier_mapping_key = 8; + bytes carrier_mapping_key = 10; // Signed payload of the verification mapping service - bytes signature = 9; + bytes signature = 11; } message hex_usage_counts_res_v1 { string id = 1; } From 1b9d9548a6f7c4d390cf0585b2d7c61f564e0d8a Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Mon, 11 Nov 2024 11:44:55 +0000 Subject: [PATCH 4/4] rename msgs and various fields --- src/service/poc_mobile.proto | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 11ba92ef..06fff579 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -7,17 +7,17 @@ import "mapper.proto"; import "hex_boosting.proto"; import "service_provider.proto"; -message hex_usage_counts_req_v1 { +message hex_usage_stats_req_v1 { // H3 resolution 10 tile uint64 hex = 1; // Number of unique service provider subscribers active in the hex // during the epoch ( inclusive of discovery mapping enabled subscribers ) - uint64 service_provider_subscriber_count = 2; + uint64 service_provider_user_count = 2; // Number of unique discovery mapping enabled subscribers active // in the hex during the epoch - uint64 disco_mapping_count = 3; + uint64 disco_mapping_user_count = 3; // Number of unique offload users active in the hex during the epoch - uint64 offload_count = 4; + uint64 offload_user_count = 4; // total count of bytes transferred via radios located in the hex // by service provider subscribers during the epoch, // inclusive of upload and download @@ -38,16 +38,16 @@ message hex_usage_counts_req_v1 { bytes signature = 11; } -message hex_usage_counts_res_v1 { string id = 1; } +message hex_usage_stats_res_v1 { string id = 1; } -message hex_usage_counts_ingest_report_v1 { +message hex_usage_stats_ingest_report_v1 { // Timestamp in milliseconds since unix epoch uint64 received_timestamp = 1; // the verified report - hex_usage_counts_req_v1 report = 2; + hex_usage_stats_req_v1 report = 2; } -message radio_usage_counts_req_v1 { +message radio_usage_stats_req_v1 { // The onchain address of the hotspot bytes hotspot_pubkey = 1; // the cbsd id of the radio if it is a cbrs radio otherwise empty @@ -55,13 +55,13 @@ message radio_usage_counts_req_v1 { // Number of unique service provider subscribers which have connected // to the radio during the epoch ( inclusive of discovery mapping // enabled subscribers ) - uint64 service_provider_subscriber_count = 3; + uint64 service_provider_user_count = 3; // Number of unique discovery mapping subscribers which // have connected to the radio during the epoch - uint64 disco_mapping_count = 4; + uint64 disco_mapping_user_count = 4; // Number of unique offload users which have connected to the radio // during the epoch - uint64 offload_count = 5; + uint64 offload_user_count = 5; // total count of bytes transferred via the radio by service provider // subscribers during the epoch, inclusive of upload and download uint64 service_provider_transfer_bytes = 6; @@ -81,13 +81,13 @@ message radio_usage_counts_req_v1 { bytes signature = 12; } -message radio_usage_counts_res_v1 { string id = 1; } +message radio_usage_stats_res_v1 { string id = 1; } -message radio_usage_counts_ingest_report_v1 { +message radio_usage_stats_ingest_report_v1 { // Timestamp in milliseconds since unix epoch uint64 received_timestamp = 1; // the verified report - radio_usage_counts_req_v1 report = 2; + radio_usage_stats_req_v1 report = 2; } message speedtest_req_v1 { @@ -386,10 +386,10 @@ service poc_mobile { rpc submit_subscriber_verified_mapping_event( subscriber_verified_mapping_event_req_v1) returns (subscriber_verified_mapping_event_res_v1); - rpc submit_hex_usage_counts_report(hex_usage_counts_req_v1) - returns (hex_usage_counts_res_v1); - rpc submit_radio_usage_counts_report(radio_usage_counts_req_v1) - returns (radio_usage_counts_res_v1); + rpc submit_hex_usage_stats_report(hex_usage_stats_req_v1) + returns (hex_usage_stats_res_v1); + rpc submit_radio_usage_stats_report(radio_usage_stats_req_v1) + returns (radio_usage_stats_res_v1); } message file_info {