Skip to content

Commit

Permalink
Bump ibc-go to v6.3.1 (#487)
Browse files Browse the repository at this point in the history
This is the newest version I can get it to build with that doesn't
require any changes to `proto-build`.

We should investigate why newer versions no longer build. We probably
need to add a `buf` config similar to what we have for the SDK and
wasmd.
  • Loading branch information
tony-iqlusion authored Aug 14, 2024
1 parent 9cf39bf commit 7f6b8b0
Show file tree
Hide file tree
Showing 15 changed files with 749 additions and 147 deletions.
2 changes: 1 addition & 1 deletion cosmos-sdk-proto/src/prost/ibc-go/IBC_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.0.0
v6.3.1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ pub struct PageRequest {
/// is set.
#[prost(bool, tag = "4")]
pub count_total: bool,
/// reverse is set to true if results are to be returned in the descending order.
///
/// Since: cosmos-sdk 0.43
#[prost(bool, tag = "5")]
pub reverse: bool,
}
impl ::prost::Name for PageRequest {
const NAME: &'static str = "PageRequest";
Expand All @@ -51,7 +56,8 @@ impl ::prost::Name for PageRequest {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PageResponse {
/// next_key is the key to be passed to PageRequest.key to
/// query the next page most efficiently
/// query the next page most efficiently. It will be empty if
/// there are no more results.
#[prost(bytes = "vec", tag = "1")]
pub next_key: ::prost::alloc::vec::Vec<u8>,
/// total is total number of results available if PageRequest.count_total
Expand Down
39 changes: 37 additions & 2 deletions cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ pub struct Plan {
/// reached and the software will exit.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The time after which the upgrade must be performed.
/// Leave set to its zero value to use a pre-defined Height instead.
/// Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
/// has been removed from the SDK.
/// If this field is not empty, an error will be thrown.
#[deprecated]
#[prost(message, optional, tag = "2")]
pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
/// The height at which the upgrade must be performed.
Expand All @@ -24,6 +26,12 @@ pub struct Plan {
/// such as a git commit that validators could automatically upgrade to
#[prost(string, tag = "4")]
pub info: ::prost::alloc::string::String,
/// Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
/// moved to the IBC module in the sub module 02-client.
/// If this field is not empty, an error will be thrown.
#[deprecated]
#[prost(message, optional, tag = "5")]
pub upgraded_client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>,
}
impl ::prost::Name for Plan {
const NAME: &'static str = "Plan";
Expand All @@ -37,6 +45,8 @@ impl ::prost::Name for Plan {
}
/// SoftwareUpgradeProposal is a gov Content type for initiating a software
/// upgrade.
/// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
/// proposals, see MsgSoftwareUpgrade.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SoftwareUpgradeProposal {
Expand All @@ -59,6 +69,8 @@ impl ::prost::Name for SoftwareUpgradeProposal {
}
/// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
/// upgrade.
/// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
/// proposals, see MsgCancelUpgrade.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelSoftwareUpgradeProposal {
Expand All @@ -77,3 +89,26 @@ impl ::prost::Name for CancelSoftwareUpgradeProposal {
"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal".into()
}
}
/// ModuleVersion specifies a module and its consensus version.
///
/// Since: cosmos-sdk 0.43
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModuleVersion {
/// name of the app module
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// consensus version of the app module
#[prost(uint64, tag = "2")]
pub version: u64,
}
impl ::prost::Name for ModuleVersion {
const NAME: &'static str = "ModuleVersion";
const PACKAGE: &'static str = "cosmos.upgrade.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
"cosmos.upgrade.v1beta1.ModuleVersion".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/cosmos.upgrade.v1beta1.ModuleVersion".into()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,219 @@
// This file is @generated by prost-build.
/// MsgRegisterInterchainAccount defines the payload for Msg/MsgRegisterInterchainAccount
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRegisterInterchainAccount {
#[prost(string, tag = "1")]
pub owner: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub connection_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub version: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgRegisterInterchainAccount {
const NAME: &'static str = "MsgRegisterInterchainAccount";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount".into()
}
}
/// MsgRegisterInterchainAccountResponse defines the response for Msg/MsgRegisterInterchainAccountResponse
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRegisterInterchainAccountResponse {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgRegisterInterchainAccountResponse {
const NAME: &'static str = "MsgRegisterInterchainAccountResponse";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse"
.into()
}
}
/// MsgSendTx defines the payload for Msg/SendTx
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSendTx {
#[prost(string, tag = "1")]
pub owner: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub connection_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub packet_data: ::core::option::Option<super::super::v1::InterchainAccountPacketData>,
/// Relative timeout timestamp provided will be added to the current block time during transaction execution.
/// The timeout timestamp must be non-zero.
#[prost(uint64, tag = "4")]
pub relative_timeout: u64,
}
impl ::prost::Name for MsgSendTx {
const NAME: &'static str = "MsgSendTx";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.interchain_accounts.controller.v1.MsgSendTx".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.interchain_accounts.controller.v1.MsgSendTx".into()
}
}
/// MsgSendTxResponse defines the response for MsgSendTx
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgSendTxResponse {
#[prost(uint64, tag = "1")]
pub sequence: u64,
}
impl ::prost::Name for MsgSendTxResponse {
const NAME: &'static str = "MsgSendTxResponse";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse".into()
}
}
/// Generated client implementations.
#[cfg(feature = "grpc")]
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
/// Msg defines the 27-interchain-accounts/controller Msg service.
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
impl MsgClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
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) -> MsgClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
/// 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_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount.
pub async fn register_interchain_account(
&mut self,
request: impl tonic::IntoRequest<super::MsgRegisterInterchainAccount>,
) -> std::result::Result<
tonic::Response<super::MsgRegisterInterchainAccountResponse>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.applications.interchain_accounts.controller.v1.Msg",
"RegisterInterchainAccount",
));
self.inner.unary(req, path, codec).await
}
/// SendTx defines a rpc handler for MsgSendTx.
pub async fn send_tx(
&mut self,
request: impl tonic::IntoRequest<super::MsgSendTx>,
) -> std::result::Result<tonic::Response<super::MsgSendTxResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.applications.interchain_accounts.controller.v1.Msg",
"SendTx",
));
self.inner.unary(req, path, codec).await
}
}
}
/// Params defines the set of on-chain interchain accounts parameters.
/// The following parameters may be used to disable the controller submodule.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand All @@ -18,6 +233,42 @@ impl ::prost::Name for Params {
"/ibc.applications.interchain_accounts.controller.v1.Params".into()
}
}
/// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryInterchainAccountRequest {
#[prost(string, tag = "1")]
pub owner: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub connection_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryInterchainAccountRequest {
const NAME: &'static str = "QueryInterchainAccountRequest";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest".into()
}
}
/// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryInterchainAccountResponse {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryInterchainAccountResponse {
const NAME: &'static str = "QueryInterchainAccountResponse";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse".into()
}
}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -137,6 +388,31 @@ pub mod query_client {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// InterchainAccount returns the interchain account address for a given owner address on a given connection
pub async fn interchain_account(
&mut self,
request: impl tonic::IntoRequest<super::QueryInterchainAccountRequest>,
) -> std::result::Result<
tonic::Response<super::QueryInterchainAccountResponse>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.applications.interchain_accounts.controller.v1.Query",
"InterchainAccount",
));
self.inner.unary(req, path, codec).await
}
/// Params queries all parameters of the ICA controller submodule.
pub async fn params(
&mut self,
Expand Down
Loading

0 comments on commit 7f6b8b0

Please sign in to comment.