From e22d6d0f90f555a84bfb614ed1ef6223116e2a0d Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 9 Jul 2024 11:40:52 -0700 Subject: [PATCH 01/21] Add verified_subscriber_mapping_event_v1 --- src/verification_mapping_v1.proto | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/verification_mapping_v1.proto diff --git a/src/verification_mapping_v1.proto b/src/verification_mapping_v1.proto new file mode 100644 index 00000000..f7aab2c9 --- /dev/null +++ b/src/verification_mapping_v1.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package helium; + +message verified_subscriber_mapping_event_v1 { + // The id of the discovery mapping enabled subscriber + string subscriber_id = 1; + // the accumulated mapping points the subscriber has earned this epoch + uint64 total_reward_points = 2; + // Unix timestamp in seconds of when the mapping event was generated + uint64 timestamp = 3; +} From a3742771df3c8586351ed1349b7aa54f9f702243 Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 9 Jul 2024 11:45:01 -0700 Subject: [PATCH 02/21] Add to build.rs --- build.rs | 1 + ...{verification_mapping_v1.proto => verification_mapping.proto} | 0 2 files changed, 1 insertion(+) rename src/{verification_mapping_v1.proto => verification_mapping.proto} (100%) diff --git a/build.rs b/build.rs index 58a118f5..7dbfd667 100644 --- a/build.rs +++ b/build.rs @@ -30,6 +30,7 @@ const MESSAGES: &[&str] = &[ "src/blockchain_region_param_v1.proto", "src/price_report.proto", "src/hex_boosting.proto", + "src/verification_mapping.proto", ]; macro_rules! config { diff --git a/src/verification_mapping_v1.proto b/src/verification_mapping.proto similarity index 100% rename from src/verification_mapping_v1.proto rename to src/verification_mapping.proto From 1830e11fb33605bcd358c826c672c6181a1f7272 Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 9 Jul 2024 11:48:41 -0700 Subject: [PATCH 03/21] Format --- src/verification_mapping.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/verification_mapping.proto b/src/verification_mapping.proto index f7aab2c9..21582f80 100644 --- a/src/verification_mapping.proto +++ b/src/verification_mapping.proto @@ -3,10 +3,10 @@ syntax = "proto3"; package helium; message verified_subscriber_mapping_event_v1 { - // The id of the discovery mapping enabled subscriber - string subscriber_id = 1; - // the accumulated mapping points the subscriber has earned this epoch - uint64 total_reward_points = 2; - // Unix timestamp in seconds of when the mapping event was generated - uint64 timestamp = 3; + /// The id of the discovery mapping enabled subscriber + string subscriber_id = 1; + /// the accumulated mapping points the subscriber has earned this epoch + uint64 total_reward_points = 2; + /// Unix timestamp in seconds of when the mapping event was generated + uint64 timestamp = 3; } From 8ad202b8c98aea3f2250d7c6d1ebf2b77cb63880 Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 9 Jul 2024 14:42:49 -0700 Subject: [PATCH 04/21] Make verification_mapping a service --- build.rs | 2 +- src/lib.rs | 8 ++++++ src/service/verification_mapping.proto | 35 ++++++++++++++++++++++++++ src/verification_mapping.proto | 12 --------- 4 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 src/service/verification_mapping.proto delete mode 100644 src/verification_mapping.proto diff --git a/build.rs b/build.rs index 7dbfd667..f78b0c58 100644 --- a/build.rs +++ b/build.rs @@ -16,6 +16,7 @@ const SERVICES: &[&str] = &[ "src/service/downlink.proto", "src/service/multi_buy.proto", "src/service/packet_verifier.proto", + "src/service/verification_mapping.proto", ]; const MESSAGES: &[&str] = &[ @@ -30,7 +31,6 @@ const MESSAGES: &[&str] = &[ "src/blockchain_region_param_v1.proto", "src/price_report.proto", "src/hex_boosting.proto", - "src/verification_mapping.proto", ]; macro_rules! config { diff --git a/src/lib.rs b/src/lib.rs index 00044fdc..855d83d4 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,6 +75,14 @@ pub mod services { pub use poc_mobile_server::{PocMobile, PocMobileServer as Server}; } + pub mod verification_mapping { + include!(concat!(env!("OUT_DIR"), "/helium.verification_mapping.rs")); + pub use verification_mapping_client::VerificationMappingClient as Client; + pub use verification_mapping_server::{ + VerificationMapping, VerificationMappingServer as Server, + }; + } + pub mod poc_lora { include!(concat!(env!("OUT_DIR"), "/helium.poc_lora.rs")); pub use poc_lora_client::PocLoraClient as Client; diff --git a/src/service/verification_mapping.proto b/src/service/verification_mapping.proto new file mode 100644 index 00000000..b2ddc83d --- /dev/null +++ b/src/service/verification_mapping.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package helium; + + +message subscriber_mapping_event_req_v1 { + /// The id of the discovery mapping enabled subscriber + string subscriber_id = 1; + /// the accumulated mapping points the subscriber has earned this epoch + uint64 total_reward_points = 2; + /// Unix timestamp in seconds of when the mapping event was generated + uint64 timestamp = 3; + /// pubkey of verification mapping event service + bytes pub_key = 6; + /// signed payload of the verification mapping event service + bytes signature = 7; +} + +message subscriber_mapping_event_res_v1 { + string id = 1; +} + +message verified_subscriber_mapping_event_v1 { + /// The id of the discovery mapping enabled subscriber + string subscriber_id = 1; + /// the accumulated mapping points the subscriber has earned this epoch + uint64 total_reward_points = 2; + /// Unix timestamp in seconds of when the mapping event was generated + uint64 timestamp = 3; +} + + +service verification_mapping { + rpc submit_subscriber_mapping_event(subscriber_mapping_event_req_v1) returns (subscriber_mapping_event_res_v1); +} \ No newline at end of file diff --git a/src/verification_mapping.proto b/src/verification_mapping.proto deleted file mode 100644 index 21582f80..00000000 --- a/src/verification_mapping.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package helium; - -message verified_subscriber_mapping_event_v1 { - /// The id of the discovery mapping enabled subscriber - string subscriber_id = 1; - /// the accumulated mapping points the subscriber has earned this epoch - uint64 total_reward_points = 2; - /// Unix timestamp in seconds of when the mapping event was generated - uint64 timestamp = 3; -} From 04cc9b8de61ad3f60ee5d9741b3153955e89751c Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 9 Jul 2024 14:48:46 -0700 Subject: [PATCH 05/21] Fix --- src/service/verification_mapping.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/verification_mapping.proto b/src/service/verification_mapping.proto index b2ddc83d..3778a11c 100644 --- a/src/service/verification_mapping.proto +++ b/src/service/verification_mapping.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package helium; +package helium.verification_mapping; message subscriber_mapping_event_req_v1 { From daafa2022d25b4faf3d8d641a0228f372010765f Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 9 Jul 2024 14:52:13 -0700 Subject: [PATCH 06/21] Format --- src/service/verification_mapping.proto | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/service/verification_mapping.proto b/src/service/verification_mapping.proto index 3778a11c..ba4e3be7 100644 --- a/src/service/verification_mapping.proto +++ b/src/service/verification_mapping.proto @@ -2,17 +2,16 @@ syntax = "proto3"; package helium.verification_mapping; - message subscriber_mapping_event_req_v1 { /// The id of the discovery mapping enabled subscriber string subscriber_id = 1; - /// the accumulated mapping points the subscriber has earned this epoch + /// The accumulated mapping points the subscriber has earned this epoch uint64 total_reward_points = 2; /// Unix timestamp in seconds of when the mapping event was generated uint64 timestamp = 3; - /// pubkey of verification mapping event service + /// Pubkey of verification mapping event service bytes pub_key = 6; - /// signed payload of the verification mapping event service + /// Signed payload of the verification mapping event service bytes signature = 7; } @@ -23,13 +22,12 @@ message subscriber_mapping_event_res_v1 { message verified_subscriber_mapping_event_v1 { /// The id of the discovery mapping enabled subscriber string subscriber_id = 1; - /// the accumulated mapping points the subscriber has earned this epoch + /// The accumulated mapping points the subscriber has earned this epoch uint64 total_reward_points = 2; /// Unix timestamp in seconds of when the mapping event was generated uint64 timestamp = 3; } - service verification_mapping { rpc submit_subscriber_mapping_event(subscriber_mapping_event_req_v1) returns (subscriber_mapping_event_res_v1); } \ No newline at end of file From ead65c1a70d630bbea19c0e436da3814a7e27310 Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 10 Jul 2024 13:33:41 -0700 Subject: [PATCH 07/21] Make submit_subscriber_mapping_event inside of poc mobile --- src/lib.rs | 8 -------- src/service/poc_mobile.proto | 3 +++ src/{service => }/verification_mapping.proto | 4 ---- 3 files changed, 3 insertions(+), 12 deletions(-) rename src/{service => }/verification_mapping.proto (86%) diff --git a/src/lib.rs b/src/lib.rs index 855d83d4..00044fdc 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,14 +75,6 @@ pub mod services { pub use poc_mobile_server::{PocMobile, PocMobileServer as Server}; } - pub mod verification_mapping { - include!(concat!(env!("OUT_DIR"), "/helium.verification_mapping.rs")); - pub use verification_mapping_client::VerificationMappingClient as Client; - pub use verification_mapping_server::{ - VerificationMapping, VerificationMappingServer as Server, - }; - } - pub mod poc_lora { include!(concat!(env!("OUT_DIR"), "/helium.poc_lora.rs")); pub use poc_lora_client::PocLoraClient as Client; diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index d3523ab9..8bb897a6 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -6,6 +6,7 @@ import "decimal.proto"; import "mapper.proto"; import "hex_boosting.proto"; import "service_provider.proto"; +import "verification_mapping.proto"; message speedtest_req_v1 { bytes pub_key = 1; @@ -290,6 +291,8 @@ service poc_mobile { rpc submit_sp_boosted_rewards_banned_radio( service_provider_boosted_rewards_banned_radio_req_v1) returns (service_provider_boosted_rewards_banned_radio_resp_v1); + rpc submit_subscriber_mapping_event(subscriber_mapping_event_req_v1) + returns (subscriber_mapping_event_res_v1); } message file_info { diff --git a/src/service/verification_mapping.proto b/src/verification_mapping.proto similarity index 86% rename from src/service/verification_mapping.proto rename to src/verification_mapping.proto index ba4e3be7..cad2c942 100644 --- a/src/service/verification_mapping.proto +++ b/src/verification_mapping.proto @@ -26,8 +26,4 @@ message verified_subscriber_mapping_event_v1 { uint64 total_reward_points = 2; /// Unix timestamp in seconds of when the mapping event was generated uint64 timestamp = 3; -} - -service verification_mapping { - rpc submit_subscriber_mapping_event(subscriber_mapping_event_req_v1) returns (subscriber_mapping_event_res_v1); } \ No newline at end of file From 548e6c18bc1fb50334a923a117f73eed759b56f6 Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 10 Jul 2024 13:35:42 -0700 Subject: [PATCH 08/21] Fix build.rs --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index f78b0c58..7dbfd667 100644 --- a/build.rs +++ b/build.rs @@ -16,7 +16,6 @@ const SERVICES: &[&str] = &[ "src/service/downlink.proto", "src/service/multi_buy.proto", "src/service/packet_verifier.proto", - "src/service/verification_mapping.proto", ]; const MESSAGES: &[&str] = &[ @@ -31,6 +30,7 @@ const MESSAGES: &[&str] = &[ "src/blockchain_region_param_v1.proto", "src/price_report.proto", "src/hex_boosting.proto", + "src/verification_mapping.proto", ]; macro_rules! config { From f034e25a206e257852ab760c3da0b684eae57228 Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 10 Jul 2024 13:37:14 -0700 Subject: [PATCH 09/21] Fix package name --- src/verification_mapping.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/verification_mapping.proto b/src/verification_mapping.proto index cad2c942..553e9ac0 100644 --- a/src/verification_mapping.proto +++ b/src/verification_mapping.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package helium.verification_mapping; +package helium; message subscriber_mapping_event_req_v1 { /// The id of the discovery mapping enabled subscriber From 65c3a9b5cd0a1b42739eb580db3e0e7bceff6c19 Mon Sep 17 00:00:00 2001 From: Macpie Date: Thu, 11 Jul 2024 12:43:46 -0700 Subject: [PATCH 10/21] Fix --- build.rs | 1 - src/service/poc_mobile.proto | 25 ++++++++++++++++++++++++- src/verification_mapping.proto | 29 ----------------------------- 3 files changed, 24 insertions(+), 31 deletions(-) delete mode 100644 src/verification_mapping.proto diff --git a/build.rs b/build.rs index 7dbfd667..58a118f5 100644 --- a/build.rs +++ b/build.rs @@ -30,7 +30,6 @@ const MESSAGES: &[&str] = &[ "src/blockchain_region_param_v1.proto", "src/price_report.proto", "src/hex_boosting.proto", - "src/verification_mapping.proto", ]; macro_rules! config { diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 8bb897a6..bd5348f6 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -6,7 +6,6 @@ import "decimal.proto"; import "mapper.proto"; import "hex_boosting.proto"; import "service_provider.proto"; -import "verification_mapping.proto"; message speedtest_req_v1 { bytes pub_key = 1; @@ -750,3 +749,27 @@ verified_service_provider_boosted_rewards_banned_radio_ingest_report_v1 { // epoch uint64 timestamp = 3; } + +message subscriber_mapping_event_req_v1 { + /// The id of the discovery mapping enabled subscriber + string subscriber_id = 1; + /// The accumulated mapping points the subscriber has earned this epoch + uint64 total_reward_points = 2; + /// Unix timestamp in seconds of when the mapping event was generated + uint64 timestamp = 3; + /// Pubkey of verification mapping event service + bytes pub_key = 6; + /// Signed payload of the verification mapping event service + bytes signature = 7; +} + +message subscriber_mapping_event_res_v1 { string id = 1; } + +message verified_subscriber_mapping_event_v1 { + /// The id of the discovery mapping enabled subscriber + string subscriber_id = 1; + /// The accumulated mapping points the subscriber has earned this epoch + uint64 total_reward_points = 2; + /// Unix timestamp in seconds of when the mapping event was generated + uint64 timestamp = 3; +} \ No newline at end of file diff --git a/src/verification_mapping.proto b/src/verification_mapping.proto deleted file mode 100644 index 553e9ac0..00000000 --- a/src/verification_mapping.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package helium; - -message subscriber_mapping_event_req_v1 { - /// The id of the discovery mapping enabled subscriber - string subscriber_id = 1; - /// The accumulated mapping points the subscriber has earned this epoch - uint64 total_reward_points = 2; - /// Unix timestamp in seconds of when the mapping event was generated - uint64 timestamp = 3; - /// Pubkey of verification mapping event service - bytes pub_key = 6; - /// Signed payload of the verification mapping event service - bytes signature = 7; -} - -message subscriber_mapping_event_res_v1 { - string id = 1; -} - -message verified_subscriber_mapping_event_v1 { - /// The id of the discovery mapping enabled subscriber - string subscriber_id = 1; - /// The accumulated mapping points the subscriber has earned this epoch - uint64 total_reward_points = 2; - /// Unix timestamp in seconds of when the mapping event was generated - uint64 timestamp = 3; -} \ No newline at end of file From f723f2efd1b73373a382e62df52e52ad1d673a32 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 15 Jul 2024 16:02:22 -0700 Subject: [PATCH 11/21] Make subscriber id bytes --- src/service/poc_mobile.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index bd5348f6..1bedde31 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -752,7 +752,7 @@ verified_service_provider_boosted_rewards_banned_radio_ingest_report_v1 { message subscriber_mapping_event_req_v1 { /// The id of the discovery mapping enabled subscriber - string subscriber_id = 1; + bytes subscriber_id = 1; /// The accumulated mapping points the subscriber has earned this epoch uint64 total_reward_points = 2; /// Unix timestamp in seconds of when the mapping event was generated @@ -767,7 +767,7 @@ message subscriber_mapping_event_res_v1 { string id = 1; } message verified_subscriber_mapping_event_v1 { /// The id of the discovery mapping enabled subscriber - string subscriber_id = 1; + bytes subscriber_id = 1; /// The accumulated mapping points the subscriber has earned this epoch uint64 total_reward_points = 2; /// Unix timestamp in seconds of when the mapping event was generated From 3322a3301bbe52c1f219a2a8d96699c3484ece4b Mon Sep 17 00:00:00 2001 From: Macpie Date: Thu, 18 Jul 2024 10:06:52 -0700 Subject: [PATCH 12/21] Update proto --- src/service/poc_mobile.proto | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 1bedde31..f0136306 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -290,8 +290,8 @@ service poc_mobile { rpc submit_sp_boosted_rewards_banned_radio( service_provider_boosted_rewards_banned_radio_req_v1) returns (service_provider_boosted_rewards_banned_radio_resp_v1); - rpc submit_subscriber_mapping_event(subscriber_mapping_event_req_v1) - returns (subscriber_mapping_event_res_v1); + rpc submit_subscriber_mapping_event(verified_subscriber_mapping_event_req_v1) + returns (verified_subscriber_mapping_event_res_v1); } message file_info { @@ -750,7 +750,7 @@ verified_service_provider_boosted_rewards_banned_radio_ingest_report_v1 { uint64 timestamp = 3; } -message subscriber_mapping_event_req_v1 { +message verified_subscriber_mapping_event_req_v1 { /// The id of the discovery mapping enabled subscriber bytes subscriber_id = 1; /// The accumulated mapping points the subscriber has earned this epoch @@ -758,18 +758,15 @@ message subscriber_mapping_event_req_v1 { /// Unix timestamp in seconds of when the mapping event was generated uint64 timestamp = 3; /// Pubkey of verification mapping event service - bytes pub_key = 6; + bytes verification_mapping_pubkey = 4; /// Signed payload of the verification mapping event service - bytes signature = 7; + bytes signature = 5; } -message subscriber_mapping_event_res_v1 { string id = 1; } +message verified_subscriber_mapping_event_res_v1 { string id = 1; } -message verified_subscriber_mapping_event_v1 { - /// The id of the discovery mapping enabled subscriber - bytes subscriber_id = 1; - /// The accumulated mapping points the subscriber has earned this epoch - uint64 total_reward_points = 2; - /// Unix timestamp in seconds of when the mapping event was generated - uint64 timestamp = 3; +message verified_subscriber_mapping_event_ingest_report_v1 { + // Timestamp in milliseconds since unix epoch + uint64 received_timestamp = 1; + verified_subscriber_mapping_event_req_v1 report = 2; } \ No newline at end of file From 6bcf9c8b4a2718c27f325bcee08e794b6bf1ee6d Mon Sep 17 00:00:00 2001 From: Macpie Date: Thu, 18 Jul 2024 10:07:12 -0700 Subject: [PATCH 13/21] Fix deprecated fun --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 00044fdc..6c84d431 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -306,8 +306,8 @@ macro_rules! serde_enum { where S: serde::ser::Serializer, { - let v = $type::from_i32(*v) - .ok_or_else(|| serde::ser::Error::custom(format!("invalid enum value: {v}")))?; + let v = $type::try_from(*v) + .map_err(|_| serde::ser::Error::custom(format!("invalid enum value: {v}")))?; serializer.serialize_str(&v.to_string()) } From 0e8ff4e36e72c18a52c55a3f3f2964661c761d08 Mon Sep 17 00:00:00 2001 From: Macpie Date: Thu, 18 Jul 2024 10:09:06 -0700 Subject: [PATCH 14/21] Update rpc name --- src/service/poc_mobile.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index f0136306..2c02a43f 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -290,7 +290,8 @@ service poc_mobile { rpc submit_sp_boosted_rewards_banned_radio( service_provider_boosted_rewards_banned_radio_req_v1) returns (service_provider_boosted_rewards_banned_radio_resp_v1); - rpc submit_subscriber_mapping_event(verified_subscriber_mapping_event_req_v1) + rpc submit_verified_subscriber_mapping_event( + verified_subscriber_mapping_event_req_v1) returns (verified_subscriber_mapping_event_res_v1); } From 32fc1fd2c62e82c75315cac087edadd869a7c891 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 29 Jul 2024 10:08:39 -0700 Subject: [PATCH 15/21] Update comment change `verification_mapping_pubkey` to `carrier_mapping_key` --- src/service/poc_mobile.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 2c02a43f..089c13c8 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -756,10 +756,10 @@ message verified_subscriber_mapping_event_req_v1 { bytes subscriber_id = 1; /// The accumulated mapping points the subscriber has earned this epoch uint64 total_reward_points = 2; - /// Unix timestamp in seconds of when the mapping event was generated + /// Unix timestamp in milliseconds of when the mapping event was generated uint64 timestamp = 3; /// Pubkey of verification mapping event service - bytes verification_mapping_pubkey = 4; + bytes carrier_mapping_key = 4; /// Signed payload of the verification mapping event service bytes signature = 5; } From 368791278461bb763fe5224f81b41305c22665ba Mon Sep 17 00:00:00 2001 From: Macpie Date: Thu, 1 Aug 2024 10:45:23 -0700 Subject: [PATCH 16/21] Add verification_mapping_amount to subscriber_reward --- src/service/poc_mobile.proto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 089c13c8..d20fa455 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -546,10 +546,12 @@ message gateway_reward { } message subscriber_reward { - // id of the subscriber to which the reward will be credited + /// id of the subscriber to which the reward will be credited bytes subscriber_id = 1; /// Amount in bones credited to the subscriber for location sharing uint64 discovery_location_amount = 2; + /// Amount in bones credited to the subscriber for verification mapping + uint64 verification_mapping_amount = 3; } message service_provider_reward { From 843bae8d9e64309631f9301a05851694482b3b42 Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 7 Aug 2024 09:42:38 -0700 Subject: [PATCH 17/21] Add verification status to verified_subscriber_mapping_event_ingest_report_v1 --- src/service/poc_mobile.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index d20fa455..09ac2f68 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -768,8 +768,17 @@ message verified_subscriber_mapping_event_req_v1 { message verified_subscriber_mapping_event_res_v1 { string id = 1; } +enum verified_subscriber_mapping_event_verification_status { + vsme_valid = 0; + vsme_invalid_subscriber_id = 1; + vsme_invalid_carrier_key = 2; +} + message verified_subscriber_mapping_event_ingest_report_v1 { // Timestamp in milliseconds since unix epoch uint64 received_timestamp = 1; + // the verified report verified_subscriber_mapping_event_req_v1 report = 2; + // the status determined by the verification + verified_subscriber_mapping_event_verification_status status = 3; } \ No newline at end of file From 0a7692df67022b746c2276cb130bdd0f0ec731e9 Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 7 Aug 2024 10:13:14 -0700 Subject: [PATCH 18/21] Rename --- src/service/poc_mobile.proto | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 09ac2f68..0bc9a007 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -290,9 +290,9 @@ service poc_mobile { rpc submit_sp_boosted_rewards_banned_radio( service_provider_boosted_rewards_banned_radio_req_v1) returns (service_provider_boosted_rewards_banned_radio_resp_v1); - rpc submit_verified_subscriber_mapping_event( - verified_subscriber_mapping_event_req_v1) - returns (verified_subscriber_mapping_event_res_v1); + rpc submit_subscriber_verified_mapping_event( + subscriber_verified_mapping_event_req_v1) + returns (subscriber_verified_mapping_event_res_v1); } message file_info { @@ -753,7 +753,7 @@ verified_service_provider_boosted_rewards_banned_radio_ingest_report_v1 { uint64 timestamp = 3; } -message verified_subscriber_mapping_event_req_v1 { +message subscriber_verified_mapping_event_req_v1 { /// The id of the discovery mapping enabled subscriber bytes subscriber_id = 1; /// The accumulated mapping points the subscriber has earned this epoch @@ -766,19 +766,26 @@ message verified_subscriber_mapping_event_req_v1 { bytes signature = 5; } -message verified_subscriber_mapping_event_res_v1 { string id = 1; } +message subscriber_verified_mapping_event_res_v1 { string id = 1; } -enum verified_subscriber_mapping_event_verification_status { +message subscriber_verified_mapping_event_ingest_report_v1 { + // Timestamp in milliseconds since unix epoch + uint64 received_timestamp = 1; + // the verified report + subscriber_verified_mapping_event_req_v1 report = 2; +} + +enum subscriber_verified_mapping_event_verification_status { vsme_valid = 0; vsme_invalid_subscriber_id = 1; vsme_invalid_carrier_key = 2; } -message verified_subscriber_mapping_event_ingest_report_v1 { - // Timestamp in milliseconds since unix epoch - uint64 received_timestamp = 1; +message verified_subscriber_verified_mapping_event_ingest_report_v1 { // the verified report - verified_subscriber_mapping_event_req_v1 report = 2; + subscriber_verified_mapping_event_ingest_report_v1 report = 1; // the status determined by the verification - verified_subscriber_mapping_event_verification_status status = 3; + subscriber_verified_mapping_event_verification_status status = 2; + // Timestamp in milliseconds since unix epoch + uint64 timestamp = 3; } \ No newline at end of file From aa6c4ffa1584e43da7b4638f2b2248cb6f7dbdc6 Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 7 Aug 2024 13:29:03 -0700 Subject: [PATCH 19/21] Fix enum names --- src/service/poc_mobile.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 0bc9a007..87d39fa9 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -776,9 +776,9 @@ message subscriber_verified_mapping_event_ingest_report_v1 { } enum subscriber_verified_mapping_event_verification_status { - vsme_valid = 0; - vsme_invalid_subscriber_id = 1; - vsme_invalid_carrier_key = 2; + svme_valid = 0; + svme_invalid_subscriber_id = 1; + svme_invalid_carrier_key = 2; } message verified_subscriber_verified_mapping_event_ingest_report_v1 { From 8b49287d6438117eee7810edae8675a6cd0b7ac6 Mon Sep 17 00:00:00 2001 From: Jeff Grunewald Date: Tue, 13 Aug 2024 14:01:01 -0400 Subject: [PATCH 20/21] Update src/service/poc_mobile.proto --- src/service/poc_mobile.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index c618512d..9d9045f1 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -767,7 +767,7 @@ message subscriber_verified_mapping_event_req_v1 { bytes subscriber_id = 1; /// The accumulated mapping points the subscriber has earned this epoch uint64 total_reward_points = 2; - /// Unix timestamp in milliseconds of when the mapping event was generated + /// Unix timestamp in milliseconds of when the mapping reward event was generated uint64 timestamp = 3; /// Pubkey of verification mapping event service bytes carrier_mapping_key = 4; From 12434d17f00c72bee7950d503e69f1ff13931e20 Mon Sep 17 00:00:00 2001 From: jeffgrunewald Date: Tue, 13 Aug 2024 14:06:29 -0400 Subject: [PATCH 21/21] format --- src/service/poc_mobile.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 9d9045f1..f31a3d88 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -767,7 +767,8 @@ message subscriber_verified_mapping_event_req_v1 { bytes subscriber_id = 1; /// The accumulated mapping points the subscriber has earned this epoch uint64 total_reward_points = 2; - /// Unix timestamp in milliseconds of when the mapping reward event was generated + /// Unix timestamp in milliseconds of when the mapping reward event was + /// generated uint64 timestamp = 3; /// Pubkey of verification mapping event service bytes carrier_mapping_key = 4;