Skip to content

Commit

Permalink
Add fields to heartbeat and mobile_reward_share files to help underst…
Browse files Browse the repository at this point in the history
…and how rewards are calculated (#378)

* Add fields to heartbeat and mobile_reward_share files to help understand how rewards are calculated

* ran formatter

* remove heartbeat_multipliers as they dont' make sense after hip 74

* Update floats to uint32

* Update src/service/poc_mobile.proto

Co-authored-by: andymck <[email protected]>

---------

Co-authored-by: Matthew Plant <[email protected]>
Co-authored-by: Matthew Plant <[email protected]>
Co-authored-by: andymck <[email protected]>
  • Loading branch information
4 people authored Jan 16, 2024
1 parent 585704c commit e4b935e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/service/poc_mobile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ message heartbeat {
// applicable to cell heartbeats only
string cbsd_id = 1;
bytes pub_key = 2;
float reward_multiplier = 3;
// this value is the heartbeat_multiplier * location_trust_score_multiplier
float reward_multiplier = 3 [ deprecated = true ];
uint64 timestamp = 4;
cell_type cell_type = 5;
heartbeat_validity validity = 6;
Expand All @@ -228,6 +229,9 @@ message heartbeat {
// Distance in meters to the asserted location of the gateway_reward
// 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
// value is 0.0 to 1.0 multiplied by 1000
uint32 location_trust_score_multiplier = 12;
}

enum heartbeat_validity {
Expand Down Expand Up @@ -322,13 +326,24 @@ message radio_reward {
uint64 seniority_timestamp = 6;
// 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
// 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
// value is 0.0 to 1.0 multiplied by 1000
uint32 speedtest_multiplier = 9;
}

message gateway_reward {
/// Public key of the hotspot
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 @ 10^6 used when calculating rewards
uint64 price = 4;
}

message subscriber_reward {
Expand Down

2 comments on commit e4b935e

@riobah
Copy link
Contributor

@riobah riobah commented on e4b935e Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a planned release date, for these changes to go live with new Oracles deployment?

@riobah
Copy link
Contributor

@riobah riobah commented on e4b935e Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. the comments imply some equation likereward_multiplier = heartbeat_multiplier * location_trust_score_multiplier. In which message is this heartbeat_multiplier?
  2. when reward_multiplier is deprecated, does it mean that it will not be maintained and come as 0 immediately?
  3. To give full context of the reward calculations, do we need some heartbeat multiplier in the radio_reward message?

Please sign in to comment.