From 875bf341786b87c45ee86c7af045370c8fc0cdea Mon Sep 17 00:00:00 2001 From: Brian Balser Date: Thu, 16 Nov 2023 14:43:58 -0500 Subject: [PATCH 1/5] Add fields to heartbeat and mobile_reward_share files to help understand how rewards are calculated --- src/service/poc_mobile.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index eeb25495..64294b78 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -213,6 +213,7 @@ message heartbeat { // applicable to cell heartbeats only string cbsd_id = 1; bytes pub_key = 2; + // this value is the heartbeat_multiplier * location_trust_score_multiplier float reward_multiplier = 3; uint64 timestamp = 4; cell_type cell_type = 5; @@ -227,6 +228,10 @@ message heartbeat { // Distance in meters to the asserted location of the gateway_reward // at the time of heartbeat verification uint64 distance_to_asserted = 11; + // based on cell_type of radio + float heartbeat_multiplier = 12; + // only used for wifi indoor radios, all others should have a value of 1.0 + float location_trust_score_multiplier = 13; } enum heartbeat_validity { @@ -321,6 +326,12 @@ message radio_reward { uint64 seniority_timestamp = 6; // UUID of the coverage object used to reward this radio bytes coverage_object = 7; + // based on number of heartbeats received and cell_type + float heartbeat_multiplier = 8; + // only used for wifi indoor radios, all others should have a value of 1.0 + float location_trust_score_multiplier = 9; + // based on speedtest averages of speedtests during 48 hour period from end of rewardable period + float speedtest_multiplier = 10; } message gateway_reward { @@ -328,6 +339,10 @@ message gateway_reward { bytes hotspot_key = 1; /// Amount awarded for dc transfer uint64 dc_transfer_reward = 2; + /// count of rewardable bytes transfered + uint64 rewardable_bytes = 3; + /// Price of MOBILE used when calculating rewards + uint64 price = 4; } message subscriber_reward { From 582365bd7a8bb8f7b5722e90d6a41c6fad1f522b Mon Sep 17 00:00:00 2001 From: Brian Balser Date: Thu, 16 Nov 2023 14:46:48 -0500 Subject: [PATCH 2/5] ran formatter --- src/service/poc_mobile.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 64294b78..fb9c86b4 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -330,7 +330,8 @@ message radio_reward { float heartbeat_multiplier = 8; // only used for wifi indoor radios, all others should have a value of 1.0 float location_trust_score_multiplier = 9; - // based on speedtest averages of speedtests during 48 hour period from end of rewardable period + // based on speedtest averages of speedtests during 48 hour period from end of + // rewardable period float speedtest_multiplier = 10; } @@ -339,7 +340,7 @@ message gateway_reward { bytes hotspot_key = 1; /// Amount awarded for dc transfer uint64 dc_transfer_reward = 2; - /// count of rewardable bytes transfered + /// count of rewardable bytes transfered uint64 rewardable_bytes = 3; /// Price of MOBILE used when calculating rewards uint64 price = 4; From 63b4c925084ebee61ca4999925ada8dc793535a2 Mon Sep 17 00:00:00 2001 From: Brian Balser Date: Sun, 19 Nov 2023 08:12:02 -0500 Subject: [PATCH 3/5] remove heartbeat_multipliers as they dont' make sense after hip 74 --- src/service/poc_mobile.proto | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index fb9c86b4..351ecb69 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -214,7 +214,7 @@ message heartbeat { string cbsd_id = 1; bytes pub_key = 2; // this value is the heartbeat_multiplier * location_trust_score_multiplier - float reward_multiplier = 3; + float reward_multiplier = 3 [ deprecated = true ]; uint64 timestamp = 4; cell_type cell_type = 5; heartbeat_validity validity = 6; @@ -228,8 +228,6 @@ message heartbeat { // Distance in meters to the asserted location of the gateway_reward // at the time of heartbeat verification uint64 distance_to_asserted = 11; - // based on cell_type of radio - float heartbeat_multiplier = 12; // only used for wifi indoor radios, all others should have a value of 1.0 float location_trust_score_multiplier = 13; } @@ -326,8 +324,6 @@ message radio_reward { uint64 seniority_timestamp = 6; // UUID of the coverage object used to reward this radio bytes coverage_object = 7; - // based on number of heartbeats received and cell_type - float heartbeat_multiplier = 8; // only used for wifi indoor radios, all others should have a value of 1.0 float location_trust_score_multiplier = 9; // based on speedtest averages of speedtests during 48 hour period from end of From d64910b4ec97c8a934c209748ad5aed16ba33af9 Mon Sep 17 00:00:00 2001 From: Brian Balser Date: Wed, 6 Dec 2023 15:11:05 -0500 Subject: [PATCH 4/5] Update floats to uint32 --- src/service/poc_mobile.proto | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 351ecb69..cef6e20c 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -229,7 +229,8 @@ message heartbeat { // at the time of heartbeat verification uint64 distance_to_asserted = 11; // only used for wifi indoor radios, all others should have a value of 1.0 - float location_trust_score_multiplier = 13; + // value is 0.0 to 1.0 multiplied by 1000 + uint32 location_trust_score_multiplier = 12; } enum heartbeat_validity { @@ -325,10 +326,12 @@ message radio_reward { // UUID of the coverage object used to reward this radio bytes coverage_object = 7; // only used for wifi indoor radios, all others should have a value of 1.0 - float location_trust_score_multiplier = 9; + // value is 0.0 to 1.0 multiplied by 1000 + uint32 location_trust_score_multiplier = 8; // based on speedtest averages of speedtests during 48 hour period from end of // rewardable period - float speedtest_multiplier = 10; + // value is 0.0 to 1.0 multiplied by 1000 + uint32 speedtest_multiplier = 9; } message gateway_reward { From 69435b3bcc24f6ffef0ea248c5ddf87c003efc8b Mon Sep 17 00:00:00 2001 From: Matthew Plant Date: Tue, 16 Jan 2024 13:08:28 -0500 Subject: [PATCH 5/5] Update src/service/poc_mobile.proto Co-authored-by: andymck --- 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 9d94a1eb..db8eaaa4 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -342,7 +342,7 @@ message gateway_reward { uint64 dc_transfer_reward = 2; /// count of rewardable bytes transfered uint64 rewardable_bytes = 3; - /// Price of MOBILE used when calculating rewards + /// Price of MOBILE @ 10^6 used when calculating rewards uint64 price = 4; }