Skip to content

Commit

Permalink
add subdao epoch info related msg support
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Nov 19, 2024
1 parent bf91f46 commit 35d301c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reward_manifest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ message reward_manifest {
mobile_reward_data mobile_reward_data = 4;
iot_reward_data iot_reward_data = 5;
}
// the epoch of the reward share
uint64 epoch = 6;
}
44 changes: 44 additions & 0 deletions src/service/mobile_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,44 @@ import "reward_manifest.proto";
// - Keypair fields are binary encoded public keys, Rust encoding example here:
// https://github.com/helium/helium-crypto-rs/blob/main/src/public_key.rs#L347-L354

message sub_dao_epoch_reward_info {
// The epoch the reward info was issued for
uint64 epoch = 1;
// The public key binary address and on-chain identity of the epoch
bytes address = 2;
// The public key binary address and on-chain identity of the subdao
bytes sub_dao = 3;
// The utility score of the subdao for the epoch
uint64 sub_dao_utility_score = 4;
// The total utility score of the dao for the epoch
uint64 total_utility_score = 5;
// The total emissions of the dao for the epoch
uint64 total_emissions = 6;
// timestamp in seconds when the rewards were issued
uint64 rewards_issued_at = 7;
}

message sub_dao_epoch_reward_info_req_v1 {
// The public key binary address and on-chain identity of the subdao to look
// up
bytes sub_dao = 1;
// The epoch for the specified subdao to look up
uint64 epoch = 2;
// pubkey binary of the signing keypair
bytes signer = 3;
bytes signature = 4;
}

message sub_dao_epoch_reward_info_res_v1 {
// The reward info for the specified subdao & epoch
sub_dao_epoch_reward_info info = 1;
// unix epoch timestamp in seconds
uint64 timestamp = 2;
// pubkey binary of the signing keypair
bytes signer = 3;
bytes signature = 4;
}

message gateway_metadata {
// The res12 h3 index asserted address of the gateway as a string
// where an unasserted gateway returns an empty string
Expand Down Expand Up @@ -266,6 +304,12 @@ message carrier_incentive_promotion_list_res_v1 {
// Service Definitions
// ------------------------------------------------------------------

service sub_dao {
// Get reward info for the specified subdao & epoch
rpc info(sub_dao_epoch_reward_info_req_v1)
returns (sub_dao_epoch_reward_info_res_v1);
}

service gateway {
// Get info for the specified gateway
rpc info(gateway_info_req_v1) returns (gateway_info_res_v1);
Expand Down
2 changes: 2 additions & 0 deletions src/service/poc_mobile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,8 @@ message mobile_reward_share {
radio_reward_v2 radio_reward_v2 = 8;
promotion_reward promotion_reward = 9;
}
// the epoch of the reward share
uint64 epoch = 10;
}

enum speedtest_avg_validity {
Expand Down

0 comments on commit 35d301c

Please sign in to comment.