Skip to content

Commit

Permalink
Merge branch 'main' into multihop
Browse files Browse the repository at this point in the history
  • Loading branch information
ljoss17 committed Aug 2, 2024
2 parents 95d8d01 + 368dbc9 commit 9adf28c
Show file tree
Hide file tree
Showing 39 changed files with 452 additions and 1,017 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Update `prost` to v0.13 and `tonic` to v0.12 ([#223](https://github.com/cosmos/ibc-proto-rs/pull/223))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Update `tendermint-proto` to v0.38 ([#223](https://github.com/cosmos/ibc-proto-rs/pull/223))
3 changes: 3 additions & 0 deletions .changelog/v0.47.0/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*July 18th, 2024*

This release bumps `tendermint-proto` to v0.38, `prost` to v0.13 and `tonic` to v0.12.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# CHANGELOG

## v0.47.0

*July 18th, 2024*

This release bumps `tendermint-proto` to v0.38, `prost` to v0.13 and `tonic` to v0.12.

### BREAKING CHANGES

- Update `tendermint-proto` to v0.38 ([#223](https://github.com/cosmos/ibc-proto-rs/pull/223))
- Update `prost` to v0.13 and `tonic` to v0.12 ([#223](https://github.com/cosmos/ibc-proto-rs/pull/223))

## v0.46.0

*June 3rd, 2024*
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-proto"
version = "0.46.0"
version = "0.47.0"
authors = ["Informal Systems <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down Expand Up @@ -28,15 +28,15 @@ doctest = false
all-features = true

[dependencies]
prost = { version = "0.12.3", default-features = false, features = ["prost-derive"] }
prost = { version = "0.13", default-features = false, features = ["prost-derive"] }
bytes = { version = "1.2", default-features = false }
tonic = { version = "0.11", default-features = false, optional = true }
tonic = { version = "0.12", default-features = false, optional = true }
serde = { version = "1.0", default-features = false, optional = true }
schemars = { version = "0.8", optional = true }
subtle-encoding = { version = "0.5", default-features = false }
base64 = { version = "0.22", default-features = false, features = ["alloc"] }
flex-error = { version = "0.4", default-features = false }
ics23 = { version = "0.11.0", default-features = false }
ics23 = { version = "0.12.0", default-features = false }
informalsystems-pbjson = { version = "0.7.0", optional = true, default-features = false }

## Optional: enabled by the `parity-scale-codec` feature
Expand All @@ -48,7 +48,7 @@ scale-info = { version = "2.1.2", default-features = false, features = [
borsh = { version = "1", default-features = false, features = ["derive"], optional = true }

[dependencies.tendermint-proto]
version = "0.37"
version = "0.38"
default-features = false

[dev-dependencies]
Expand Down
7 changes: 4 additions & 3 deletions src/google.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pub mod protobuf {
use crate::include_proto;

include_proto!("google.protobuf.rs");

#[cfg(feature = "serde")]
include_proto!("google.protobuf.serde.rs");

// source: https://github.com/tokio-rs/prost/blob/master/prost-types/src/lib.rs
use core::convert::TryFrom;
use core::i32;
use core::i64;
use core::time;

// The Protobuf `Duration` and `Timestamp` types can't delegate to the standard library equivalents
Expand Down Expand Up @@ -210,7 +210,8 @@ pub mod protobuf {
type Error = TimestampOutOfSystemRangeError;

fn try_from(mut timestamp: Timestamp) -> Result<std::time::SystemTime, Self::Error> {
let orig_timestamp = timestamp.clone();
let orig_timestamp = timestamp;

timestamp.normalize();

let system_time = if timestamp.seconds >= 0 {
Expand Down
69 changes: 19 additions & 50 deletions src/prost/cosmos.auth.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl ::prost::Name for ModuleCredential {
}
/// Params defines the parameters for the auth module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(uint64, tag = "1")]
pub max_memo_characters: u64,
Expand Down Expand Up @@ -108,7 +108,7 @@ impl ::prost::Name for MsgUpdateParams {
///
/// Since: cosmos-sdk 0.47
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgUpdateParamsResponse {}
impl ::prost::Name for MsgUpdateParamsResponse {
const NAME: &'static str = "MsgUpdateParamsResponse";
Expand Down Expand Up @@ -258,19 +258,17 @@ pub mod msg_server {
/// Msg defines the x/auth Msg service.
#[derive(Debug)]
pub struct MsgServer<T: Msg> {
inner: _Inner<T>,
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Msg> MsgServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
Expand Down Expand Up @@ -333,7 +331,6 @@ pub mod msg_server {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/cosmos.auth.v1beta1.Msg/UpdateParams" => {
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -362,7 +359,6 @@ pub mod msg_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 = UpdateParamsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand All @@ -384,8 +380,11 @@ pub mod msg_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(),
)
Expand All @@ -406,16 +405,6 @@ pub mod msg_server {
}
}
}
impl<T: Msg> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
const NAME: &'static str = "cosmos.auth.v1beta1.Msg";
}
Expand Down Expand Up @@ -493,7 +482,7 @@ impl ::prost::Name for QueryAccountResponse {
}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
impl ::prost::Name for QueryParamsRequest {
const NAME: &'static str = "QueryParamsRequest";
Expand All @@ -504,7 +493,7 @@ impl ::prost::Name for QueryParamsRequest {
}
/// QueryParamsResponse is the response type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
/// params defines the parameters of the module.
#[prost(message, optional, tag = "1")]
Expand All @@ -521,7 +510,7 @@ impl ::prost::Name for QueryParamsResponse {
///
/// Since: cosmos-sdk 0.46
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryModuleAccountsRequest {}
impl ::prost::Name for QueryModuleAccountsRequest {
const NAME: &'static str = "QueryModuleAccountsRequest";
Expand Down Expand Up @@ -578,7 +567,7 @@ impl ::prost::Name for QueryModuleAccountByNameResponse {
///
/// Since: cosmos-sdk 0.46
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Bech32PrefixRequest {}
impl ::prost::Name for Bech32PrefixRequest {
const NAME: &'static str = "Bech32PrefixRequest";
Expand Down Expand Up @@ -671,7 +660,7 @@ impl ::prost::Name for AddressStringToBytesResponse {
///
/// Since: cosmos-sdk 0.46.2
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryAccountAddressByIdRequest {
/// Deprecated, use account_id instead
///
Expand Down Expand Up @@ -1227,19 +1216,17 @@ pub mod query_server {
/// Query defines the gRPC querier service.
#[derive(Debug)]
pub struct QueryServer<T: Query> {
inner: _Inner<T>,
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Query> QueryServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
Expand Down Expand Up @@ -1302,7 +1289,6 @@ pub mod query_server {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/cosmos.auth.v1beta1.Query/Accounts" => {
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -1333,7 +1319,6 @@ pub mod query_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 = AccountsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1379,7 +1364,6 @@ pub mod query_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 = AccountSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1427,7 +1411,6 @@ pub mod query_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 = AccountAddressByIDSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1471,7 +1454,6 @@ pub mod query_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 = ParamsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1517,7 +1499,6 @@ pub mod query_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 = ModuleAccountsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1565,7 +1546,6 @@ pub mod query_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 = ModuleAccountByNameSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1611,7 +1591,6 @@ pub mod query_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 = Bech32PrefixSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1657,7 +1636,6 @@ pub mod query_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 = AddressBytesToStringSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1703,7 +1681,6 @@ pub mod query_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 = AddressStringToBytesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand Down Expand Up @@ -1749,7 +1726,6 @@ pub mod query_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 = AccountInfoSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand All @@ -1771,8 +1747,11 @@ pub mod query_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(),
)
Expand All @@ -1793,16 +1772,6 @@ pub mod query_server {
}
}
}
impl<T: Query> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Query> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = "cosmos.auth.v1beta1.Query";
}
Expand Down
Loading

0 comments on commit 9adf28c

Please sign in to comment.