Skip to content

Commit

Permalink
Bump tendermint-rs crates to v0.23.9 (#277)
Browse files Browse the repository at this point in the history
This includes the following additional dependency upgrades:

- `prost` v0.11
- `prost-build` v0.11
- `prost-types` v0.11
- `tonic` v0.8
- `tonic-build` v0.11

Additionally regenerates code from protobufs using `proto-build`.
  • Loading branch information
tony-iqlusion authored Aug 8, 2022
1 parent b382ff1 commit 8a525e4
Show file tree
Hide file tree
Showing 36 changed files with 1,435 additions and 714 deletions.
10 changes: 5 additions & 5 deletions cosmos-sdk-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosmos-sdk-proto"
version = "0.13.0"
version = "0.14.0-pre"
authors = [
"Justin Kilpatrick <justin@althea.net>",
"Greg Szabo <greg@informal.systems>",
Expand All @@ -16,12 +16,12 @@ edition = "2021"
rust-version = "1.56"

[dependencies]
prost = "0.10"
prost-types = "0.10"
tendermint-proto = "=0.23.8"
prost = "0.11"
prost-types = "0.11"
tendermint-proto = "=0.23.9"

# Optional dependencies
tonic = { version = "0.7", optional = true, default-features = false, features = ["codegen", "prost"] }
tonic = { version = "0.8", optional = true, default-features = false, features = ["codegen", "prost"] }

[features]
default = ["grpc-transport"]
Expand Down
37 changes: 26 additions & 11 deletions cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pub struct QueryParamsResponse {
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Query defines the gRPC querier service.
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
Expand Down Expand Up @@ -117,6 +118,10 @@ pub mod query_client {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
Expand All @@ -136,19 +141,19 @@ pub mod query_client {
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with `gzip`.
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses with `gzip`.
/// Enable decompressing responses.
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Accounts returns all the existing accounts
Expand Down Expand Up @@ -246,8 +251,8 @@ pub mod query_server {
#[derive(Debug)]
pub struct QueryServer<T: Query> {
inner: _Inner<T>,
accept_compression_encodings: (),
send_compression_encodings: (),
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Query> QueryServer<T> {
Expand All @@ -271,6 +276,18 @@ pub mod query_server {
{
InterceptedService::new(Self::new(inner), interceptor)
}
/// Enable decompressing requests with the given encoding.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
/// Compress responses with the given encoding, if the client supports it.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
where
Expand Down Expand Up @@ -437,9 +454,7 @@ pub mod query_server {
write!(f, "{:?}", self.0)
}
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl<T: Query> tonic::transport::NamedService for QueryServer<T> {
impl<T: Query> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = "cosmos.auth.v1beta1.Query";
}
}
Expand Down
74 changes: 52 additions & 22 deletions cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ pub struct MsgRevokeResponse {
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Msg defines the authz Msg service.
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
Expand Down Expand Up @@ -114,6 +115,10 @@ pub mod msg_client {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
Expand All @@ -133,19 +138,19 @@ pub mod msg_client {
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with `gzip`.
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses with `gzip`.
/// Enable decompressing responses.
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Grant grants the provided authorization to the grantee on the granter's
Expand Down Expand Up @@ -251,8 +256,8 @@ pub mod msg_server {
#[derive(Debug)]
pub struct MsgServer<T: Msg> {
inner: _Inner<T>,
accept_compression_encodings: (),
send_compression_encodings: (),
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Msg> MsgServer<T> {
Expand All @@ -276,6 +281,18 @@ pub mod msg_server {
{
InterceptedService::new(Self::new(inner), interceptor)
}
/// Enable decompressing requests with the given encoding.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
/// Compress responses with the given encoding, if the client supports it.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
where
Expand Down Expand Up @@ -438,9 +455,7 @@ pub mod msg_server {
write!(f, "{:?}", self.0)
}
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl<T: Msg> tonic::transport::NamedService for MsgServer<T> {
impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
const NAME: &'static str = "cosmos.authz.v1beta1.Msg";
}
}
Expand Down Expand Up @@ -512,6 +527,7 @@ pub struct QueryGranteeGrantsResponse {
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Query defines the gRPC querier service.
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
Expand Down Expand Up @@ -541,6 +557,10 @@ pub mod query_client {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
Expand All @@ -560,19 +580,19 @@ pub mod query_client {
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with `gzip`.
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses with `gzip`.
/// Enable decompressing responses.
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Returns list of `Authorization`, granted to the grantee by the granter.
Expand Down Expand Up @@ -674,8 +694,8 @@ pub mod query_server {
#[derive(Debug)]
pub struct QueryServer<T: Query> {
inner: _Inner<T>,
accept_compression_encodings: (),
send_compression_encodings: (),
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Query> QueryServer<T> {
Expand All @@ -699,6 +719,18 @@ pub mod query_server {
{
InterceptedService::new(Self::new(inner), interceptor)
}
/// Enable decompressing requests with the given encoding.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
/// Compress responses with the given encoding, if the client supports it.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
where
Expand Down Expand Up @@ -869,9 +901,7 @@ pub mod query_server {
write!(f, "{:?}", self.0)
}
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl<T: Query> tonic::transport::NamedService for QueryServer<T> {
impl<T: Query> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = "cosmos.authz.v1beta1.Query";
}
}
Expand Down
Loading

0 comments on commit 8a525e4

Please sign in to comment.