Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dept #34

Merged
merged 4 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cloud-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[package]
name = "cita_cloud_proto"
version = "6.7.3"
version = "6.7.4"
authors = ["Rivtower Technologies <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
description = "cita-cloud proto library"


[dependencies]
tonic = "0.11"
prost = "0.12"
tokio = { version = "1.36", default-features = false, features = ["macros"] }
tonic = "0.12"
prost = "0.13"
tokio = { version = "1.38", default-features = false, features = ["macros"] }
thiserror = "1.0"
http = "0.2"
http = "1.1"
futures-retry = "0.6"
backoff = "0.4"
async-trait = "0.1"
tracing = "0.1"
tracing-opentelemetry = "0.22"
opentelemetry = "0.21"
tracing-opentelemetry = "0.24"
opentelemetry = "0.23"

[build-dependencies]
tonic-build = { version = "0.11", optional = true }
tonic-build = { version = "0.12", optional = true }
1 change: 1 addition & 0 deletions cloud-proto/src/proto/blockchain.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockHeader {
Expand Down
5 changes: 3 additions & 2 deletions cloud-proto/src/proto/common.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Empty {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -66,7 +67,7 @@ pub struct ConsensusConfiguration {
pub validators: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StatusCode {
#[prost(uint32, tag = "1")]
pub code: u32,
Expand Down
25 changes: 7 additions & 18 deletions cloud-proto/src/proto/consensus.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
/// Generated client implementations.
pub mod consensus_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
Expand Down Expand Up @@ -144,19 +145,17 @@ pub mod consensus_service_server {
}
#[derive(Debug)]
pub struct ConsensusServiceServer<T: ConsensusService> {
inner: _Inner<T>,
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: ConsensusService> ConsensusServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
Expand Down Expand Up @@ -216,7 +215,6 @@ pub mod consensus_service_server {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/consensus.ConsensusService/Reconfigure" => {
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -244,7 +242,6 @@ pub mod consensus_service_server {
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ReconfigureSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -287,7 +284,6 @@ pub mod consensus_service_server {
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CheckBlockSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand All @@ -307,8 +303,11 @@ pub mod consensus_service_server {
_ => Box::pin(async move {
Ok(http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.header("grpc-status", tonic::Code::Unimplemented as i32)
.header(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
)
.body(empty_body())
.unwrap())
}),
Expand All @@ -327,16 +326,6 @@ pub mod consensus_service_server {
}
}
}
impl<T: ConsensusService> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: ConsensusService> tonic::server::NamedService for ConsensusServiceServer<T> {
const NAME: &'static str = "consensus.ConsensusService";
}
Expand Down
Loading
Loading