Skip to content

Commit

Permalink
s/referral/promotion/g, add allocations to reward manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
maplant committed Aug 22, 2024
1 parent d1109ce commit 5230ba2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
7 changes: 7 additions & 0 deletions src/reward_manifest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import "decimal.proto";
message mobile_reward_data {
Decimal poc_bones_per_reward_share = 1;
Decimal boosted_poc_bones_per_reward_share = 2;
repeated service_provider_allocation sp_allocations = 3;
}

message service_provider_allocation {
bytes pub_key = 1;
// The percentage of the SP rewards that are allocated to the incentive fun, in basis points
uint32 incentive_escrow_fund_bps = 2;
}

message iot_reward_data {
Expand Down
36 changes: 18 additions & 18 deletions src/service/poc_mobile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -278,42 +278,42 @@ message verified_subscriber_location_ingest_report_v1 {
uint64 timestamp = 3;
}

message referral_reward_req_v1 {
message promotion_reward_req_v1 {
// Entity to be rewarded
oneof entity {
// Subscriber reward
bytes subscriber_id = 1;
// Gateway reward
bytes gateway_key = 2;
}
// Shares rewardsed to the subscriber
// Shares rewarded to the subscriber
uint64 shares = 3;
// Timestamp in seconds since the unix epoch
uint64 timestamp = 4;
// Pubkey of the carrier for which the subscriber is attached
// Pubkey of the carrier for which the entity is attached
bytes carrier_pub_key = 5;
// Signed payload of the request
bytes signature = 6;
}

message referral_reward_resp_v1 { string id = 1; }
message promotion_reward_resp_v1 { string id = 1; }

message referral_reward_ingest_report_v1 {
message promotion_reward_ingest_report_v1 {
// Timestamp in milliseconds since the unix epoch
uint64 received_timestamp = 1;
referral_reward_req_v1 report = 2;
promotion_reward_req_v1 report = 2;
}

enum referral_reward_status {
referral_reward_status_valid = 0;
referral_reward_status_invalid_subscriber_id = 1;
referral_reward_status_invalid_carrier_key = 2;
enum promotion_reward_status {
promotion_reward_status_valid = 0;
promotion_reward_status_invalid_subscriber_id = 1;
promotion_reward_status_invalid_carrier_key = 2;
}

message verified_referral_reward_ingest_report_v1 {
referral_reward_ingest_report_v1 report = 1;
message verified_promotion_reward_ingest_report_v1 {
promotion_reward_ingest_report_v1 report = 1;
// Status of the report
referral_reward_status status = 2;
promotion_reward_status status = 2;
// Timestamp at which verification was determined, in milliseconds since
// the unix epoch
uint64 timestamp = 3;
Expand Down Expand Up @@ -342,9 +342,9 @@ service poc_mobile {
rpc submit_subscriber_verified_mapping_event(
subscriber_verified_mapping_event_req_v1)
returns (subscriber_verified_mapping_event_res_v1);
rpc submit_referral_reward(
referral_reward_req_v1)
returns (referral_reward_resp_v1);
rpc submit_promotion_reward(
promotion_reward_req_v1)
returns (promotion_reward_resp_v1);
}

message file_info {
Expand Down Expand Up @@ -610,7 +610,7 @@ message subscriber_reward {
uint64 verification_mapping_amount = 3;
}

message referral_reward {
message promotion_reward {
// Entity given the reward
oneof entity {
// Subscriber reward
Expand Down Expand Up @@ -662,7 +662,7 @@ message mobile_reward_share {
service_provider_reward service_provider_reward = 6;
unallocated_reward unallocated_reward = 7;
radio_reward_v2 radio_reward_v2 = 8;
referral_reward referral_reward = 9;
promotion_reward promotion_reward = 9;
}
}

Expand Down

0 comments on commit 5230ba2

Please sign in to comment.