Skip to content

Commit

Permalink
Add boosted_hex_device_type_v1 for HIP-109
Browse files Browse the repository at this point in the history
The first iteration of HIP-109[1] adds the ability to boost by a device
type. Pre-existing boosts will continue to boost _all_ device types.

From the way the HIP reads, at some point, a hex may be boosted by the
same provider for multiple device types. It was undecided wether that
would be implemented as multiple device_types attached to a boosted hex,
or multiple instances of a boosted hex.

[1]: https://github.com/helium/HIP/blob/main/0109-hex-boosting-by-deployment.md
  • Loading branch information
michaeldjeffrey committed Aug 30, 2024
1 parent b45858c commit 243354c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/hex_boosting.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ message boosted_hex_info_v1 {
bytes boost_config_pubkey = 7;

uint32 version = 8;
// The device type(s) this boost applies to.
boosted_hex_device_type_v1 device_type = 9;
}

message boosted_hex_update_v1 {
Expand All @@ -31,3 +33,11 @@ message boosted_hex_update_v1 {
// Details of the updated hex
boosted_hex_info_v1 update = 2;
}

enum boosted_hex_device_type_v1 {
all = 0;
cbrs_indoor = 1;
cbrs_outdoor = 2;
wifi_indoor = 3;
wifi_outdoor = 4;
}
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ pub use prost::{DecodeError, EncodeError, Message};
#[cfg(feature = "services")]
pub mod services {
use crate::{
BlockchainRegionParamsV1, BlockchainTokenTypeV1, BlockchainTxn, BoostedHexInfoV1, DataRate,
Decimal, EntropyReportV1, GatewayStakingMode, MapperAttach, Region, RoutingAddress,
ServiceProvider,
BlockchainRegionParamsV1, BlockchainRegionParamsV1, BlockchainTokenTypeV1, BlockchainTxn,
BoostedHexDeviceTypeV1, BoostedHexInfoV1, BoostedHexUpdateV1, DataRate, Decimal,
EntropyReportV1, GatewayStakingMode, MapperAttach, Region, RoutingAddress, ServiceProvider,
};

pub mod iot_config {
Expand Down

0 comments on commit 243354c

Please sign in to comment.