From 8e43df0a2a2c3d465a729f643edba33922e312a7 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Wed, 15 Feb 2023 17:07:19 +0000 Subject: [PATCH 1/2] bump beacon/gatewayrs --- Cargo.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 37b74904f..251e2d8c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -678,7 +678,7 @@ checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "beacon" version = "0.1.0" -source = "git+https://github.com/helium/gateway-rs.git?branch=alpha-patches#18b8bc210f5c04972be59e7833aa457a06f422ac" +source = "git+https://github.com/helium/gateway-rs.git?branch=alpha-patches#eaf113223be11ed992d58bfbc089a5c494313e66" dependencies = [ "base64 0.21.0", "byteorder", @@ -689,7 +689,7 @@ dependencies = [ "rand_chacha", "rust_decimal", "serde", - "sha2 0.10.6", + "sha2 0.9.9", "thiserror", ] @@ -1357,7 +1357,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "structopt", "thiserror", "tracing", @@ -1585,7 +1585,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "sqlx", "strum", "strum_macros", @@ -2008,7 +2008,7 @@ dependencies = [ "p256", "rand_core", "serde", - "sha2 0.10.6", + "sha2 0.9.9", "signature", "sqlx", "thiserror", @@ -2267,7 +2267,7 @@ dependencies = [ "prost", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "thiserror", "tokio", "tonic", @@ -2358,7 +2358,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "sqlx", "thiserror", "tokio", @@ -2744,7 +2744,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "sqlx", "thiserror", "tokio", @@ -2784,7 +2784,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "sqlx", "thiserror", "tokio", @@ -3111,7 +3111,7 @@ dependencies = [ "prost", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "thiserror", "tokio", "tonic", @@ -3150,7 +3150,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "sqlx", "thiserror", "tokio", @@ -3596,7 +3596,7 @@ dependencies = [ "rust_decimal_macros", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.9.9", "sqlx", "thiserror", "tokio", From 453bf0ae0191ccc0d7914b4ecb539f2d735c91d6 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Wed, 15 Feb 2023 17:26:01 +0000 Subject: [PATCH 2/2] keep clippy happy after sha256 bump --- mobile_rewards/src/server.rs | 2 +- poc_iot_injector/src/receipt_txn.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile_rewards/src/server.rs b/mobile_rewards/src/server.rs index ea5905b8a..12c30a267 100644 --- a/mobile_rewards/src/server.rs +++ b/mobile_rewards/src/server.rs @@ -428,7 +428,7 @@ pub fn construct_txn( fn hash_txn_b64_url(txn: &BlockchainTxnSubnetworkRewardsV1) -> String { let mut txn = txn.clone(); txn.reward_server_signature = vec![]; - let digest = Sha256::digest(txn.encode_to_vec()).to_vec(); + let digest = Sha256::digest(&txn.encode_to_vec()).to_vec(); base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(digest) } diff --git a/poc_iot_injector/src/receipt_txn.rs b/poc_iot_injector/src/receipt_txn.rs index 0058df332..8b666f299 100644 --- a/poc_iot_injector/src/receipt_txn.rs +++ b/poc_iot_injector/src/receipt_txn.rs @@ -214,7 +214,7 @@ fn construct_poc_receipt(beacon_report: IotValidBeaconReport) -> (BlockchainPocR fn hash_txn(txn: &BlockchainTxnPocReceiptsV2) -> (Vec, String) { let mut txn = txn.clone(); txn.signature = vec![]; - let digest = Sha256::digest(txn.encode_to_vec()).to_vec(); + let digest = Sha256::digest(&txn.encode_to_vec()).to_vec(); ( digest.clone(), base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(&digest),