From 321af79daa225ce42348efd17e271651de73f36d Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Wed, 17 Jul 2024 07:50:34 -0600 Subject: [PATCH] Bump `prost` to v0.13 and `tonic` to v0.12 (#1444) --- .../breaking-changes/prost-0.13+tonic-0.12.md | 2 + abci/Cargo.toml | 2 +- p2p/Cargo.toml | 4 +- proto/Cargo.toml | 6 +- proto/src/prost/v0_34/tendermint.abci.rs | 54 +++++------------- .../src/prost/v0_34/tendermint.blockchain.rs | 9 +-- proto/src/prost/v0_34/tendermint.consensus.rs | 9 +-- proto/src/prost/v0_34/tendermint.crypto.rs | 1 + proto/src/prost/v0_34/tendermint.libs.bits.rs | 1 + proto/src/prost/v0_34/tendermint.mempool.rs | 1 + proto/src/prost/v0_34/tendermint.p2p.rs | 9 +-- proto/src/prost/v0_34/tendermint.privval.rs | 5 +- proto/src/prost/v0_34/tendermint.rpc.grpc.rs | 29 +++------- proto/src/prost/v0_34/tendermint.state.rs | 1 + proto/src/prost/v0_34/tendermint.statesync.rs | 5 +- proto/src/prost/v0_34/tendermint.store.rs | 3 +- proto/src/prost/v0_34/tendermint.types.rs | 9 +-- proto/src/prost/v0_34/tendermint.version.rs | 3 +- proto/src/prost/v0_37/tendermint.abci.rs | 55 +++++------------- proto/src/prost/v0_37/tendermint.blocksync.rs | 9 +-- proto/src/prost/v0_37/tendermint.consensus.rs | 9 +-- proto/src/prost/v0_37/tendermint.crypto.rs | 1 + proto/src/prost/v0_37/tendermint.libs.bits.rs | 1 + proto/src/prost/v0_37/tendermint.mempool.rs | 1 + proto/src/prost/v0_37/tendermint.p2p.rs | 9 +-- proto/src/prost/v0_37/tendermint.privval.rs | 5 +- proto/src/prost/v0_37/tendermint.rpc.grpc.rs | 29 +++------- proto/src/prost/v0_37/tendermint.state.rs | 1 + proto/src/prost/v0_37/tendermint.statesync.rs | 5 +- proto/src/prost/v0_37/tendermint.store.rs | 3 +- proto/src/prost/v0_37/tendermint.types.rs | 9 +-- proto/src/prost/v0_37/tendermint.version.rs | 3 +- proto/src/prost/v0_38/tendermint.abci.rs | 57 ++++++------------- proto/src/prost/v0_38/tendermint.blocksync.rs | 9 +-- proto/src/prost/v0_38/tendermint.consensus.rs | 9 +-- proto/src/prost/v0_38/tendermint.crypto.rs | 1 + proto/src/prost/v0_38/tendermint.libs.bits.rs | 1 + proto/src/prost/v0_38/tendermint.mempool.rs | 1 + proto/src/prost/v0_38/tendermint.p2p.rs | 9 +-- proto/src/prost/v0_38/tendermint.privval.rs | 5 +- proto/src/prost/v0_38/tendermint.rpc.grpc.rs | 29 +++------- proto/src/prost/v0_38/tendermint.state.rs | 1 + proto/src/prost/v0_38/tendermint.statesync.rs | 5 +- proto/src/prost/v0_38/tendermint.store.rs | 3 +- proto/src/prost/v0_38/tendermint.types.rs | 11 ++-- proto/src/prost/v0_38/tendermint.version.rs | 3 +- proto/src/protobuf.rs | 9 ++- tools/proto-compiler/Cargo.toml | 4 +- 48 files changed, 192 insertions(+), 258 deletions(-) create mode 100644 .changelog/unreleased/breaking-changes/prost-0.13+tonic-0.12.md diff --git a/.changelog/unreleased/breaking-changes/prost-0.13+tonic-0.12.md b/.changelog/unreleased/breaking-changes/prost-0.13+tonic-0.12.md new file mode 100644 index 000000000..f1b5605f6 --- /dev/null +++ b/.changelog/unreleased/breaking-changes/prost-0.13+tonic-0.12.md @@ -0,0 +1,2 @@ +- `[tendermint-proto]`: Update `prost` to v0.13 and `tonic` to v0.12 + ([\#1444](https://github.com/informalsystems/tendermint-rs/pull/1444)) diff --git a/abci/Cargo.toml b/abci/Cargo.toml index a675e46e8..a9dfcad50 100644 --- a/abci/Cargo.toml +++ b/abci/Cargo.toml @@ -32,7 +32,7 @@ binary = [ [dependencies] bytes = { version = "1.0", default-features = false } -prost = { version = "0.12", default-features = false } +prost = { version = "0.13", default-features = false } tendermint-proto = { version = "0.37.0", default-features = false, path = "../proto" } tracing = { version = "0.1", default-features = false } flex-error = { version = "0.4.4", default-features = false } diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index 5db655bd5..2af28a7c2 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -34,7 +34,7 @@ eyre = { version = "0.6", default-features = false } flume = { version = "0.11.0", default-features = false } hkdf = { version = "0.12.3", default-features = false } merlin = { version = "3", default-features = false } -prost = { version = "0.12", default-features = false } +prost = { version = "0.13", default-features = false } rand_core = { version = "0.6", default-features = false, features = ["std"] } sha2 = { version = "0.10", default-features = false } subtle = { version = "2", default-features = false } @@ -49,4 +49,4 @@ tendermint-proto = { path = "../proto", version = "0.37.0", default-features = f tendermint-std-ext = { path = "../std-ext", version = "0.37.0", default-features = false } # optional dependencies -prost-derive = { version = "0.12", optional = true } +prost-derive = { version = "0.13", optional = true } diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 806788924..cad98fb2d 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -22,15 +22,15 @@ grpc-server = ["tonic"] all-features = true [dependencies] -prost = { version = "0.12", default-features = false } -prost-types = { version = "0.12", default-features = false } +prost = { version = "0.13", default-features = false } +prost-types = { version = "0.13", default-features = false } bytes = { version = "1.0", default-features = false, features = ["serde"]} serde = { version = "1.0", default-features = false, features = ["derive"] } serde_bytes = { version = "0.11", default-features = false, features = ["alloc"] } subtle-encoding = { version = "0.5", default-features = false, features = ["hex", "base64", "alloc"] } time = { version = "0.3", default-features = false, features = ["macros", "parsing"] } flex-error = { version = "0.4.4", default-features = false } -tonic = { version = "0.11", optional = true } +tonic = { version = "0.12", optional = true } [dev-dependencies] serde_json = { version = "1.0", default-features = false, features = ["alloc"] } diff --git a/proto/src/prost/v0_34/tendermint.abci.rs b/proto/src/prost/v0_34/tendermint.abci.rs index e4a78b783..1719f446a 100644 --- a/proto/src/prost/v0_34/tendermint.abci.rs +++ b/proto/src/prost/v0_34/tendermint.abci.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -55,7 +56,7 @@ pub struct RequestEcho { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestFlush {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -139,19 +140,19 @@ pub struct RequestDeliverTx { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestEndBlock { #[prost(int64, tag = "1")] pub height: i64, } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestCommit {} /// lists available snapshots #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestListSnapshots {} /// offers a snapshot to the application #[derive(::serde::Deserialize, ::serde::Serialize)] @@ -168,7 +169,7 @@ pub struct RequestOfferSnapshot { /// loads a snapshot chunk #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestLoadSnapshotChunk { #[prost(uint64, tag = "1")] pub height: u64, @@ -256,7 +257,7 @@ pub struct ResponseEcho { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseFlush {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -422,7 +423,7 @@ pub struct ResponseListSnapshots { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseOfferSnapshot { #[prost(enumeration = "response_offer_snapshot::Result", tag = "1")] pub result: i32, @@ -581,7 +582,7 @@ pub struct ConsensusParams { /// BlockParams contains limits on the block size. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockParams { /// Note: must be greater than 0 #[prost(int64, tag = "1")] @@ -870,19 +871,17 @@ pub mod abci_application_server { } #[derive(Debug)] pub struct AbciApplicationServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl AbciApplicationServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -945,7 +944,6 @@ pub mod abci_application_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/tendermint.abci.ABCIApplication/Echo" => { #[allow(non_camel_case_types)] @@ -975,7 +973,6 @@ pub mod abci_application_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 = EchoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1020,7 +1017,6 @@ pub mod abci_application_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 = FlushSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1065,7 +1061,6 @@ pub mod abci_application_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 = InfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1111,7 +1106,6 @@ pub mod abci_application_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 = SetOptionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1157,7 +1151,6 @@ pub mod abci_application_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 = DeliverTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1203,7 +1196,6 @@ pub mod abci_application_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 = CheckTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1248,7 +1240,6 @@ pub mod abci_application_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 = QuerySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1294,7 +1285,6 @@ pub mod abci_application_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 = CommitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1340,7 +1330,6 @@ pub mod abci_application_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 = InitChainSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1386,7 +1375,6 @@ pub mod abci_application_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 = BeginBlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1432,7 +1420,6 @@ pub mod abci_application_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 = EndBlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1479,7 +1466,6 @@ pub mod abci_application_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 = ListSnapshotsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1526,7 +1512,6 @@ pub mod abci_application_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 = OfferSnapshotSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1573,7 +1558,6 @@ pub mod abci_application_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 = LoadSnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1623,7 +1607,6 @@ pub mod abci_application_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 = ApplySnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1645,8 +1628,11 @@ pub mod abci_application_server { 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(), ) @@ -1667,16 +1653,6 @@ pub mod abci_application_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for AbciApplicationServer { const NAME: &'static str = "tendermint.abci.ABCIApplication"; } diff --git a/proto/src/prost/v0_34/tendermint.blockchain.rs b/proto/src/prost/v0_34/tendermint.blockchain.rs index 4480ece49..094e3aeea 100644 --- a/proto/src/prost/v0_34/tendermint.blockchain.rs +++ b/proto/src/prost/v0_34/tendermint.blockchain.rs @@ -1,13 +1,14 @@ +// This file is @generated by prost-build. /// BlockRequest requests a block for a specific height #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockRequest { #[prost(int64, tag = "1")] pub height: i64, } /// NoBlockResponse informs the node that the peer does not have block at the requested height #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct NoBlockResponse { #[prost(int64, tag = "1")] pub height: i64, @@ -21,11 +22,11 @@ pub struct BlockResponse { } /// StatusRequest requests the status of a peer. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StatusRequest {} /// StatusResponse is a peer response to inform their status. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StatusResponse { #[prost(int64, tag = "1")] pub height: i64, diff --git a/proto/src/prost/v0_34/tendermint.consensus.rs b/proto/src/prost/v0_34/tendermint.consensus.rs index 95237cc78..c04bf2d5a 100644 --- a/proto/src/prost/v0_34/tendermint.consensus.rs +++ b/proto/src/prost/v0_34/tendermint.consensus.rs @@ -1,7 +1,8 @@ +// This file is @generated by prost-build. /// NewRoundStep is sent for every step taken in the ConsensusState. /// For every height/round/step transition #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct NewRoundStep { #[prost(int64, tag = "1")] pub height: i64, @@ -69,7 +70,7 @@ pub struct Vote { } /// HasVote is sent to indicate that a particular vote has been received. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HasVote { #[prost(int64, tag = "1")] pub height: i64, @@ -150,7 +151,7 @@ pub struct MsgInfo { } /// TimeoutInfo internally generated messages which may update the state #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TimeoutInfo { #[prost(message, optional, tag = "1")] pub duration: ::core::option::Option, @@ -164,7 +165,7 @@ pub struct TimeoutInfo { /// EndHeight marks the end of the given height inside WAL. /// @internal used by scripts/wal2json util. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EndHeight { #[prost(int64, tag = "1")] pub height: i64, diff --git a/proto/src/prost/v0_34/tendermint.crypto.rs b/proto/src/prost/v0_34/tendermint.crypto.rs index 0b1c3e197..b62f77775 100644 --- a/proto/src/prost/v0_34/tendermint.crypto.rs +++ b/proto/src/prost/v0_34/tendermint.crypto.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_34/tendermint.libs.bits.rs b/proto/src/prost/v0_34/tendermint.libs.bits.rs index 460876d21..7ddf7f64a 100644 --- a/proto/src/prost/v0_34/tendermint.libs.bits.rs +++ b/proto/src/prost/v0_34/tendermint.libs.bits.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_34/tendermint.mempool.rs b/proto/src/prost/v0_34/tendermint.mempool.rs index 9fec1376b..056cddaf5 100644 --- a/proto/src/prost/v0_34/tendermint.mempool.rs +++ b/proto/src/prost/v0_34/tendermint.mempool.rs @@ -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 Txs { diff --git a/proto/src/prost/v0_34/tendermint.p2p.rs b/proto/src/prost/v0_34/tendermint.p2p.rs index 1b96c2577..614ee2570 100644 --- a/proto/src/prost/v0_34/tendermint.p2p.rs +++ b/proto/src/prost/v0_34/tendermint.p2p.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -11,7 +12,7 @@ pub struct NetAddress { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ProtocolVersion { #[prost(uint64, tag = "1")] pub p2p: u64, @@ -52,11 +53,11 @@ pub struct DefaultNodeInfoOther { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PacketPing {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PacketPong {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -101,7 +102,7 @@ pub struct AuthSigMessage { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PexRequest {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/proto/src/prost/v0_34/tendermint.privval.rs b/proto/src/prost/v0_34/tendermint.privval.rs index 8485c3816..04ed210fe 100644 --- a/proto/src/prost/v0_34/tendermint.privval.rs +++ b/proto/src/prost/v0_34/tendermint.privval.rs @@ -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 RemoteSignerError { @@ -60,11 +61,11 @@ pub struct SignedProposalResponse { } /// PingRequest is a request to confirm that the connection is alive. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PingRequest {} /// PingResponse is a response to confirm that the connection is alive. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PingResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_34/tendermint.rpc.grpc.rs b/proto/src/prost/v0_34/tendermint.rpc.grpc.rs index cef8f2f15..c6d678166 100644 --- a/proto/src/prost/v0_34/tendermint.rpc.grpc.rs +++ b/proto/src/prost/v0_34/tendermint.rpc.grpc.rs @@ -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 RequestPing {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -8,7 +9,7 @@ pub struct RequestBroadcastTx { pub tx: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponsePing {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -40,19 +41,17 @@ pub mod broadcast_api_server { } #[derive(Debug)] pub struct BroadcastApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl BroadcastApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -115,7 +114,6 @@ pub mod broadcast_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/tendermint.rpc.grpc.BroadcastAPI/Ping" => { #[allow(non_camel_case_types)] @@ -144,7 +142,6 @@ pub mod broadcast_api_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 = PingSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -190,7 +187,6 @@ pub mod broadcast_api_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 = BroadcastTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -212,8 +208,11 @@ pub mod broadcast_api_server { 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(), ) @@ -234,16 +233,6 @@ pub mod broadcast_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for BroadcastApiServer { const NAME: &'static str = "tendermint.rpc.grpc.BroadcastAPI"; } diff --git a/proto/src/prost/v0_34/tendermint.state.rs b/proto/src/prost/v0_34/tendermint.state.rs index dd006a2c6..699bffe9d 100644 --- a/proto/src/prost/v0_34/tendermint.state.rs +++ b/proto/src/prost/v0_34/tendermint.state.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ABCIResponses retains the responses /// of the various ABCI calls during block processing. /// It is persisted to disk for each height before calling Commit. diff --git a/proto/src/prost/v0_34/tendermint.statesync.rs b/proto/src/prost/v0_34/tendermint.statesync.rs index a2ad034e3..5e13924a8 100644 --- a/proto/src/prost/v0_34/tendermint.statesync.rs +++ b/proto/src/prost/v0_34/tendermint.statesync.rs @@ -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 Message { @@ -20,7 +21,7 @@ pub mod message { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SnapshotsRequest {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -37,7 +38,7 @@ pub struct SnapshotsResponse { pub metadata: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ChunkRequest { #[prost(uint64, tag = "1")] pub height: u64, diff --git a/proto/src/prost/v0_34/tendermint.store.rs b/proto/src/prost/v0_34/tendermint.store.rs index 98d20b0fc..4d8f23e94 100644 --- a/proto/src/prost/v0_34/tendermint.store.rs +++ b/proto/src/prost/v0_34/tendermint.store.rs @@ -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 BlockStoreState { #[prost(int64, tag = "1")] pub base: i64, diff --git a/proto/src/prost/v0_34/tendermint.types.rs b/proto/src/prost/v0_34/tendermint.types.rs index 1d31b82f6..09aade6a2 100644 --- a/proto/src/prost/v0_34/tendermint.types.rs +++ b/proto/src/prost/v0_34/tendermint.types.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -366,7 +367,7 @@ pub struct ConsensusParams { /// BlockParams contains limits on the block size. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockParams { /// Max block size, in bytes. /// Note: must be greater than 0 @@ -386,7 +387,7 @@ pub struct BlockParams { /// EvidenceParams determine how we handle evidence of malfeasance. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EvidenceParams { /// Max age of evidence, in blocks. /// @@ -421,7 +422,7 @@ pub struct ValidatorParams { /// VersionParams contains the ABCI application version. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VersionParams { #[prost(uint64, tag = "1")] pub app_version: u64, @@ -430,7 +431,7 @@ pub struct VersionParams { /// /// It is hashed into the Header.ConsensusHash. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HashedParams { #[prost(int64, tag = "1")] pub block_max_bytes: i64, diff --git a/proto/src/prost/v0_34/tendermint.version.rs b/proto/src/prost/v0_34/tendermint.version.rs index 8a77a26fc..8c781751e 100644 --- a/proto/src/prost/v0_34/tendermint.version.rs +++ b/proto/src/prost/v0_34/tendermint.version.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// App includes the protocol and software version for the application. /// This information is included in ResponseInfo. The App.Protocol can be /// updated in ResponseEndBlock. @@ -14,7 +15,7 @@ pub struct App { /// state transition machine. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Consensus { #[prost(uint64, tag = "1")] #[serde(with = "crate::serializers::from_str")] diff --git a/proto/src/prost/v0_37/tendermint.abci.rs b/proto/src/prost/v0_37/tendermint.abci.rs index ed5a863e4..ba11419cc 100644 --- a/proto/src/prost/v0_37/tendermint.abci.rs +++ b/proto/src/prost/v0_37/tendermint.abci.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -57,7 +58,7 @@ pub struct RequestEcho { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestFlush {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -133,19 +134,19 @@ pub struct RequestDeliverTx { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestEndBlock { #[prost(int64, tag = "1")] pub height: i64, } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestCommit {} /// lists available snapshots #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestListSnapshots {} /// offers a snapshot to the application #[derive(::serde::Deserialize, ::serde::Serialize)] @@ -162,7 +163,7 @@ pub struct RequestOfferSnapshot { /// loads a snapshot chunk #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestLoadSnapshotChunk { #[prost(uint64, tag = "1")] pub height: u64, @@ -300,7 +301,7 @@ pub struct ResponseEcho { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseFlush {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -453,7 +454,7 @@ pub struct ResponseListSnapshots { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseOfferSnapshot { #[prost(enumeration = "response_offer_snapshot::Result", tag = "1")] pub result: i32, @@ -603,7 +604,7 @@ pub struct ResponsePrepareProposal { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseProcessProposal { #[prost(enumeration = "response_process_proposal::ProposalStatus", tag = "1")] pub status: i32, @@ -962,19 +963,17 @@ pub mod abci_application_server { } #[derive(Debug)] pub struct AbciApplicationServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl AbciApplicationServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -1037,7 +1036,6 @@ pub mod abci_application_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/tendermint.abci.ABCIApplication/Echo" => { #[allow(non_camel_case_types)] @@ -1067,7 +1065,6 @@ pub mod abci_application_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 = EchoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1112,7 +1109,6 @@ pub mod abci_application_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 = FlushSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1157,7 +1153,6 @@ pub mod abci_application_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 = InfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1203,7 +1198,6 @@ pub mod abci_application_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 = DeliverTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1249,7 +1243,6 @@ pub mod abci_application_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 = CheckTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1294,7 +1287,6 @@ pub mod abci_application_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 = QuerySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1340,7 +1332,6 @@ pub mod abci_application_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 = CommitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1386,7 +1377,6 @@ pub mod abci_application_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 = InitChainSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1432,7 +1422,6 @@ pub mod abci_application_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 = BeginBlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1478,7 +1467,6 @@ pub mod abci_application_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 = EndBlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1525,7 +1513,6 @@ pub mod abci_application_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 = ListSnapshotsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1572,7 +1559,6 @@ pub mod abci_application_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 = OfferSnapshotSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1619,7 +1605,6 @@ pub mod abci_application_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 = LoadSnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1669,7 +1654,6 @@ pub mod abci_application_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 = ApplySnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1716,7 +1700,6 @@ pub mod abci_application_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 = PrepareProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1763,7 +1746,6 @@ pub mod abci_application_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 = ProcessProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1785,8 +1767,11 @@ pub mod abci_application_server { 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(), ) @@ -1807,16 +1792,6 @@ pub mod abci_application_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for AbciApplicationServer { const NAME: &'static str = "tendermint.abci.ABCIApplication"; } diff --git a/proto/src/prost/v0_37/tendermint.blocksync.rs b/proto/src/prost/v0_37/tendermint.blocksync.rs index 4480ece49..094e3aeea 100644 --- a/proto/src/prost/v0_37/tendermint.blocksync.rs +++ b/proto/src/prost/v0_37/tendermint.blocksync.rs @@ -1,13 +1,14 @@ +// This file is @generated by prost-build. /// BlockRequest requests a block for a specific height #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockRequest { #[prost(int64, tag = "1")] pub height: i64, } /// NoBlockResponse informs the node that the peer does not have block at the requested height #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct NoBlockResponse { #[prost(int64, tag = "1")] pub height: i64, @@ -21,11 +22,11 @@ pub struct BlockResponse { } /// StatusRequest requests the status of a peer. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StatusRequest {} /// StatusResponse is a peer response to inform their status. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StatusResponse { #[prost(int64, tag = "1")] pub height: i64, diff --git a/proto/src/prost/v0_37/tendermint.consensus.rs b/proto/src/prost/v0_37/tendermint.consensus.rs index 95237cc78..c04bf2d5a 100644 --- a/proto/src/prost/v0_37/tendermint.consensus.rs +++ b/proto/src/prost/v0_37/tendermint.consensus.rs @@ -1,7 +1,8 @@ +// This file is @generated by prost-build. /// NewRoundStep is sent for every step taken in the ConsensusState. /// For every height/round/step transition #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct NewRoundStep { #[prost(int64, tag = "1")] pub height: i64, @@ -69,7 +70,7 @@ pub struct Vote { } /// HasVote is sent to indicate that a particular vote has been received. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HasVote { #[prost(int64, tag = "1")] pub height: i64, @@ -150,7 +151,7 @@ pub struct MsgInfo { } /// TimeoutInfo internally generated messages which may update the state #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TimeoutInfo { #[prost(message, optional, tag = "1")] pub duration: ::core::option::Option, @@ -164,7 +165,7 @@ pub struct TimeoutInfo { /// EndHeight marks the end of the given height inside WAL. /// @internal used by scripts/wal2json util. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EndHeight { #[prost(int64, tag = "1")] pub height: i64, diff --git a/proto/src/prost/v0_37/tendermint.crypto.rs b/proto/src/prost/v0_37/tendermint.crypto.rs index 0b1c3e197..b62f77775 100644 --- a/proto/src/prost/v0_37/tendermint.crypto.rs +++ b/proto/src/prost/v0_37/tendermint.crypto.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_37/tendermint.libs.bits.rs b/proto/src/prost/v0_37/tendermint.libs.bits.rs index 460876d21..7ddf7f64a 100644 --- a/proto/src/prost/v0_37/tendermint.libs.bits.rs +++ b/proto/src/prost/v0_37/tendermint.libs.bits.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_37/tendermint.mempool.rs b/proto/src/prost/v0_37/tendermint.mempool.rs index 9fec1376b..056cddaf5 100644 --- a/proto/src/prost/v0_37/tendermint.mempool.rs +++ b/proto/src/prost/v0_37/tendermint.mempool.rs @@ -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 Txs { diff --git a/proto/src/prost/v0_37/tendermint.p2p.rs b/proto/src/prost/v0_37/tendermint.p2p.rs index 1b96c2577..614ee2570 100644 --- a/proto/src/prost/v0_37/tendermint.p2p.rs +++ b/proto/src/prost/v0_37/tendermint.p2p.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -11,7 +12,7 @@ pub struct NetAddress { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ProtocolVersion { #[prost(uint64, tag = "1")] pub p2p: u64, @@ -52,11 +53,11 @@ pub struct DefaultNodeInfoOther { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PacketPing {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PacketPong {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -101,7 +102,7 @@ pub struct AuthSigMessage { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PexRequest {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/proto/src/prost/v0_37/tendermint.privval.rs b/proto/src/prost/v0_37/tendermint.privval.rs index 8485c3816..04ed210fe 100644 --- a/proto/src/prost/v0_37/tendermint.privval.rs +++ b/proto/src/prost/v0_37/tendermint.privval.rs @@ -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 RemoteSignerError { @@ -60,11 +61,11 @@ pub struct SignedProposalResponse { } /// PingRequest is a request to confirm that the connection is alive. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PingRequest {} /// PingResponse is a response to confirm that the connection is alive. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PingResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_37/tendermint.rpc.grpc.rs b/proto/src/prost/v0_37/tendermint.rpc.grpc.rs index cef8f2f15..c6d678166 100644 --- a/proto/src/prost/v0_37/tendermint.rpc.grpc.rs +++ b/proto/src/prost/v0_37/tendermint.rpc.grpc.rs @@ -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 RequestPing {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -8,7 +9,7 @@ pub struct RequestBroadcastTx { pub tx: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponsePing {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -40,19 +41,17 @@ pub mod broadcast_api_server { } #[derive(Debug)] pub struct BroadcastApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl BroadcastApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -115,7 +114,6 @@ pub mod broadcast_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/tendermint.rpc.grpc.BroadcastAPI/Ping" => { #[allow(non_camel_case_types)] @@ -144,7 +142,6 @@ pub mod broadcast_api_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 = PingSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -190,7 +187,6 @@ pub mod broadcast_api_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 = BroadcastTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -212,8 +208,11 @@ pub mod broadcast_api_server { 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(), ) @@ -234,16 +233,6 @@ pub mod broadcast_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for BroadcastApiServer { const NAME: &'static str = "tendermint.rpc.grpc.BroadcastAPI"; } diff --git a/proto/src/prost/v0_37/tendermint.state.rs b/proto/src/prost/v0_37/tendermint.state.rs index dd006a2c6..699bffe9d 100644 --- a/proto/src/prost/v0_37/tendermint.state.rs +++ b/proto/src/prost/v0_37/tendermint.state.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ABCIResponses retains the responses /// of the various ABCI calls during block processing. /// It is persisted to disk for each height before calling Commit. diff --git a/proto/src/prost/v0_37/tendermint.statesync.rs b/proto/src/prost/v0_37/tendermint.statesync.rs index a2ad034e3..5e13924a8 100644 --- a/proto/src/prost/v0_37/tendermint.statesync.rs +++ b/proto/src/prost/v0_37/tendermint.statesync.rs @@ -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 Message { @@ -20,7 +21,7 @@ pub mod message { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SnapshotsRequest {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -37,7 +38,7 @@ pub struct SnapshotsResponse { pub metadata: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ChunkRequest { #[prost(uint64, tag = "1")] pub height: u64, diff --git a/proto/src/prost/v0_37/tendermint.store.rs b/proto/src/prost/v0_37/tendermint.store.rs index 98d20b0fc..4d8f23e94 100644 --- a/proto/src/prost/v0_37/tendermint.store.rs +++ b/proto/src/prost/v0_37/tendermint.store.rs @@ -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 BlockStoreState { #[prost(int64, tag = "1")] pub base: i64, diff --git a/proto/src/prost/v0_37/tendermint.types.rs b/proto/src/prost/v0_37/tendermint.types.rs index 1b0f6ba68..a34889656 100644 --- a/proto/src/prost/v0_37/tendermint.types.rs +++ b/proto/src/prost/v0_37/tendermint.types.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -446,7 +447,7 @@ pub struct ConsensusParams { /// BlockParams contains limits on the block size. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockParams { /// Max block size, in bytes. /// Note: must be greater than 0 @@ -460,7 +461,7 @@ pub struct BlockParams { /// EvidenceParams determine how we handle evidence of malfeasance. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EvidenceParams { /// Max age of evidence, in blocks. /// @@ -495,7 +496,7 @@ pub struct ValidatorParams { /// VersionParams contains the ABCI application version. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VersionParams { #[prost(uint64, tag = "1")] pub app: u64, @@ -504,7 +505,7 @@ pub struct VersionParams { /// /// It is hashed into the Header.ConsensusHash. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HashedParams { #[prost(int64, tag = "1")] pub block_max_bytes: i64, diff --git a/proto/src/prost/v0_37/tendermint.version.rs b/proto/src/prost/v0_37/tendermint.version.rs index 8a77a26fc..8c781751e 100644 --- a/proto/src/prost/v0_37/tendermint.version.rs +++ b/proto/src/prost/v0_37/tendermint.version.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// App includes the protocol and software version for the application. /// This information is included in ResponseInfo. The App.Protocol can be /// updated in ResponseEndBlock. @@ -14,7 +15,7 @@ pub struct App { /// state transition machine. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Consensus { #[prost(uint64, tag = "1")] #[serde(with = "crate::serializers::from_str")] diff --git a/proto/src/prost/v0_38/tendermint.abci.rs b/proto/src/prost/v0_38/tendermint.abci.rs index 34ab13e8d..a30f9bdc7 100644 --- a/proto/src/prost/v0_38/tendermint.abci.rs +++ b/proto/src/prost/v0_38/tendermint.abci.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -57,7 +58,7 @@ pub struct RequestEcho { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestFlush {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -113,12 +114,12 @@ pub struct RequestCheckTx { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestCommit {} /// lists available snapshots #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestListSnapshots {} /// offers a snapshot to the application #[derive(::serde::Deserialize, ::serde::Serialize)] @@ -135,7 +136,7 @@ pub struct RequestOfferSnapshot { /// loads a snapshot chunk #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestLoadSnapshotChunk { #[prost(uint64, tag = "1")] pub height: u64, @@ -338,7 +339,7 @@ pub struct ResponseEcho { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseFlush {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -424,7 +425,7 @@ pub struct ResponseCheckTx { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseCommit { #[prost(int64, tag = "3")] pub retain_height: i64, @@ -438,7 +439,7 @@ pub struct ResponseListSnapshots { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseOfferSnapshot { #[prost(enumeration = "response_offer_snapshot::Result", tag = "1")] pub result: i32, @@ -588,7 +589,7 @@ pub struct ResponsePrepareProposal { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseProcessProposal { #[prost(enumeration = "response_process_proposal::ProposalStatus", tag = "1")] pub status: i32, @@ -645,7 +646,7 @@ pub struct ResponseExtendVote { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponseVerifyVoteExtension { #[prost(enumeration = "response_verify_vote_extension::VerifyStatus", tag = "1")] pub status: i32, @@ -1062,19 +1063,17 @@ pub mod abci_server { } #[derive(Debug)] pub struct AbciServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl AbciServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -1137,7 +1136,6 @@ pub mod abci_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/tendermint.abci.ABCI/Echo" => { #[allow(non_camel_case_types)] @@ -1166,7 +1164,6 @@ pub mod abci_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 = EchoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1210,7 +1207,6 @@ pub mod abci_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 = FlushSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1254,7 +1250,6 @@ pub mod abci_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 = InfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1298,7 +1293,6 @@ pub mod abci_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 = CheckTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1342,7 +1336,6 @@ pub mod abci_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 = QuerySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1386,7 +1379,6 @@ pub mod abci_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 = CommitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1430,7 +1422,6 @@ pub mod abci_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 = InitChainSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1476,7 +1467,6 @@ pub mod abci_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 = ListSnapshotsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1522,7 +1512,6 @@ pub mod abci_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 = OfferSnapshotSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1568,7 +1557,6 @@ pub mod abci_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 = LoadSnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1614,7 +1602,6 @@ pub mod abci_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 = ApplySnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1660,7 +1647,6 @@ pub mod abci_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 = PrepareProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1706,7 +1692,6 @@ pub mod abci_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 = ProcessProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1750,7 +1735,6 @@ pub mod abci_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 = ExtendVoteSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1796,7 +1780,6 @@ pub mod abci_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 = VerifyVoteExtensionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1842,7 +1825,6 @@ pub mod abci_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 = FinalizeBlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1864,8 +1846,11 @@ pub mod abci_server { 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(), ) @@ -1886,16 +1871,6 @@ pub mod abci_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for AbciServer { const NAME: &'static str = "tendermint.abci.ABCI"; } diff --git a/proto/src/prost/v0_38/tendermint.blocksync.rs b/proto/src/prost/v0_38/tendermint.blocksync.rs index ae51fa7d7..380da98b9 100644 --- a/proto/src/prost/v0_38/tendermint.blocksync.rs +++ b/proto/src/prost/v0_38/tendermint.blocksync.rs @@ -1,13 +1,14 @@ +// This file is @generated by prost-build. /// BlockRequest requests a block for a specific height #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockRequest { #[prost(int64, tag = "1")] pub height: i64, } /// NoBlockResponse informs the node that the peer does not have block at the requested height #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct NoBlockResponse { #[prost(int64, tag = "1")] pub height: i64, @@ -23,11 +24,11 @@ pub struct BlockResponse { } /// StatusRequest requests the status of a peer. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StatusRequest {} /// StatusResponse is a peer response to inform their status. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StatusResponse { #[prost(int64, tag = "1")] pub height: i64, diff --git a/proto/src/prost/v0_38/tendermint.consensus.rs b/proto/src/prost/v0_38/tendermint.consensus.rs index 95237cc78..c04bf2d5a 100644 --- a/proto/src/prost/v0_38/tendermint.consensus.rs +++ b/proto/src/prost/v0_38/tendermint.consensus.rs @@ -1,7 +1,8 @@ +// This file is @generated by prost-build. /// NewRoundStep is sent for every step taken in the ConsensusState. /// For every height/round/step transition #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct NewRoundStep { #[prost(int64, tag = "1")] pub height: i64, @@ -69,7 +70,7 @@ pub struct Vote { } /// HasVote is sent to indicate that a particular vote has been received. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HasVote { #[prost(int64, tag = "1")] pub height: i64, @@ -150,7 +151,7 @@ pub struct MsgInfo { } /// TimeoutInfo internally generated messages which may update the state #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TimeoutInfo { #[prost(message, optional, tag = "1")] pub duration: ::core::option::Option, @@ -164,7 +165,7 @@ pub struct TimeoutInfo { /// EndHeight marks the end of the given height inside WAL. /// @internal used by scripts/wal2json util. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EndHeight { #[prost(int64, tag = "1")] pub height: i64, diff --git a/proto/src/prost/v0_38/tendermint.crypto.rs b/proto/src/prost/v0_38/tendermint.crypto.rs index 0b1c3e197..b62f77775 100644 --- a/proto/src/prost/v0_38/tendermint.crypto.rs +++ b/proto/src/prost/v0_38/tendermint.crypto.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_38/tendermint.libs.bits.rs b/proto/src/prost/v0_38/tendermint.libs.bits.rs index 460876d21..7ddf7f64a 100644 --- a/proto/src/prost/v0_38/tendermint.libs.bits.rs +++ b/proto/src/prost/v0_38/tendermint.libs.bits.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_38/tendermint.mempool.rs b/proto/src/prost/v0_38/tendermint.mempool.rs index 9fec1376b..056cddaf5 100644 --- a/proto/src/prost/v0_38/tendermint.mempool.rs +++ b/proto/src/prost/v0_38/tendermint.mempool.rs @@ -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 Txs { diff --git a/proto/src/prost/v0_38/tendermint.p2p.rs b/proto/src/prost/v0_38/tendermint.p2p.rs index 1b96c2577..614ee2570 100644 --- a/proto/src/prost/v0_38/tendermint.p2p.rs +++ b/proto/src/prost/v0_38/tendermint.p2p.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -11,7 +12,7 @@ pub struct NetAddress { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ProtocolVersion { #[prost(uint64, tag = "1")] pub p2p: u64, @@ -52,11 +53,11 @@ pub struct DefaultNodeInfoOther { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PacketPing {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PacketPong {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -101,7 +102,7 @@ pub struct AuthSigMessage { } #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PexRequest {} #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/proto/src/prost/v0_38/tendermint.privval.rs b/proto/src/prost/v0_38/tendermint.privval.rs index 8485c3816..04ed210fe 100644 --- a/proto/src/prost/v0_38/tendermint.privval.rs +++ b/proto/src/prost/v0_38/tendermint.privval.rs @@ -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 RemoteSignerError { @@ -60,11 +61,11 @@ pub struct SignedProposalResponse { } /// PingRequest is a request to confirm that the connection is alive. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PingRequest {} /// PingResponse is a response to confirm that the connection is alive. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PingResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/proto/src/prost/v0_38/tendermint.rpc.grpc.rs b/proto/src/prost/v0_38/tendermint.rpc.grpc.rs index 0084885c0..505d0ec78 100644 --- a/proto/src/prost/v0_38/tendermint.rpc.grpc.rs +++ b/proto/src/prost/v0_38/tendermint.rpc.grpc.rs @@ -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 RequestPing {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -8,7 +9,7 @@ pub struct RequestBroadcastTx { pub tx: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ResponsePing {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -44,19 +45,17 @@ pub mod broadcast_api_server { /// broadcast API, and is scheduled for removal after v0.38. #[derive(Debug)] pub struct BroadcastApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl BroadcastApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -119,7 +118,6 @@ pub mod broadcast_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/tendermint.rpc.grpc.BroadcastAPI/Ping" => { #[allow(non_camel_case_types)] @@ -148,7 +146,6 @@ pub mod broadcast_api_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 = PingSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -194,7 +191,6 @@ pub mod broadcast_api_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 = BroadcastTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -216,8 +212,11 @@ pub mod broadcast_api_server { 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(), ) @@ -238,16 +237,6 @@ pub mod broadcast_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for BroadcastApiServer { const NAME: &'static str = "tendermint.rpc.grpc.BroadcastAPI"; } diff --git a/proto/src/prost/v0_38/tendermint.state.rs b/proto/src/prost/v0_38/tendermint.state.rs index 014ddd6dc..a286f0155 100644 --- a/proto/src/prost/v0_38/tendermint.state.rs +++ b/proto/src/prost/v0_38/tendermint.state.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// LegacyABCIResponses retains the responses /// of the legacy ABCI calls during block processing. /// Note ReponseDeliverTx is renamed to ExecTxResult but they are semantically the same diff --git a/proto/src/prost/v0_38/tendermint.statesync.rs b/proto/src/prost/v0_38/tendermint.statesync.rs index a2ad034e3..5e13924a8 100644 --- a/proto/src/prost/v0_38/tendermint.statesync.rs +++ b/proto/src/prost/v0_38/tendermint.statesync.rs @@ -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 Message { @@ -20,7 +21,7 @@ pub mod message { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SnapshotsRequest {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -37,7 +38,7 @@ pub struct SnapshotsResponse { pub metadata: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ChunkRequest { #[prost(uint64, tag = "1")] pub height: u64, diff --git a/proto/src/prost/v0_38/tendermint.store.rs b/proto/src/prost/v0_38/tendermint.store.rs index 98d20b0fc..4d8f23e94 100644 --- a/proto/src/prost/v0_38/tendermint.store.rs +++ b/proto/src/prost/v0_38/tendermint.store.rs @@ -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 BlockStoreState { #[prost(int64, tag = "1")] pub base: i64, diff --git a/proto/src/prost/v0_38/tendermint.types.rs b/proto/src/prost/v0_38/tendermint.types.rs index 863ef73f4..4e1651388 100644 --- a/proto/src/prost/v0_38/tendermint.types.rs +++ b/proto/src/prost/v0_38/tendermint.types.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -496,7 +497,7 @@ pub struct ConsensusParams { /// BlockParams contains limits on the block size. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockParams { /// Max block size, in bytes. /// Note: must be greater than 0 @@ -510,7 +511,7 @@ pub struct BlockParams { /// EvidenceParams determine how we handle evidence of malfeasance. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EvidenceParams { /// Max age of evidence, in blocks. /// @@ -545,7 +546,7 @@ pub struct ValidatorParams { /// VersionParams contains the ABCI application version. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VersionParams { #[prost(uint64, tag = "1")] pub app: u64, @@ -554,7 +555,7 @@ pub struct VersionParams { /// /// It is hashed into the Header.ConsensusHash. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HashedParams { #[prost(int64, tag = "1")] pub block_max_bytes: i64, @@ -564,7 +565,7 @@ pub struct HashedParams { /// ABCIParams configure functionality specific to the Application Blockchain Interface. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct AbciParams { /// vote_extensions_enable_height configures the first height during which /// vote extensions will be enabled. During this specified height, and for all diff --git a/proto/src/prost/v0_38/tendermint.version.rs b/proto/src/prost/v0_38/tendermint.version.rs index 8a77a26fc..8c781751e 100644 --- a/proto/src/prost/v0_38/tendermint.version.rs +++ b/proto/src/prost/v0_38/tendermint.version.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// App includes the protocol and software version for the application. /// This information is included in ResponseInfo. The App.Protocol can be /// updated in ResponseEndBlock. @@ -14,7 +15,7 @@ pub struct App { /// state transition machine. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Consensus { #[prost(uint64, tag = "1")] #[serde(with = "crate::serializers::from_str")] diff --git a/proto/src/protobuf.rs b/proto/src/protobuf.rs index 8cececae9..7a587c209 100644 --- a/proto/src/protobuf.rs +++ b/proto/src/protobuf.rs @@ -16,8 +16,11 @@ /// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By /// restricting to that range, we ensure that we can convert to and from [RFC /// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. -#[derive(Clone, PartialEq, ::prost::Message, ::serde::Deserialize, ::serde::Serialize)] -#[serde(from = "crate::serializers::timestamp::Rfc3339", into = "crate::serializers::timestamp::Rfc3339")] +#[derive(Copy, Clone, PartialEq, ::prost::Message, ::serde::Deserialize, ::serde::Serialize)] +#[serde( + from = "crate::serializers::timestamp::Rfc3339", + into = "crate::serializers::timestamp::Rfc3339" +)] pub struct Timestamp { /// Represents seconds of UTC time since Unix epoch /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to @@ -38,7 +41,7 @@ pub struct Timestamp { /// or "month". It is related to Timestamp in that the difference between /// two Timestamp values is a Duration and it can be added or subtracted /// from a Timestamp. Range is approximately +-10,000 years. -#[derive(Clone, PartialEq, ::prost::Message, ::serde::Deserialize, ::serde::Serialize)] +#[derive(Copy, Clone, PartialEq, ::prost::Message, ::serde::Deserialize, ::serde::Serialize)] pub struct Duration { /// Signed seconds of the span of time. Must be from -315,576,000,000 /// to +315,576,000,000 inclusive. Note: these bounds are computed from: diff --git a/tools/proto-compiler/Cargo.toml b/tools/proto-compiler/Cargo.toml index 0eb8f885b..48830f186 100644 --- a/tools/proto-compiler/Cargo.toml +++ b/tools/proto-compiler/Cargo.toml @@ -7,11 +7,11 @@ publish = false [dependencies] walkdir = { version = "2.3" } -prost-build = { version = "0.12.0" } +prost-build = { version = "0.13" } git2 = { version = "0.16" } tempfile = { version = "3.5.0" } subtle-encoding = { version = "0.5" } serde = { version = "1.0", features = ["derive"] } serde_yaml = { version = "0.9" } thiserror = { version = "1.0" } -tonic-build = { version = "0.10.0" } +tonic-build = { version = "0.12" }