Skip to content

Commit

Permalink
initial pass at hex boosting protos
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Jan 17, 2024
1 parent e4b935e commit 876585a
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/service/mobile_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";

package helium.mobile_config;

import "service_provider.proto";

// ------------------------------------------------------------------
// Message Definitions
// ------------------------------------------------------------------
Expand Down Expand Up @@ -210,6 +212,43 @@ message admin_key_res_v1 {
bytes signature = 3;
}

message boosted_hex_info_stream_req_v1 {
// pubkey binary of the signing keypair
bytes signer = 2;
bytes signature = 3;
}

message boosted_hex_info_stream_res_v1 {
// a list of boosted hex info
repeated boosted_hex_info hexes = 1;
// unix epoch timestamp in seconds
uint64 timestamp = 2;
// pubkey binary of the signing keypair
bytes signer = 3;
bytes signature = 4;
}

message boosted_hex_info {
// The res12 h3 index of the boosted hex
uint64 location = 1;
// The timestamp of the start of the boost period
// 0 if the boosting has not yet started
int64 start_ts = 2;
// The length of the boost period in months
uint32 period_length = 3;
// the minimum number of periods to boost
uint32 minimum_periods = 4;
// the boost amount in USD @ 10^6
// TODO: confirm if boost price should be mobile or USD
// If USD, does mobile verifier convert that to mobile at the prevailing
// mobile price at the point of rewarding ? this total available boost
// in MOBILE then gets distributed across all radios providing coverage
// in the boosted hex
uint64 boost_price = 5;
// The on chain entity key of service provider providing the boost
service_provider service_provider_id = 6;
}

// ------------------------------------------------------------------
// Service Definitions
// ------------------------------------------------------------------
Expand Down Expand Up @@ -253,3 +292,9 @@ service admin {
// Deauthorize a public key for validating trusted rpcs
rpc remove_key(admin_remove_key_req_v1) returns (admin_key_res_v1);
}

service boosted_hexes {
// Get a stream of hex boost info
rpc info_stream(boosted_hex_info_stream_req_v1)
returns (stream boosted_hex_info_stream_res_v1);
}
27 changes: 27 additions & 0 deletions src/service/poc_mobile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,33 @@ message radio_reward {
// rewardable period
// value is 0.0 to 1.0 multiplied by 1000
uint32 speedtest_multiplier = 9;
// reward for providing coverage within boosted hexes
hex_boosting_reward hex_boosting_reward = 10;
}

message hex_boosting_reward {
// the summed total amount in mobile bones for all boosted hexes covered by
// the radio
uint64 amount = 1;
// a list of all boosted hexes covered by the radio
repeated boosted_hex_reward boosted_hex_reward = 2;
}

message boosted_hex_reward {
/// Boosted hex reward amount in mobile bones
uint64 amount = 1;

// TODO: maybe just copy across the full boosted_hex_info object from mobile
// config????

// The res12 h3 index of the boosted hex
uint64 location = 2;
// the boost amount in USD @ 10^6
uint64 boost_price = 3;
/// Price of MOBILE @ 10^6 used when calculating rewards
uint64 price = 4;
// The on chain entity key of service provider providing the boost
service_provider service_provider_id = 5;
}

message gateway_reward {
Expand Down

0 comments on commit 876585a

Please sign in to comment.