Skip to content

Commit

Permalink
Iot Config service use Helius for on-chain metadata (#428)
Browse files Browse the repository at this point in the history
* iot config helius integration
---------

Co-authored-by: Brian Balser <bbalser@nova-labs.com>
Co-authored-by: andymck <andrewb.mckenzie@gmail.com>
Co-authored-by: Matthew Plant <matty@nova-labs.com>
  • Loading branch information
4 people authored Apr 10, 2023
1 parent b8111eb commit 3cddbcb
Show file tree
Hide file tree
Showing 36 changed files with 1,708 additions and 1,078 deletions.
28 changes: 5 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ members = [
"iot_packet_verifier",
"iot_config",
"price",
"iot_config_client"
]

[workspace.package]
Expand Down Expand Up @@ -55,7 +54,7 @@ sqlx = {version = "0", features = [
"runtime-tokio-rustls"
]}

helium-crypto = {version = "0.6.3", features=["sqlx-postgres", "multisig"]}
helium-crypto = {version = "0.6.8", features=["sqlx-postgres", "multisig"]}
helium-proto = {git = "https://github.com/helium/proto", branch = "master", features = ["services"]}
hextree = "*"
solana-client = "1.14"
Expand Down
62 changes: 30 additions & 32 deletions file_store/src/traits/msg_verify.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
use crate::{Error, Result};
use helium_crypto::{PublicKey, Verify};
use helium_proto::services::{
iot_config::{
AdminAddKeyReqV1, AdminLoadRegionReqV1, AdminRemoveKeyReqV1, GatewayLocationReqV1,
GatewayRegionParamsReqV1, OrgCreateHeliumReqV1, OrgCreateRoamerReqV1, OrgDisableReqV1,
OrgEnableReqV1, RouteCreateReqV1, RouteDeleteReqV1, RouteGetDevaddrRangesReqV1,
RouteGetEuisReqV1, RouteGetReqV1, RouteListReqV1, RouteStreamReqV1,
RouteUpdateDevaddrRangesReqV1, RouteUpdateEuisReqV1, RouteUpdateReqV1,
SessionKeyFilterGetReqV1, SessionKeyFilterListReqV1, SessionKeyFilterStreamReqV1,
SessionKeyFilterUpdateReqV1,
},
iot_config,
poc_lora::{LoraBeaconReportReqV1, LoraWitnessReportReqV1},
};
use helium_proto::{
Expand Down Expand Up @@ -40,29 +32,35 @@ impl_msg_verify!(SpeedtestReqV1, signature);
impl_msg_verify!(LoraBeaconReportReqV1, signature);
impl_msg_verify!(LoraWitnessReportReqV1, signature);
impl_msg_verify!(DataTransferSessionReqV1, signature);
impl_msg_verify!(OrgCreateHeliumReqV1, signature);
impl_msg_verify!(OrgCreateRoamerReqV1, signature);
impl_msg_verify!(OrgDisableReqV1, signature);
impl_msg_verify!(OrgEnableReqV1, signature);
impl_msg_verify!(RouteStreamReqV1, signature);
impl_msg_verify!(RouteListReqV1, signature);
impl_msg_verify!(RouteGetReqV1, signature);
impl_msg_verify!(RouteCreateReqV1, signature);
impl_msg_verify!(RouteUpdateReqV1, signature);
impl_msg_verify!(RouteDeleteReqV1, signature);
impl_msg_verify!(RouteGetEuisReqV1, signature);
impl_msg_verify!(RouteUpdateEuisReqV1, signature);
impl_msg_verify!(RouteGetDevaddrRangesReqV1, signature);
impl_msg_verify!(RouteUpdateDevaddrRangesReqV1, signature);
impl_msg_verify!(GatewayLocationReqV1, signature);
impl_msg_verify!(GatewayRegionParamsReqV1, signature);
impl_msg_verify!(AdminAddKeyReqV1, signature);
impl_msg_verify!(AdminLoadRegionReqV1, signature);
impl_msg_verify!(AdminRemoveKeyReqV1, signature);
impl_msg_verify!(SessionKeyFilterGetReqV1, signature);
impl_msg_verify!(SessionKeyFilterListReqV1, signature);
impl_msg_verify!(SessionKeyFilterStreamReqV1, signature);
impl_msg_verify!(SessionKeyFilterUpdateReqV1, signature);
impl_msg_verify!(iot_config::OrgCreateHeliumReqV1, signature);
impl_msg_verify!(iot_config::OrgCreateRoamerReqV1, signature);
impl_msg_verify!(iot_config::OrgDisableReqV1, signature);
impl_msg_verify!(iot_config::OrgEnableReqV1, signature);
impl_msg_verify!(iot_config::RouteStreamReqV1, signature);
impl_msg_verify!(iot_config::RouteListReqV1, signature);
impl_msg_verify!(iot_config::RouteGetReqV1, signature);
impl_msg_verify!(iot_config::RouteCreateReqV1, signature);
impl_msg_verify!(iot_config::RouteUpdateReqV1, signature);
impl_msg_verify!(iot_config::RouteDeleteReqV1, signature);
impl_msg_verify!(iot_config::RouteGetEuisReqV1, signature);
impl_msg_verify!(iot_config::RouteUpdateEuisReqV1, signature);
impl_msg_verify!(iot_config::RouteGetDevaddrRangesReqV1, signature);
impl_msg_verify!(iot_config::RouteUpdateDevaddrRangesReqV1, signature);
impl_msg_verify!(iot_config::GatewayLocationReqV1, signature);
impl_msg_verify!(iot_config::GatewayRegionParamsReqV1, signature);
impl_msg_verify!(iot_config::AdminAddKeyReqV1, signature);
impl_msg_verify!(iot_config::AdminLoadRegionReqV1, signature);
impl_msg_verify!(iot_config::AdminRemoveKeyReqV1, signature);
impl_msg_verify!(iot_config::SessionKeyFilterGetReqV1, signature);
impl_msg_verify!(iot_config::SessionKeyFilterListReqV1, signature);
impl_msg_verify!(iot_config::SessionKeyFilterStreamReqV1, signature);
impl_msg_verify!(iot_config::SessionKeyFilterUpdateReqV1, signature);
impl_msg_verify!(iot_config::GatewayInfoReqV1, signature);
impl_msg_verify!(iot_config::GatewayInfoStreamReqV1, signature);
impl_msg_verify!(iot_config::RegionParamsReqV1, signature);
impl_msg_verify!(iot_config::GatewayInfoResV1, signature);
impl_msg_verify!(iot_config::GatewayInfoStreamResV1, signature);
impl_msg_verify!(iot_config::RegionParamsResV1, signature);

#[cfg(test)]
mod test {
Expand Down
5 changes: 3 additions & 2 deletions iot_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ license.workspace = true
anyhow = {workspace = true}
async-trait = {workspace = true}
base64 = {workspace = true}
chrono = {workspace = true}
clap = {workspace = true}
config = {workspace = true}
db-store = {path = "../db_store"}
Expand All @@ -19,10 +20,11 @@ futures-util = {workspace = true}
helium-crypto = {workspace = true}
helium-proto = {workspace = true}
hextree = {workspace = true}
http = {workspace = true}
http-serde = {workspace = true}
libflate = "1"
metrics = {workspace = true}
metrics-exporter-prometheus = {workspace = true}
node-follower = {path = "../node_follower"}
poc-metrics = {path = "../metrics"}
prost = {workspace = true}
serde = {workspace = true}
Expand All @@ -35,4 +37,3 @@ tonic = {workspace = true}
tracing = {workspace = true}
tracing-subscriber = {workspace = true}
triggered = {workspace = true}
chrono = { workspace = true }
1 change: 1 addition & 0 deletions iot_config/migrations/7_oracle_key_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter type key_type add value 'oracle';
14 changes: 0 additions & 14 deletions iot_config/pkg/settings-template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,3 @@ max_connections = 20
# Endpoint for metrics. Default below
#
# endpoint = "127.0.0.1:19000"

[follower]

# Local grpc url to node follower for gateway location lookups
#[serde(with = "http_serde::uri", default = "default_url")]
# url = http://127.0.0.1:8080
# Start block to begin streaming followed transactions
block = 0
# Connect timeout for follower in seconds. Default 5
# connect = 5
# RPC timeout for follower in seconds. Default 5
# rpc = 5
# Batch size for gateway stream results. Default 100
# batch = 100
Loading

0 comments on commit 3cddbcb

Please sign in to comment.