From 30f2e7a1fc94fa12d12f133fba573f9159096e3a Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Mon, 30 Dec 2024 17:41:40 +0000 Subject: [PATCH] zcash_client_backend: Migrate to `tonic-build 0.12.3` --- Cargo.lock | 5 +- Cargo.toml | 2 +- supply-chain/audits.toml | 6 ++ zcash_client_backend/build.rs | 2 +- zcash_client_backend/src/proto/service.rs | 71 +++++++++-------------- 5 files changed, 40 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe3cefaeb8..00b86423f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4656,13 +4656,14 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-types", "quote", "syn 2.0.63", ] diff --git a/Cargo.toml b/Cargo.toml index 8e42e975c2..24559a118a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -125,7 +125,7 @@ rayon = "1.5" # Protobuf and gRPC prost = "0.13" tonic = { version = "0.12", default-features = false } -tonic-build = { version = "0.12", default-features = false } +tonic-build = { version = "0.12.3", default-features = false } # Secret management secrecy = "0.8" diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index b4611bbcf0..c1f692aa22 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -570,6 +570,12 @@ who = "Jack Grigg " criteria = "safe-to-deploy" delta = "0.12.0 -> 0.12.1" +[[audits.tonic-build]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.12.1 -> 0.12.3" +notes = "Changes to generated code make sense and don't result in anything unexpected." + [[audits.utf8parse]] who = "Jack Grigg " criteria = "safe-to-run" diff --git a/zcash_client_backend/build.rs b/zcash_client_backend/build.rs index 396738bdb5..e2503554a3 100644 --- a/zcash_client_backend/build.rs +++ b/zcash_client_backend/build.rs @@ -72,7 +72,7 @@ fn build() -> io::Result<()> { ".cash.z.wallet.sdk.rpc.CompactOrchardAction", "crate::proto::compact_formats::CompactOrchardAction", ) - .compile(&[SERVICE_PROTO], &["proto/"])?; + .compile_protos(&[SERVICE_PROTO], &["proto/"])?; // Build the proposal types. tonic_build::compile_protos(PROPOSAL_PROTO)?; diff --git a/zcash_client_backend/src/proto/service.rs b/zcash_client_backend/src/proto/service.rs index 66db72451c..9992428f07 100644 --- a/zcash_client_backend/src/proto/service.rs +++ b/zcash_client_backend/src/proto/service.rs @@ -281,7 +281,13 @@ impl ShieldedProtocol { /// Generated client implementations. #[cfg(feature = "lightwalletd-tonic")] pub mod compact_tx_streamer_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -292,8 +298,8 @@ pub mod compact_tx_streamer_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -318,7 +324,7 @@ pub mod compact_tx_streamer_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { CompactTxStreamerClient::new(InterceptedService::new(inner, interceptor)) } @@ -362,8 +368,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -393,8 +398,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -424,8 +428,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -457,8 +460,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -490,8 +492,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -518,8 +519,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -546,8 +546,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -577,8 +576,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -604,8 +602,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -631,8 +628,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -672,8 +668,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -704,8 +699,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -735,8 +729,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -762,8 +755,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -794,8 +786,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -824,8 +815,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -854,8 +844,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -882,8 +871,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -910,8 +898,7 @@ pub mod compact_tx_streamer_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?;