Skip to content

Commit

Permalink
proto message for HIP-125 (#405)
Browse files Browse the repository at this point in the history
* proto message for HIP-125

* Update reason name

* Add verified message

* Update verification enum

* Add seniority update reason for sp ban

* Update src/service/poc_mobile.proto

Co-authored-by: Matthew Plant <[email protected]>

* Update src/service/poc_mobile.proto

Co-authored-by: Matthew Plant <[email protected]>

* Update src/service/poc_mobile.proto

Co-authored-by: Matthew Plant <[email protected]>

* Fix warning

* Address feedback

---------

Co-authored-by: Matthew Plant <[email protected]>
  • Loading branch information
bbalser and Matthew Plant authored Jul 9, 2024
1 parent c5d4f5c commit ff0d2ba
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ pub use prost::{DecodeError, EncodeError, Message};
#[cfg(feature = "services")]
pub mod services {
use crate::{
BlockchainRegionParamsV1, BlockchainTokenTypeV1, BlockchainTxn, BoostedHexInfoV1,
BoostedHexUpdateV1, DataRate, EntropyReportV1, GatewayStakingMode, MapperAttach, Region,
RoutingAddress, ServiceProvider,
BlockchainRegionParamsV1, BlockchainTokenTypeV1, BlockchainTxn, BoostedHexInfoV1, DataRate,
EntropyReportV1, GatewayStakingMode, MapperAttach, Region, RoutingAddress, ServiceProvider,
};

pub mod iot_config {
Expand Down
48 changes: 48 additions & 0 deletions src/service/poc_mobile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ service poc_mobile {
rpc submit_invalidated_threshold_report(
invalidated_radio_threshold_report_req_v1)
returns (invalidated_radio_threshold_report_resp_v1);
rpc submit_sp_boosted_rewards_banned_radio(
service_provider_boosted_rewards_banned_radio_req_v1)
returns (service_provider_boosted_rewards_banned_radio_resp_v1);
}

message file_info {
Expand Down Expand Up @@ -372,6 +375,8 @@ enum seniority_update_reason {
seniority_update_reason_heartbeat_not_seen = 0;
// A new coverage object replaces the old seniority
seniority_update_reason_new_coverage_claim_time = 1;
// A service provider marked the radio banned from boosted rewards
seniority_update_reason_service_provider_ban = 2;
}

message speedtest_avg {
Expand Down Expand Up @@ -616,3 +621,46 @@ message oracle_boosting_hex_assignment {
// Landtype assignment
assignment landtype = 5;
}

message service_provider_boosted_rewards_banned_radio_req_v1 {
enum sp_boosted_rewards_banned_radio_reason {
unbanned = 0;
no_network_correlation = 1;
}
// pubkey of signer
bytes pubkey = 1;
oneof key_type {
// For CBRS radio
string cbsd_id = 2;
// For WiFi radio
bytes hotspot_key = 3;
}
sp_boosted_rewards_banned_radio_reason reason = 4;
// Timestamp in seconds since epoch of when ban ends
uint64 until = 5;
bytes signature = 6;
}

message service_provider_boosted_rewards_banned_radio_resp_v1 { string id = 1; }

message service_provider_boosted_rewards_banned_radio_ingest_report_v1 {
// Timestamp in milliseconds since the epoch
uint64 received_timestamp = 1;
service_provider_boosted_rewards_banned_radio_req_v1 report = 2;
}

enum service_provider_boosted_rewards_banned_radio_verification_status {
sp_boosted_rewards_ban_valid = 0;
sp_boosted_rewards_ban_invalid_carrier_key = 1;
}

message
verified_service_provider_boosted_rewards_banned_radio_ingest_report_v1 {
// The verified report
service_provider_boosted_rewards_banned_radio_ingest_report_v1 report = 1;
// The status determined by the verification
service_provider_boosted_rewards_banned_radio_verification_status status = 2;
// Timestamp at which verification was determined, in milliseconds since unix
// epoch
uint64 timestamp = 3;
}

0 comments on commit ff0d2ba

Please sign in to comment.