diff --git a/.changelog/unreleased/breaking-changes/147-fix-script-and-protos.md b/.changelog/unreleased/breaking-changes/147-fix-script-and-protos.md new file mode 100644 index 00000000..c466f6aa --- /dev/null +++ b/.changelog/unreleased/breaking-changes/147-fix-script-and-protos.md @@ -0,0 +1,8 @@ +- Since ibc-proto v0.34.0, the script in charge of generating the Rust proto definitions + has been mistakenly checking out their latest version instead of the one + specified in the corresponding `src/*_COMMIT` file. This has now been fixed + and the protos have therefore been downgraded to their proper versions: + * IBC-Go: v7.3.0, + * Cosmos SDK: v0.47.5 + * Interchain Security: v3.1.0 + ([\#147](https://github.com/cosmos/ibc-proto-rs/pull/147)) diff --git a/scripts/sync-protobuf.sh b/scripts/sync-protobuf.sh index db36619c..49485cce 100755 --- a/scripts/sync-protobuf.sh +++ b/scripts/sync-protobuf.sh @@ -111,11 +111,7 @@ COSMOS_ICS_DIR=$(mktemp -d /tmp/interchain-security-XXXXXXXX) pushd "$COSMOS_ICS_DIR" git clone "$COSMOS_ICS_GIT" . - -# We have to name the commit as a branch because -# proto-compiler uses the branch name as the commit -# output. Otherwise it will just output HEAD -git switch -c "$COSMOS_ICS_COMMIT" +git checkout -b "$COSMOS_ICS_COMMIT" "$COSMOS_ICS_COMMIT" cd proto buf mod update @@ -126,11 +122,7 @@ COSMOS_SDK_DIR=$(mktemp -d /tmp/cosmos-sdk-XXXXXXXX) pushd "$COSMOS_SDK_DIR" git clone "$COSMOS_SDK_GIT" . - -# We have to name the commit as a branch because -# proto-compiler uses the branch name as the commit -# output. Otherwise it will just output HEAD -git switch -c "$COSMOS_SDK_COMMIT" +git checkout -b "$COSMOS_SDK_COMMIT" "$COSMOS_SDK_COMMIT" cd proto buf mod update @@ -156,7 +148,7 @@ IBC_GO_DIR=$(mktemp -d /tmp/ibc-go-XXXXXXXX) pushd "$IBC_GO_DIR" git clone "$IBC_GO_GIT" . -git switch -c "$IBC_GO_COMMIT" +git checkout -b "$IBC_GO_COMMIT" "$IBC_GO_COMMIT" cd proto buf export -v -o ../proto-include diff --git a/src/lib.rs b/src/lib.rs index 7006347d..08d41655 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -117,6 +117,16 @@ pub mod cosmos { include_proto!("cosmos.base.tendermint.v1beta1.rs"); } } + pub mod kv { + pub mod v1beta1 { + include_proto!("cosmos.base.kv.v1beta1.rs"); + } + } + pub mod snapshots { + pub mod v1beta1 { + include_proto!("cosmos.base.snapshots.v1beta1.rs"); + } + } } pub mod crypto { pub mod multisig { diff --git a/src/prost/cosmos.app.v1alpha1.rs b/src/prost/cosmos.app.v1alpha1.rs index 6cbd715c..5460a59e 100644 --- a/src/prost/cosmos.app.v1alpha1.rs +++ b/src/prost/cosmos.app.v1alpha1.rs @@ -46,7 +46,7 @@ pub struct PackageReference { /// /// When a new version of a module is released and items are added to existing /// .proto files, these definitions should contain comments of the form - /// "Since: Revision N" where N is an integer revision. + /// "Since Revision N" where N is an integer revision. /// /// When the module runtime starts up, it will check the pinned proto /// image and panic if there are runtime protobuf definitions that are not diff --git a/src/prost/cosmos.bank.module.v1.rs b/src/prost/cosmos.bank.module.v1.rs index 4a9d5e3b..09361cdb 100644 --- a/src/prost/cosmos.bank.module.v1.rs +++ b/src/prost/cosmos.bank.module.v1.rs @@ -2,8 +2,8 @@ #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module { - /// blocked_module_accounts_override configures exceptional module accounts which should be blocked from receiving - /// funds. If left empty it defaults to the list of account names supplied in the auth module configuration as + /// blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds. + /// If left empty it defaults to the list of account names supplied in the auth module configuration as /// module_account_permissions #[prost(string, repeated, tag = "1")] pub blocked_module_accounts_override: ::prost::alloc::vec::Vec< diff --git a/src/prost/cosmos.bank.v1beta1.rs b/src/prost/cosmos.bank.v1beta1.rs index faa70105..53aac5a5 100644 --- a/src/prost/cosmos.bank.v1beta1.rs +++ b/src/prost/cosmos.bank.v1beta1.rs @@ -185,7 +185,6 @@ pub struct MsgUpdateParamsResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSetSendEnabled { - /// authority is the address that controls the module. #[prost(string, tag = "1")] pub authority: ::prost::alloc::string::String, /// send_enabled is the list of entries to add or update. @@ -205,25 +204,6 @@ pub struct MsgSetSendEnabled { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSetSendEnabledResponse {} -/// MsgBurn defines a message for burning coins. -/// -/// Since: cosmos-sdk 0.51 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBurn { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgBurnResponse defines the Msg/Burn response type. -/// -/// Since: cosmos-sdk 0.51 -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBurnResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -363,34 +343,6 @@ pub mod msg_client { .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "MultiSend")); self.inner.unary(req, path, codec).await } - /// Burn defines a method for burning coins by an account. - /// - /// Since: cosmos-sdk 0.51 - pub async fn burn( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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( - "/cosmos.bank.v1beta1.Msg/Burn", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "Burn")); - self.inner.unary(req, path, codec).await - } /// UpdateParams defines a governance operation for updating the x/bank module parameters. /// The authority is defined in the keeper. /// @@ -474,13 +426,6 @@ pub mod msg_server { tonic::Response, tonic::Status, >; - /// Burn defines a method for burning coins by an account. - /// - /// Since: cosmos-sdk 0.51 - async fn burn( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; /// UpdateParams defines a governance operation for updating the x/bank module parameters. /// The authority is defined in the keeper. /// @@ -670,48 +615,6 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.bank.v1beta1.Msg/Burn" => { - #[allow(non_camel_case_types)] - struct BurnSvc(pub Arc); - impl tonic::server::UnaryService - for BurnSvc { - type Response = super::MsgBurnResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { (*inner).burn(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = BurnSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } "/cosmos.bank.v1beta1.Msg/UpdateParams" => { #[allow(non_camel_case_types)] struct UpdateParamsSvc(pub Arc); @@ -875,11 +778,6 @@ pub struct QueryAllBalancesRequest { pub pagination: ::core::option::Option< super::super::base::query::v1beta1::PageRequest, >, - /// resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. - /// - /// Since: cosmos-sdk 0.50 - #[prost(bool, tag = "3")] - pub resolve_denom: bool, } /// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC /// method. @@ -1016,7 +914,6 @@ pub struct QueryParamsRequest {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { - /// params provides the parameters of the bank module. #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } @@ -1065,26 +962,6 @@ pub struct QueryDenomMetadataResponse { #[prost(message, optional, tag = "1")] pub metadata: ::core::option::Option, } -/// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method. -/// Identical with QueryDenomMetadataRequest but receives denom as query string. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomMetadataByQueryStringRequest { - /// denom is the coin denom to query the metadata for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -/// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC -/// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomMetadataByQueryStringResponse { - /// metadata describes and provides all the client information for the requested token. - #[prost(message, optional, tag = "1")] - pub metadata: ::core::option::Option, -} /// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, /// which queries for a paginated set of all account holders of a particular /// denomination. @@ -1488,39 +1365,6 @@ pub mod query_client { .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomMetadata")); self.inner.unary(req, path, codec).await } - /// DenomsMetadata queries the client metadata of a given coin denomination. - pub async fn denom_metadata_by_query_string( - &mut self, - request: impl tonic::IntoRequest< - super::QueryDenomMetadataByQueryStringRequest, - >, - ) -> std::result::Result< - tonic::Response, - 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( - "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.bank.v1beta1.Query", - "DenomMetadataByQueryString", - ), - ); - self.inner.unary(req, path, codec).await - } /// DenomsMetadata queries the client metadata for all registered coin /// denominations. pub async fn denoms_metadata( @@ -1707,14 +1551,6 @@ pub mod query_server { tonic::Response, tonic::Status, >; - /// DenomsMetadata queries the client metadata of a given coin denomination. - async fn denom_metadata_by_query_string( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; /// DenomsMetadata queries the client metadata for all registered coin /// denominations. async fn denoms_metadata( @@ -2196,55 +2032,6 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString" => { - #[allow(non_camel_case_types)] - struct DenomMetadataByQueryStringSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryDenomMetadataByQueryStringRequest, - > for DenomMetadataByQueryStringSvc { - type Response = super::QueryDenomMetadataByQueryStringResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryDenomMetadataByQueryStringRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).denom_metadata_by_query_string(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = DenomMetadataByQueryStringSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } "/cosmos.bank.v1beta1.Query/DenomsMetadata" => { #[allow(non_camel_case_types)] struct DenomsMetadataSvc(pub Arc); diff --git a/src/prost/cosmos.base.abci.v1beta1.rs b/src/prost/cosmos.base.abci.v1beta1.rs index 0dced31e..b76eab19 100644 --- a/src/prost/cosmos.base.abci.v1beta1.rs +++ b/src/prost/cosmos.base.abci.v1beta1.rs @@ -181,26 +181,3 @@ pub struct SearchTxsResult { #[prost(message, repeated, tag = "6")] pub txs: ::prost::alloc::vec::Vec, } -/// SearchBlocksResult defines a structure for querying blocks pageable -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SearchBlocksResult { - /// Count of all blocks - #[prost(int64, tag = "1")] - pub total_count: i64, - /// Count of blocks in current page - #[prost(int64, tag = "2")] - pub count: i64, - /// Index of current page, start from 1 - #[prost(int64, tag = "3")] - pub page_number: i64, - /// Count of total pages - #[prost(int64, tag = "4")] - pub page_total: i64, - /// Max count blocks per page - #[prost(int64, tag = "5")] - pub limit: i64, - /// List of blocks in current page - #[prost(message, repeated, tag = "6")] - pub blocks: ::prost::alloc::vec::Vec<::tendermint_proto::types::Block>, -} diff --git a/src/prost/cosmos.base.kv.v1beta1.rs b/src/prost/cosmos.base.kv.v1beta1.rs new file mode 100644 index 00000000..60bda62f --- /dev/null +++ b/src/prost/cosmos.base.kv.v1beta1.rs @@ -0,0 +1,16 @@ +/// Pairs defines a repeated slice of Pair objects. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Pairs { + #[prost(message, repeated, tag = "1")] + pub pairs: ::prost::alloc::vec::Vec, +} +/// Pair defines a key/value bytes tuple. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Pair { + #[prost(bytes = "vec", tag = "1")] + pub key: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub value: ::prost::alloc::vec::Vec, +} diff --git a/src/prost/cosmos.base.node.v1beta1.rs b/src/prost/cosmos.base.node.v1beta1.rs index d839b4ba..bb478e7e 100644 --- a/src/prost/cosmos.base.node.v1beta1.rs +++ b/src/prost/cosmos.base.node.v1beta1.rs @@ -8,37 +8,6 @@ pub struct ConfigRequest {} pub struct ConfigResponse { #[prost(string, tag = "1")] pub minimum_gas_price: ::prost::alloc::string::String, - /// pruning settings - #[prost(string, tag = "2")] - pub pruning_keep_recent: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub pruning_interval: ::prost::alloc::string::String, -} -/// StateRequest defines the request structure for the status of a node. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StatusRequest {} -/// StateResponse defines the response structure for the status of a node. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StatusResponse { - /// earliest block height available in the store - #[prost(uint64, tag = "1")] - pub earliest_store_height: u64, - /// current block height - #[prost(uint64, tag = "2")] - pub height: u64, - /// block height timestamp - #[prost(message, optional, tag = "3")] - pub timestamp: ::core::option::Option< - super::super::super::super::google::protobuf::Timestamp, - >, - /// app hash of the current block - #[prost(bytes = "vec", tag = "4")] - pub app_hash: ::prost::alloc::vec::Vec, - /// validator hash provided by the consensus header - #[prost(bytes = "vec", tag = "5")] - pub validator_hash: ::prost::alloc::vec::Vec, } /// Generated client implementations. #[cfg(feature = "client")] @@ -150,29 +119,6 @@ pub mod service_client { .insert(GrpcMethod::new("cosmos.base.node.v1beta1.Service", "Config")); self.inner.unary(req, path, codec).await } - /// Status queries for the node status. - pub async fn status( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, 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( - "/cosmos.base.node.v1beta1.Service/Status", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.base.node.v1beta1.Service", "Status")); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -188,11 +134,6 @@ pub mod service_server { &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; - /// Status queries for the node status. - async fn status( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; } /// Service defines the gRPC querier service for node related queries. #[derive(Debug)] @@ -316,48 +257,6 @@ pub mod service_server { }; Box::pin(fut) } - "/cosmos.base.node.v1beta1.Service/Status" => { - #[allow(non_camel_case_types)] - struct StatusSvc(pub Arc); - impl tonic::server::UnaryService - for StatusSvc { - type Response = super::StatusResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { (*inner).status(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = StatusSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( diff --git a/src/prost/cosmos.base.snapshots.v1beta1.rs b/src/prost/cosmos.base.snapshots.v1beta1.rs new file mode 100644 index 00000000..546f9d4f --- /dev/null +++ b/src/prost/cosmos.base.snapshots.v1beta1.rs @@ -0,0 +1,121 @@ +/// Snapshot contains Tendermint state sync snapshot info. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Snapshot { + #[prost(uint64, tag = "1")] + pub height: u64, + #[prost(uint32, tag = "2")] + pub format: u32, + #[prost(uint32, tag = "3")] + pub chunks: u32, + #[prost(bytes = "vec", tag = "4")] + pub hash: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "5")] + pub metadata: ::core::option::Option, +} +/// Metadata contains SDK-specific snapshot metadata. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Metadata { + /// SHA-256 chunk hashes + #[prost(bytes = "vec", repeated, tag = "1")] + pub chunk_hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +/// SnapshotItem is an item contained in a rootmulti.Store snapshot. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SnapshotItem { + /// item is the specific type of snapshot item. + #[prost(oneof = "snapshot_item::Item", tags = "1, 2, 3, 4, 5, 6")] + pub item: ::core::option::Option, +} +/// Nested message and enum types in `SnapshotItem`. +pub mod snapshot_item { + /// item is the specific type of snapshot item. + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Item { + #[prost(message, tag = "1")] + Store(super::SnapshotStoreItem), + #[prost(message, tag = "2")] + Iavl(super::SnapshotIavlItem), + #[prost(message, tag = "3")] + Extension(super::SnapshotExtensionMeta), + #[prost(message, tag = "4")] + ExtensionPayload(super::SnapshotExtensionPayload), + #[prost(message, tag = "5")] + Kv(super::SnapshotKvItem), + #[prost(message, tag = "6")] + Schema(super::SnapshotSchema), + } +} +/// SnapshotStoreItem contains metadata about a snapshotted store. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SnapshotStoreItem { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, +} +/// SnapshotIAVLItem is an exported IAVL node. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SnapshotIavlItem { + #[prost(bytes = "vec", tag = "1")] + pub key: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub value: ::prost::alloc::vec::Vec, + /// version is block height + #[prost(int64, tag = "3")] + pub version: i64, + /// height is depth of the tree. + #[prost(int32, tag = "4")] + pub height: i32, +} +/// SnapshotExtensionMeta contains metadata about an external snapshotter. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SnapshotExtensionMeta { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub format: u32, +} +/// SnapshotExtensionPayload contains payloads of an external snapshotter. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SnapshotExtensionPayload { + #[prost(bytes = "vec", tag = "1")] + pub payload: ::prost::alloc::vec::Vec, +} +/// SnapshotKVItem is an exported Key/Value Pair +/// +/// Since: cosmos-sdk 0.46 +/// Deprecated: This message was part of store/v2alpha1 which has been deleted from v0.47. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SnapshotKvItem { + #[prost(bytes = "vec", tag = "1")] + pub key: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub value: ::prost::alloc::vec::Vec, +} +/// SnapshotSchema is an exported schema of smt store +/// +/// Since: cosmos-sdk 0.46 +/// Deprecated: This message was part of store/v2alpha1 which has been deleted from v0.47. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SnapshotSchema { + #[prost(bytes = "vec", repeated, tag = "1")] + pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} diff --git a/src/prost/cosmos.base.v1beta1.rs b/src/prost/cosmos.base.v1beta1.rs index a05807e5..6cedf8eb 100644 --- a/src/prost/cosmos.base.v1beta1.rs +++ b/src/prost/cosmos.base.v1beta1.rs @@ -24,3 +24,19 @@ pub struct DecCoin { #[prost(string, tag = "2")] pub amount: ::prost::alloc::string::String, } +/// IntProto defines a Protobuf wrapper around an Int object. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IntProto { + #[prost(string, tag = "1")] + pub int: ::prost::alloc::string::String, +} +/// DecProto defines a Protobuf wrapper around a Dec object. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecProto { + #[prost(string, tag = "1")] + pub dec: ::prost::alloc::string::String, +} diff --git a/src/prost/cosmos.gov.v1.rs b/src/prost/cosmos.gov.v1.rs index 87265ce4..84f215b5 100644 --- a/src/prost/cosmos.gov.v1.rs +++ b/src/prost/cosmos.gov.v1.rs @@ -66,8 +66,6 @@ pub struct Proposal { super::super::super::google::protobuf::Timestamp, >, /// metadata is any arbitrary metadata attached to the proposal. - /// the recommended format of the metadata is to be found here: - /// #[prost(string, tag = "10")] pub metadata: ::prost::alloc::string::String, /// title is the title of the proposal @@ -80,21 +78,11 @@ pub struct Proposal { /// Since: cosmos-sdk 0.47 #[prost(string, tag = "12")] pub summary: ::prost::alloc::string::String, - /// proposer is the address of the proposal sumbitter + /// Proposer is the address of the proposal sumbitter /// /// Since: cosmos-sdk 0.47 #[prost(string, tag = "13")] pub proposer: ::prost::alloc::string::String, - /// expedited defines if the proposal is expedited - /// - /// Since: cosmos-sdk 0.50 - #[prost(bool, tag = "14")] - pub expedited: bool, - /// failed_reason defines the reason why the proposal failed - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "15")] - pub failed_reason: ::prost::alloc::string::String, } /// TallyResult defines a standard tally for a governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] @@ -127,8 +115,7 @@ pub struct Vote { /// options is the weighted vote options. #[prost(message, repeated, tag = "4")] pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata attached to the vote. - /// the recommended format of the metadata is to be found here: + /// metadata is any arbitrary metadata to attached to the vote. #[prost(string, tag = "5")] pub metadata: ::prost::alloc::string::String, } @@ -206,34 +193,6 @@ pub struct Params { /// The ratio representing the proportion of the deposit value that must be paid at proposal submission. #[prost(string, tag = "7")] pub min_initial_deposit_ratio: ::prost::alloc::string::String, - /// The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "8")] - pub proposal_cancel_ratio: ::prost::alloc::string::String, - /// The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. - /// If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "9")] - pub proposal_cancel_dest: ::prost::alloc::string::String, - /// Duration of the voting period of an expedited proposal. - /// - /// Since: cosmos-sdk 0.50 - #[prost(message, optional, tag = "10")] - pub expedited_voting_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "11")] - pub expedited_threshold: ::prost::alloc::string::String, - /// Minimum expedited deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "12")] - pub expedited_min_deposit: ::prost::alloc::vec::Vec< - super::super::base::v1beta1::Coin, - >, /// burn deposits if a proposal does not meet quorum #[prost(bool, tag = "13")] pub burn_vote_quorum: bool, @@ -362,11 +321,6 @@ pub struct MsgSubmitProposal { /// Since: cosmos-sdk 0.47 #[prost(string, tag = "6")] pub summary: ::prost::alloc::string::String, - /// expedited defines if the proposal is expedited or not - /// - /// Since: cosmos-sdk 0.50 - #[prost(bool, tag = "7")] - pub expedited: bool, } /// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -474,38 +428,6 @@ pub struct MsgUpdateParams { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateParamsResponse {} -/// MsgCancelProposal is the Msg/CancelProposal request type. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelProposal { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// proposer is the account address of the proposer. - #[prost(string, tag = "2")] - pub proposer: ::prost::alloc::string::String, -} -/// MsgCancelProposalResponse defines the response structure for executing a -/// MsgCancelProposal message. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// canceled_time is the time when proposal is canceled. - #[prost(message, optional, tag = "2")] - pub canceled_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// canceled_height defines the block height at which the proposal is canceled. - #[prost(uint64, tag = "3")] - pub canceled_height: u64, -} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -749,34 +671,6 @@ pub mod msg_client { .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "UpdateParams")); self.inner.unary(req, path, codec).await } - /// CancelProposal defines a method to cancel governance proposal - /// - /// Since: cosmos-sdk 0.50 - pub async fn cancel_proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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( - "/cosmos.gov.v1.Msg/CancelProposal", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "CancelProposal")); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -836,16 +730,6 @@ pub mod msg_server { tonic::Response, tonic::Status, >; - /// CancelProposal defines a method to cancel governance proposal - /// - /// Since: cosmos-sdk 0.50 - async fn cancel_proposal( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Msg defines the gov Msg service. #[derive(Debug)] @@ -1187,50 +1071,6 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Msg/CancelProposal" => { - #[allow(non_camel_case_types)] - struct CancelProposalSvc(pub Arc); - impl tonic::server::UnaryService - for CancelProposalSvc { - type Response = super::MsgCancelProposalResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).cancel_proposal(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = CancelProposalSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( @@ -1272,17 +1112,6 @@ pub mod msg_server { const NAME: &'static str = "cosmos.gov.v1.Msg"; } } -/// QueryConstitutionRequest is the request type for the Query/Constitution RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConstitutionRequest {} -/// QueryConstitutionResponse is the response type for the Query/Constitution RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConstitutionResponse { - #[prost(string, tag = "1")] - pub constitution: ::prost::alloc::string::String, -} /// QueryProposalRequest is the request type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1559,32 +1388,6 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Constitution queries the chain's constitution. - pub async fn constitution( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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( - "/cosmos.gov.v1.Query/Constitution", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Constitution")); - self.inner.unary(req, path, codec).await - } /// Proposal queries proposal details based on ProposalID. pub async fn proposal( &mut self, @@ -1711,7 +1514,7 @@ pub mod query_client { .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Params")); self.inner.unary(req, path, codec).await } - /// Deposit queries single deposit information based on proposalID, depositAddr. + /// Deposit queries single deposit information based proposalID, depositAddr. pub async fn deposit( &mut self, request: impl tonic::IntoRequest, @@ -1799,14 +1602,6 @@ pub mod query_server { /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] pub trait Query: Send + Sync + 'static { - /// Constitution queries the chain's constitution. - async fn constitution( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; /// Proposal queries proposal details based on ProposalID. async fn proposal( &self, @@ -1847,7 +1642,7 @@ pub mod query_server { tonic::Response, tonic::Status, >; - /// Deposit queries single deposit information based on proposalID, depositAddr. + /// Deposit queries single deposit information based proposalID, depositAddr. async fn deposit( &self, request: tonic::Request, @@ -1952,52 +1747,6 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/cosmos.gov.v1.Query/Constitution" => { - #[allow(non_camel_case_types)] - struct ConstitutionSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ConstitutionSvc { - type Response = super::QueryConstitutionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).constitution(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = ConstitutionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } "/cosmos.gov.v1.Query/Proposal" => { #[allow(non_camel_case_types)] struct ProposalSvc(pub Arc); @@ -2423,12 +2172,4 @@ pub struct GenesisState { /// Since: cosmos-sdk 0.47 #[prost(message, optional, tag = "8")] pub params: ::core::option::Option, - /// The constitution allows builders to lay a foundation and define purpose. - /// This is an immutable string set in genesis. - /// There are no amendments, to go outside of scope, just fork. - /// constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals. - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "9")] - pub constitution: ::prost::alloc::string::String, } diff --git a/src/prost/cosmos.gov.v1beta1.rs b/src/prost/cosmos.gov.v1beta1.rs index 83d4942a..970c7ea3 100644 --- a/src/prost/cosmos.gov.v1beta1.rs +++ b/src/prost/cosmos.gov.v1beta1.rs @@ -338,7 +338,7 @@ 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 gov Msg service. + /// Msg defines the bank Msg service. #[derive(Debug, Clone)] pub struct MsgClient { inner: tonic::client::Grpc, @@ -567,7 +567,7 @@ pub mod msg_server { tonic::Status, >; } - /// Msg defines the gov Msg service. + /// Msg defines the bank Msg service. #[derive(Debug)] pub struct MsgServer { inner: _Inner, @@ -1177,7 +1177,6 @@ pub mod query_client { self.inner.unary(req, path, codec).await } /// Vote queries voted information based on proposalID, voterAddr. - /// Due to how we handle state, this query would error for proposals that has already been finished. pub async fn vote( &mut self, request: impl tonic::IntoRequest, @@ -1255,7 +1254,7 @@ pub mod query_client { .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Params")); self.inner.unary(req, path, codec).await } - /// Deposit queries single deposit information based on proposalID, depositor address. + /// Deposit queries single deposit information based proposalID, depositAddr. pub async fn deposit( &mut self, request: impl tonic::IntoRequest, @@ -1360,7 +1359,6 @@ pub mod query_server { tonic::Status, >; /// Vote queries voted information based on proposalID, voterAddr. - /// Due to how we handle state, this query would error for proposals that has already been finished. async fn vote( &self, request: tonic::Request, @@ -1384,7 +1382,7 @@ pub mod query_server { tonic::Response, tonic::Status, >; - /// Deposit queries single deposit information based on proposalID, depositor address. + /// Deposit queries single deposit information based proposalID, depositAddr. async fn deposit( &self, request: tonic::Request, @@ -1894,13 +1892,13 @@ pub struct GenesisState { /// proposals defines all the proposals present at genesis. #[prost(message, repeated, tag = "4")] pub proposals: ::prost::alloc::vec::Vec, - /// deposit_params defines all the parameters related to deposit. + /// params defines all the parameters of related to deposit. #[prost(message, optional, tag = "5")] pub deposit_params: ::core::option::Option, - /// voting_params defines all the parameters related to voting. + /// params defines all the parameters of related to voting. #[prost(message, optional, tag = "6")] pub voting_params: ::core::option::Option, - /// tally_params defines all the parameters related to tally. + /// params defines all the parameters of related to tally. #[prost(message, optional, tag = "7")] pub tally_params: ::core::option::Option, } diff --git a/src/prost/cosmos.staking.module.v1.rs b/src/prost/cosmos.staking.module.v1.rs index d018cfe1..a03ed2a9 100644 --- a/src/prost/cosmos.staking.module.v1.rs +++ b/src/prost/cosmos.staking.module.v1.rs @@ -10,10 +10,4 @@ pub struct Module { /// authority defines the custom module authority. If not set, defaults to the governance module. #[prost(string, tag = "2")] pub authority: ::prost::alloc::string::String, - /// bech32_prefix_validator is the bech32 validator prefix for the app. - #[prost(string, tag = "3")] - pub bech32_prefix_validator: ::prost::alloc::string::String, - /// bech32_prefix_consensus is the bech32 consensus node prefix for the app. - #[prost(string, tag = "4")] - pub bech32_prefix_consensus: ::prost::alloc::string::String, } diff --git a/src/prost/cosmos.staking.v1beta1.rs b/src/prost/cosmos.staking.v1beta1.rs index 6e350541..42486e13 100644 --- a/src/prost/cosmos.staking.v1beta1.rs +++ b/src/prost/cosmos.staking.v1beta1.rs @@ -167,10 +167,10 @@ pub struct DvvTriplets { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Delegation { - /// delegator_address is the encoded address of the delegator. + /// delegator_address is the bech32-encoded address of the delegator. #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the encoded address of the validator. + /// validator_address is the bech32-encoded address of the validator. #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, /// shares define the delegation shares received. @@ -182,10 +182,10 @@ pub struct Delegation { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnbondingDelegation { - /// delegator_address is the encoded address of the delegator. + /// delegator_address is the bech32-encoded address of the delegator. #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the encoded address of the validator. + /// validator_address is the bech32-encoded address of the validator. #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, /// entries are the unbonding delegation entries. @@ -452,10 +452,6 @@ pub struct MsgCreateValidator { pub commission: ::core::option::Option, #[prost(string, tag = "3")] pub min_self_delegation: ::prost::alloc::string::String, - /// Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. - /// The validator address bytes and delegator address bytes refer to the same account while creating validator (defer - /// only in bech32 notation). - #[deprecated] #[prost(string, tag = "4")] pub delegator_address: ::prost::alloc::string::String, #[prost(string, tag = "5")] @@ -549,11 +545,6 @@ pub struct MsgUndelegateResponse { pub completion_time: ::core::option::Option< super::super::super::google::protobuf::Timestamp, >, - /// amount returns the amount of undelegated coins - /// - /// Since: cosmos-sdk 0.50 - #[prost(message, optional, tag = "2")] - pub amount: ::core::option::Option, } /// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator /// @@ -3189,8 +3180,6 @@ pub enum AuthorizationType { Undelegate = 2, /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate Redelegate = 3, - /// AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation - CancelUnbondingDelegation = 4, } impl AuthorizationType { /// String value of the enum field names used in the ProtoBuf definition. @@ -3203,9 +3192,6 @@ impl AuthorizationType { AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE", AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", - AuthorizationType::CancelUnbondingDelegation => { - "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" - } } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3215,9 +3201,6 @@ impl AuthorizationType { "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), - "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => { - Some(Self::CancelUnbondingDelegation) - } _ => None, } } @@ -3237,7 +3220,7 @@ pub struct GenesisState { /// of the last-block's bonded validators. #[prost(message, repeated, tag = "3")] pub last_validator_powers: ::prost::alloc::vec::Vec, - /// validators defines the validator set at genesis. + /// delegations defines the validator set at genesis. #[prost(message, repeated, tag = "4")] pub validators: ::prost::alloc::vec::Vec, /// delegations defines the delegations active at genesis. @@ -3249,7 +3232,6 @@ pub struct GenesisState { /// redelegations defines the redelegations active at genesis. #[prost(message, repeated, tag = "7")] pub redelegations: ::prost::alloc::vec::Vec, - /// exported defines a bool to identify whether the chain dealing with exported or initialized genesis. #[prost(bool, tag = "8")] pub exported: bool, } diff --git a/src/prost/cosmos.tx.signing.v1beta1.rs b/src/prost/cosmos.tx.signing.v1beta1.rs index efa1b143..bfed1a37 100644 --- a/src/prost/cosmos.tx.signing.v1beta1.rs +++ b/src/prost/cosmos.tx.signing.v1beta1.rs @@ -94,9 +94,7 @@ pub enum SignMode { Direct = 1, /// SIGN_MODE_TEXTUAL is a future signing mode that will verify some /// human-readable textual representation on top of the binary representation - /// from SIGN_MODE_DIRECT. It is currently experimental, and should be used - /// for testing purposes only, until Textual is fully released. Please follow - /// the tracking issue + /// from SIGN_MODE_DIRECT. It is currently not supported. Textual = 2, /// SIGN_MODE_DIRECT_AUX specifies a signing mode which uses /// SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not diff --git a/src/prost/cosmos.tx.v1beta1.rs b/src/prost/cosmos.tx.v1beta1.rs index 4fa31e0c..7ba50c28 100644 --- a/src/prost/cosmos.tx.v1beta1.rs +++ b/src/prost/cosmos.tx.v1beta1.rs @@ -292,9 +292,6 @@ pub struct AuxSignerData { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxsEventRequest { /// events is the list of transaction event type. - /// Deprecated post v0.47.x: use query instead, which should contain a valid - /// events query. - #[deprecated] #[prost(string, repeated, tag = "1")] pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// pagination defines a pagination for the request. @@ -306,20 +303,13 @@ pub struct GetTxsEventRequest { >, #[prost(enumeration = "OrderBy", tag = "3")] pub order_by: i32, - /// page is the page number to query, starts at 1. If not provided, will - /// default to first page. + /// page is the page number to query, starts at 1. If not provided, will default to first page. #[prost(uint64, tag = "4")] pub page: u64, /// limit is the total number of results to be returned in the result page. /// If left empty it will default to a value to be set by each app. #[prost(uint64, tag = "5")] pub limit: u64, - /// query defines the transaction event query that is proxied to Tendermint's - /// TxSearch RPC method. The query must be valid. - /// - /// Since cosmos-sdk 0.50 - #[prost(string, tag = "6")] - pub query: ::prost::alloc::string::String, } /// GetTxsEventResponse is the response type for the Service.TxsByEvents /// RPC method. @@ -433,8 +423,7 @@ pub struct GetBlockWithTxsRequest { super::super::base::query::v1beta1::PageRequest, >, } -/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs -/// method. +/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. /// /// Since: cosmos-sdk 0.45.2 #[allow(clippy::derive_partial_eq_without_eq)] @@ -541,8 +530,7 @@ pub struct TxDecodeAminoResponse { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum OrderBy { - /// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults - /// to ASC in this case. + /// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. Unspecified = 0, /// ORDER_BY_ASC defines ascending order Asc = 1, @@ -571,8 +559,7 @@ impl OrderBy { } } } -/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC -/// method. +/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum BroadcastMode { @@ -581,11 +568,11 @@ pub enum BroadcastMode { /// DEPRECATED: use BROADCAST_MODE_SYNC instead, /// BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. Block = 1, - /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits - /// for a CheckTx execution response only. + /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + /// a CheckTx execution response only. Sync = 2, - /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client - /// returns immediately. + /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + /// immediately. Async = 3, } impl BroadcastMode { diff --git a/src/prost/google.protobuf.rs b/src/prost/google.protobuf.rs index fd7d3b8f..08851a34 100644 --- a/src/prost/google.protobuf.rs +++ b/src/prost/google.protobuf.rs @@ -44,9 +44,14 @@ pub struct FileDescriptorProto { #[prost(message, optional, tag = "9")] pub source_code_info: ::core::option::Option, /// The syntax of the proto file. - /// The supported values are "proto2" and "proto3". + /// The supported values are "proto2", "proto3", and "editions". + /// + /// If `edition` is present, this value must be "editions". #[prost(string, optional, tag = "12")] pub syntax: ::core::option::Option<::prost::alloc::string::String>, + /// The edition of the proto file, which is an opaque string. + #[prost(string, optional, tag = "13")] + pub edition: ::core::option::Option<::prost::alloc::string::String>, } /// Describes a message type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -109,6 +114,90 @@ pub struct ExtensionRangeOptions { /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, + /// For external users: DO NOT USE. We are in the process of open sourcing + /// extension declaration and executing internal cleanups before it can be + /// used externally. + #[prost(message, repeated, tag = "2")] + pub declaration: ::prost::alloc::vec::Vec, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "50")] + pub features: ::core::option::Option, + /// The verification state of the range. + /// TODO(b/278783756): flip the default to DECLARATION once all empty ranges + /// are marked as UNVERIFIED. + #[prost( + enumeration = "extension_range_options::VerificationState", + optional, + tag = "3", + default = "Unverified" + )] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ExtensionRangeOptions`. +pub mod extension_range_options { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Declaration { + /// The extension number declared within the extension range. + #[prost(int32, optional, tag = "1")] + pub number: ::core::option::Option, + /// The fully-qualified name of the extension field. There must be a leading + /// dot in front of the full name. + #[prost(string, optional, tag = "2")] + pub full_name: ::core::option::Option<::prost::alloc::string::String>, + /// The fully-qualified type name of the extension field. Unlike + /// Metadata.type, Declaration.type must have a leading dot for messages + /// and enums. + #[prost(string, optional, tag = "3")] + pub r#type: ::core::option::Option<::prost::alloc::string::String>, + /// If true, indicates that the number is reserved in the extension range, + /// and any extension field with the number will fail to compile. Set this + /// when a declared extension field is deleted. + #[prost(bool, optional, tag = "5")] + pub reserved: ::core::option::Option, + /// If true, indicates that the extension must be defined as repeated. + /// Otherwise the extension must be defined as optional. + #[prost(bool, optional, tag = "6")] + pub repeated: ::core::option::Option, + } + /// The verification state of the extension range. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum VerificationState { + /// All the extensions of the range must be declared. + Declaration = 0, + Unverified = 1, + } + impl VerificationState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + VerificationState::Declaration => "DECLARATION", + VerificationState::Unverified => "UNVERIFIED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DECLARATION" => Some(Self::Declaration), + "UNVERIFIED" => Some(Self::Unverified), + _ => None, + } + } + } } /// Describes a field within a message. #[allow(clippy::derive_partial_eq_without_eq)] @@ -521,6 +610,9 @@ pub struct FileOptions { /// determining the ruby package. #[prost(string, optional, tag = "45")] pub ruby_package: ::core::option::Option<::prost::alloc::string::String>, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "50")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. /// See the documentation for the "Options" section above. #[prost(message, repeated, tag = "999")] @@ -608,6 +700,10 @@ pub struct MessageOptions { /// this is a formalization for deprecating messages. #[prost(bool, optional, tag = "3", default = "false")] pub deprecated: ::core::option::Option, + /// NOTE: Do not set the option in .proto files. Always use the maps syntax + /// instead. The option should only be implicitly set by the proto compiler + /// parser. + /// /// Whether the message is an automatically generated map entry type for the /// maps field. /// @@ -625,12 +721,24 @@ pub struct MessageOptions { /// use a native map in the target language to hold the keys and values. /// The reflection APIs in such implementations still need to work as /// if the field is a repeated message field. - /// - /// NOTE: Do not set the option in .proto files. Always use the maps syntax - /// instead. The option should only be implicitly set by the proto compiler - /// parser. #[prost(bool, optional, tag = "7")] pub map_entry: ::core::option::Option, + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// and strips underscored from the fields before comparison in proto3 only. + /// The new behavior takes `json_name` into account and applies to proto2 as + /// well. + /// + /// This should only be used as a temporary measure against broken builds due + /// to the change in behavior for JSON field name conflicts. + /// + /// TODO(b/261750190) This is legacy behavior we plan to remove once downstream + /// teams have had time to migrate. + #[deprecated] + #[prost(bool, optional, tag = "11")] + pub deprecated_legacy_json_field_conflicts: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "12")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -640,8 +748,10 @@ pub struct MessageOptions { pub struct FieldOptions { /// The ctype option instructs the C++ code generator to use a different /// representation of the field than it normally would. See the specific - /// options below. This option is not yet implemented in the open source - /// release -- sorry, we'll try to include it in a future version! + /// options below. This option is only implemented to support use of + /// \[ctype=CORD\] and \[ctype=STRING\] (the default) on non-repeated fields of + /// type "bytes" in the open source release -- sorry, we'll try to include + /// other types in a future version! #[prost( enumeration = "field_options::CType", optional, @@ -691,7 +801,6 @@ pub struct FieldOptions { /// call from multiple threads concurrently, while non-const methods continue /// to require exclusive access. /// - /// /// Note that implementations may choose not to check required fields within /// a lazy sub-message. That is, calling IsInitialized() on the outer message /// may return true even if the inner message has missing required fields. @@ -703,11 +812,8 @@ pub struct FieldOptions { /// check its required fields, regardless of whether or not the message has /// been parsed. /// - /// As of 2021, lazy does no correctness checks on the byte stream during - /// parsing. This may lead to crashes if and when an invalid byte stream is - /// finally parsed upon access. - /// - /// TODO(b/211906113): Enable validation on lazy fields. + /// As of May 2022, lazy verifies the contents of the byte stream during + /// parsing. An invalid byte stream will cause the overall parsing to fail. #[prost(bool, optional, tag = "5", default = "false")] pub lazy: ::core::option::Option, /// unverified_lazy does no correctness checks on the byte stream. This should @@ -724,12 +830,39 @@ pub struct FieldOptions { /// For Google-internal migration only. Do not use. #[prost(bool, optional, tag = "10", default = "false")] pub weak: ::core::option::Option, + /// Indicate that the field value should not be printed out when using debug + /// formats, e.g. when the field contains sensitive credentials. + #[prost(bool, optional, tag = "16", default = "false")] + pub debug_redact: ::core::option::Option, + #[prost(enumeration = "field_options::OptionRetention", optional, tag = "17")] + pub retention: ::core::option::Option, + #[prost( + enumeration = "field_options::OptionTargetType", + repeated, + packed = "false", + tag = "19" + )] + pub targets: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "20")] + pub edition_defaults: ::prost::alloc::vec::Vec, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "21")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `FieldOptions`. pub mod field_options { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EditionDefault { + #[prost(string, optional, tag = "1")] + pub edition: ::core::option::Option<::prost::alloc::string::String>, + /// Textproto value. + #[prost(string, optional, tag = "2")] + pub value: ::core::option::Option<::prost::alloc::string::String>, + } #[derive( Clone, Copy, @@ -745,6 +878,12 @@ pub mod field_options { pub enum CType { /// Default mode. String = 0, + /// The option \[ctype=CORD\] may be applied to a non-repeated field of type + /// "bytes". It indicates that in C++, the data should be stored in a Cord + /// instead of a string. For very large strings, this may reduce memory + /// fragmentation. It may also allow better performance when parsing from a + /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then + /// alias the original buffer. Cord = 1, StringPiece = 2, } @@ -812,10 +951,121 @@ pub mod field_options { } } } + /// If set to RETENTION_SOURCE, the option will be omitted from the binary. + /// Note: as of January 2023, support for this is in progress and does not yet + /// have an effect (b/264593489). + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum OptionRetention { + RetentionUnknown = 0, + RetentionRuntime = 1, + RetentionSource = 2, + } + impl OptionRetention { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OptionRetention::RetentionUnknown => "RETENTION_UNKNOWN", + OptionRetention::RetentionRuntime => "RETENTION_RUNTIME", + OptionRetention::RetentionSource => "RETENTION_SOURCE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RETENTION_UNKNOWN" => Some(Self::RetentionUnknown), + "RETENTION_RUNTIME" => Some(Self::RetentionRuntime), + "RETENTION_SOURCE" => Some(Self::RetentionSource), + _ => None, + } + } + } + /// This indicates the types of entities that the field may apply to when used + /// as an option. If it is unset, then the field may be freely used as an + /// option on any kind of entity. Note: as of January 2023, support for this is + /// in progress and does not yet have an effect (b/264593489). + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum OptionTargetType { + TargetTypeUnknown = 0, + TargetTypeFile = 1, + TargetTypeExtensionRange = 2, + TargetTypeMessage = 3, + TargetTypeField = 4, + TargetTypeOneof = 5, + TargetTypeEnum = 6, + TargetTypeEnumEntry = 7, + TargetTypeService = 8, + TargetTypeMethod = 9, + } + impl OptionTargetType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OptionTargetType::TargetTypeUnknown => "TARGET_TYPE_UNKNOWN", + OptionTargetType::TargetTypeFile => "TARGET_TYPE_FILE", + OptionTargetType::TargetTypeExtensionRange => { + "TARGET_TYPE_EXTENSION_RANGE" + } + OptionTargetType::TargetTypeMessage => "TARGET_TYPE_MESSAGE", + OptionTargetType::TargetTypeField => "TARGET_TYPE_FIELD", + OptionTargetType::TargetTypeOneof => "TARGET_TYPE_ONEOF", + OptionTargetType::TargetTypeEnum => "TARGET_TYPE_ENUM", + OptionTargetType::TargetTypeEnumEntry => "TARGET_TYPE_ENUM_ENTRY", + OptionTargetType::TargetTypeService => "TARGET_TYPE_SERVICE", + OptionTargetType::TargetTypeMethod => "TARGET_TYPE_METHOD", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TARGET_TYPE_UNKNOWN" => Some(Self::TargetTypeUnknown), + "TARGET_TYPE_FILE" => Some(Self::TargetTypeFile), + "TARGET_TYPE_EXTENSION_RANGE" => Some(Self::TargetTypeExtensionRange), + "TARGET_TYPE_MESSAGE" => Some(Self::TargetTypeMessage), + "TARGET_TYPE_FIELD" => Some(Self::TargetTypeField), + "TARGET_TYPE_ONEOF" => Some(Self::TargetTypeOneof), + "TARGET_TYPE_ENUM" => Some(Self::TargetTypeEnum), + "TARGET_TYPE_ENUM_ENTRY" => Some(Self::TargetTypeEnumEntry), + "TARGET_TYPE_SERVICE" => Some(Self::TargetTypeService), + "TARGET_TYPE_METHOD" => Some(Self::TargetTypeMethod), + _ => None, + } + } + } } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OneofOptions { + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "1")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -833,6 +1083,18 @@ pub struct EnumOptions { /// is a formalization for deprecating enums. #[prost(bool, optional, tag = "3", default = "false")] pub deprecated: ::core::option::Option, + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// and strips underscored from the fields before comparison in proto3 only. + /// The new behavior takes `json_name` into account and applies to proto2 as + /// well. + /// TODO(b/261750190) Remove this legacy behavior once downstream teams have + /// had time to migrate. + #[deprecated] + #[prost(bool, optional, tag = "6")] + pub deprecated_legacy_json_field_conflicts: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "7")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -846,6 +1108,14 @@ pub struct EnumValueOptions { /// this is a formalization for deprecating enum values. #[prost(bool, optional, tag = "1", default = "false")] pub deprecated: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "2")] + pub features: ::core::option::Option, + /// Indicate that fields annotated with this enum value should not be printed + /// out when using debug formats, e.g. when the field contains sensitive + /// credentials. + #[prost(bool, optional, tag = "3", default = "false")] + pub debug_redact: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -853,6 +1123,9 @@ pub struct EnumValueOptions { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServiceOptions { + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "34")] + pub features: ::core::option::Option, /// Is this service deprecated? /// Depending on the target platform, this can emit Deprecated annotations /// for the service, or it will be completely ignored; in the very least, @@ -879,6 +1152,9 @@ pub struct MethodOptions { default = "IdempotencyUnknown" )] pub idempotency_level: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "35")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -961,8 +1237,8 @@ pub mod uninterpreted_option { /// The name of the uninterpreted option. Each string represents a segment in /// a dot-separated name. is_extension is true iff a segment represents an /// extension (denoted with parentheses in options specs in .proto files). - /// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - /// "foo.(bar.baz).qux". + /// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + /// "foo.(bar.baz).moo". #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NamePart { @@ -972,6 +1248,273 @@ pub mod uninterpreted_option { pub is_extension: bool, } } +/// TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are +/// not well scoped. This means that each of the feature enums below can clash +/// with each other. The short names we've chosen maximize call-site +/// readability, but leave us very open to this scenario. A future feature will +/// be designed and implemented to handle this, hopefully before we ever hit a +/// conflict here. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FeatureSet { + #[prost(enumeration = "feature_set::FieldPresence", optional, tag = "1")] + pub field_presence: ::core::option::Option, + #[prost(enumeration = "feature_set::EnumType", optional, tag = "2")] + pub enum_type: ::core::option::Option, + #[prost(enumeration = "feature_set::RepeatedFieldEncoding", optional, tag = "3")] + pub repeated_field_encoding: ::core::option::Option, + #[prost(enumeration = "feature_set::StringFieldValidation", optional, tag = "4")] + pub string_field_validation: ::core::option::Option, + #[prost(enumeration = "feature_set::MessageEncoding", optional, tag = "5")] + pub message_encoding: ::core::option::Option, + #[prost(enumeration = "feature_set::JsonFormat", optional, tag = "6")] + pub json_format: ::core::option::Option, + #[prost(message, optional, boxed, tag = "999")] + pub raw_features: ::core::option::Option<::prost::alloc::boxed::Box>, +} +/// Nested message and enum types in `FeatureSet`. +pub mod feature_set { + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum FieldPresence { + Unknown = 0, + Explicit = 1, + Implicit = 2, + LegacyRequired = 3, + } + impl FieldPresence { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FieldPresence::Unknown => "FIELD_PRESENCE_UNKNOWN", + FieldPresence::Explicit => "EXPLICIT", + FieldPresence::Implicit => "IMPLICIT", + FieldPresence::LegacyRequired => "LEGACY_REQUIRED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FIELD_PRESENCE_UNKNOWN" => Some(Self::Unknown), + "EXPLICIT" => Some(Self::Explicit), + "IMPLICIT" => Some(Self::Implicit), + "LEGACY_REQUIRED" => Some(Self::LegacyRequired), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum EnumType { + Unknown = 0, + Open = 1, + Closed = 2, + } + impl EnumType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + EnumType::Unknown => "ENUM_TYPE_UNKNOWN", + EnumType::Open => "OPEN", + EnumType::Closed => "CLOSED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ENUM_TYPE_UNKNOWN" => Some(Self::Unknown), + "OPEN" => Some(Self::Open), + "CLOSED" => Some(Self::Closed), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RepeatedFieldEncoding { + Unknown = 0, + Packed = 1, + Expanded = 2, + } + impl RepeatedFieldEncoding { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RepeatedFieldEncoding::Unknown => "REPEATED_FIELD_ENCODING_UNKNOWN", + RepeatedFieldEncoding::Packed => "PACKED", + RepeatedFieldEncoding::Expanded => "EXPANDED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "REPEATED_FIELD_ENCODING_UNKNOWN" => Some(Self::Unknown), + "PACKED" => Some(Self::Packed), + "EXPANDED" => Some(Self::Expanded), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum StringFieldValidation { + Unknown = 0, + Mandatory = 1, + Hint = 2, + None = 3, + } + impl StringFieldValidation { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + StringFieldValidation::Unknown => "STRING_FIELD_VALIDATION_UNKNOWN", + StringFieldValidation::Mandatory => "MANDATORY", + StringFieldValidation::Hint => "HINT", + StringFieldValidation::None => "NONE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STRING_FIELD_VALIDATION_UNKNOWN" => Some(Self::Unknown), + "MANDATORY" => Some(Self::Mandatory), + "HINT" => Some(Self::Hint), + "NONE" => Some(Self::None), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum MessageEncoding { + Unknown = 0, + LengthPrefixed = 1, + Delimited = 2, + } + impl MessageEncoding { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MessageEncoding::Unknown => "MESSAGE_ENCODING_UNKNOWN", + MessageEncoding::LengthPrefixed => "LENGTH_PREFIXED", + MessageEncoding::Delimited => "DELIMITED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MESSAGE_ENCODING_UNKNOWN" => Some(Self::Unknown), + "LENGTH_PREFIXED" => Some(Self::LengthPrefixed), + "DELIMITED" => Some(Self::Delimited), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum JsonFormat { + Unknown = 0, + Allow = 1, + LegacyBestEffort = 2, + } + impl JsonFormat { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + JsonFormat::Unknown => "JSON_FORMAT_UNKNOWN", + JsonFormat::Allow => "ALLOW", + JsonFormat::LegacyBestEffort => "LEGACY_BEST_EFFORT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "JSON_FORMAT_UNKNOWN" => Some(Self::Unknown), + "ALLOW" => Some(Self::Allow), + "LEGACY_BEST_EFFORT" => Some(Self::LegacyBestEffort), + _ => None, + } + } + } +} /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. #[allow(clippy::derive_partial_eq_without_eq)] @@ -1087,13 +1630,13 @@ pub mod source_code_info { /// // Comment attached to baz. /// // Another line attached to baz. /// - /// // Comment attached to qux. + /// // Comment attached to moo. /// // - /// // Another line attached to qux. - /// optional double qux = 4; + /// // Another line attached to moo. + /// optional double moo = 4; /// /// // Detached comment for corge. This is not leading or trailing comments - /// // to qux or corge because there are blank lines separating it from + /// // to moo or corge because there are blank lines separating it from /// // both. /// /// // Detached comment for corge paragraph 2. @@ -1145,10 +1688,59 @@ pub mod generated_code_info { #[prost(int32, optional, tag = "3")] pub begin: ::core::option::Option, /// Identifies the ending offset in bytes in the generated code that - /// relates to the identified offset. The end offset should be one past + /// relates to the identified object. The end offset should be one past /// the last relevant byte (so the length of the text = end - begin). #[prost(int32, optional, tag = "4")] pub end: ::core::option::Option, + #[prost(enumeration = "annotation::Semantic", optional, tag = "5")] + pub semantic: ::core::option::Option, + } + /// Nested message and enum types in `Annotation`. + pub mod annotation { + /// Represents the identified object's effect on the element in the original + /// .proto file. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Semantic { + /// There is no effect or the effect is indescribable. + None = 0, + /// The element is set or otherwise mutated. + Set = 1, + /// An alias to the element is returned. + Alias = 2, + } + impl Semantic { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Semantic::None => "NONE", + Semantic::Set => "SET", + Semantic::Alias => "ALIAS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NONE" => Some(Self::None), + "SET" => Some(Self::Set), + "ALIAS" => Some(Self::Alias), + _ => None, + } + } + } } } /// `Any` contains an arbitrary serialized protocol buffer message along with a @@ -1175,8 +1767,12 @@ pub mod generated_code_info { /// if (any.is(Foo.class)) { /// foo = any.unpack(Foo.class); /// } +/// // or ... +/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +/// foo = any.unpack(Foo.getDefaultInstance()); +/// } /// -/// Example 3: Pack and unpack a message in Python. +/// Example 3: Pack and unpack a message in Python. /// /// foo = Foo(...) /// any = Any() @@ -1186,7 +1782,7 @@ pub mod generated_code_info { /// any.Unpack(foo) /// ... /// -/// Example 4: Pack and unpack a message in Go +/// Example 4: Pack and unpack a message in Go /// /// foo := &pb.Foo{...} /// any, err := anypb.New(foo) @@ -1205,9 +1801,8 @@ pub mod generated_code_info { /// in the type URL, for example "foo.bar.com/x/y.z" will yield type /// name "y.z". /// -/// /// JSON -/// +/// ==== /// The JSON representation of an `Any` value uses the regular /// representation of the deserialized, embedded message, with an /// additional field `@type` which contains the type URL. Example: @@ -1262,7 +1857,8 @@ pub struct Any { /// /// Note: this functionality is not currently available in the official /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. + /// type.googleapis.com. As of May 2023, there are no widely used type server + /// implementations and no plans to implement one. /// /// Schemes other than `http`, `https` (or the empty scheme) might be /// used with implementation specific semantics. @@ -1323,7 +1919,6 @@ pub struct Any { /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) /// .setNanos((int) ((millis % 1000) * 1000000)).build(); /// -/// /// Example 5: Compute Timestamp from Java `Instant.now()`. /// /// Instant now = Instant.now(); @@ -1332,7 +1927,6 @@ pub struct Any { /// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) /// .setNanos(now.getNano()).build(); /// -/// /// Example 6: Compute Timestamp from current time in Python. /// /// timestamp = Timestamp() @@ -1362,10 +1956,9 @@ pub struct Any { /// \[`strftime`\]() with /// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use /// the Joda Time's \[`ISODateTimeFormat.dateTime()`\]( -/// +/// ) /// ) to obtain a formatter capable of generating timestamps in this format. /// -/// #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1441,7 +2034,6 @@ pub struct Timestamp { /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 /// microsecond should be expressed in JSON format as "3.000001s". /// -/// #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[derive(Eq)] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.fee.v1.rs b/src/prost/ibc.applications.fee.v1.rs index a385ca63..2ec27051 100644 --- a/src/prost/ibc.applications.fee.v1.rs +++ b/src/prost/ibc.applications.fee.v1.rs @@ -816,11 +816,6 @@ pub struct QueryIncentivizedPacketsResponse { /// list of identified fees for incentivized packets #[prost(message, repeated, tag = "1")] pub incentivized_packets: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, } /// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc #[allow(clippy::derive_partial_eq_without_eq)] @@ -868,11 +863,6 @@ pub struct QueryIncentivizedPacketsForChannelResponse { /// Map of all incentivized_packets #[prost(message, repeated, tag = "1")] pub incentivized_packets: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, } /// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc #[allow(clippy::derive_partial_eq_without_eq)] @@ -992,11 +982,6 @@ pub struct QueryFeeEnabledChannelsResponse { /// list of fee enabled channels #[prost(message, repeated, tag = "1")] pub fee_enabled_channels: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, } /// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.interchain_accounts.controller.v1.rs b/src/prost/ibc.applications.interchain_accounts.controller.v1.rs index 137f6724..22098d47 100644 --- a/src/prost/ibc.applications.interchain_accounts.controller.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.controller.v1.rs @@ -1,13 +1,3 @@ -/// Params defines the set of on-chain interchain accounts parameters. -/// The following parameters may be used to disable the controller submodule. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// controller_enabled enables or disables the controller submodule. - #[prost(bool, tag = "1")] - pub controller_enabled: bool, -} /// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -56,25 +46,6 @@ pub struct MsgSendTxResponse { #[prost(uint64, tag = "1")] pub sequence: u64, } -/// MsgUpdateParams defines the payload for Msg/UpdateParams -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/controller parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -224,37 +195,6 @@ pub mod msg_client { ); self.inner.unary(req, path, codec).await } - /// UpdateParams defines a rpc handler for MsgUpdateParams. - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Msg", - "UpdateParams", - ), - ); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -281,14 +221,6 @@ pub mod msg_server { tonic::Response, tonic::Status, >; - /// UpdateParams defines a rpc handler for MsgUpdateParams. - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Msg defines the 27-interchain-accounts/controller Msg service. #[derive(Debug)] @@ -458,50 +390,6 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).update_params(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( @@ -543,6 +431,16 @@ pub mod msg_server { const NAME: &'static str = "ibc.applications.interchain_accounts.controller.v1.Msg"; } } +/// Params defines the set of on-chain interchain accounts parameters. +/// The following parameters may be used to disable the controller submodule. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + /// controller_enabled enables or disables the controller submodule. + #[prost(bool, tag = "1")] + pub controller_enabled: bool, +} /// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.interchain_accounts.host.v1.rs b/src/prost/ibc.applications.interchain_accounts.host.v1.rs index 7f280865..f5f51ff1 100644 --- a/src/prost/ibc.applications.interchain_accounts.host.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.host.v1.rs @@ -11,327 +11,6 @@ pub struct Params { #[prost(string, repeated, tag = "2")] pub allow_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -/// MsgUpdateParams defines the payload for Msg/UpdateParams -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/host parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -/// Generated client implementations. -#[cfg(feature = "client")] -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 27-interchain-accounts/host Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + 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( - inner: T, - interceptor: F, - ) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + 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 - } - /// UpdateParams defines a rpc handler for MsgUpdateParams. - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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.host.v1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.interchain_accounts.host.v1.Msg", - "UpdateParams", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// UpdateParams defines a rpc handler for MsgUpdateParams. - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the 27-interchain-accounts/host Msg service. - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl MsgServer { - 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(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - 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 - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(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.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for MsgServer - where - T: Msg, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).update_params(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - 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 MsgServer { - const NAME: &'static str = "ibc.applications.interchain_accounts.host.v1.Msg"; - } -} /// QueryParamsRequest is the request type for the Query/Params RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.transfer.v1.rs b/src/prost/ibc.applications.transfer.v1.rs index bf6a8f61..182655b1 100644 --- a/src/prost/ibc.applications.transfer.v1.rs +++ b/src/prost/ibc.applications.transfer.v1.rs @@ -1,34 +1,3 @@ -/// DenomTrace contains the base denomination for ICS20 fungible tokens and the -/// source tracing information path. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenomTrace { - /// path defines the chain of port/channel identifiers used for tracing the - /// source of the fungible token. - #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// base denomination of the relayed fungible token. - #[prost(string, tag = "2")] - pub base_denom: ::prost::alloc::string::String, -} -/// Params defines the set of IBC transfer parameters. -/// NOTE: To prevent a single token from being transferred, set the -/// TransfersEnabled parameter to true and then set the bank module's SendEnabled -/// parameter for the denomination to false. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// send_enabled enables or disables all cross-chain token transfers from this - /// chain. - #[prost(bool, tag = "1")] - pub send_enabled: bool, - /// receive_enabled enables or disables all cross-chain token transfers to this - /// chain. - #[prost(bool, tag = "2")] - pub receive_enabled: bool, -} /// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between /// ICS20 enabled chains. See ICS Spec here: /// @@ -77,26 +46,6 @@ pub struct MsgTransferResponse { #[prost(uint64, tag = "1")] pub sequence: u64, } -/// MsgUpdateParams is the Msg/UpdateParams request type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the transfer parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -210,34 +159,6 @@ pub mod msg_client { .insert(GrpcMethod::new("ibc.applications.transfer.v1.Msg", "Transfer")); self.inner.unary(req, path, codec).await } - /// UpdateParams defines a rpc handler for MsgUpdateParams. - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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.transfer.v1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.applications.transfer.v1.Msg", "UpdateParams"), - ); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -256,14 +177,6 @@ pub mod msg_server { tonic::Response, tonic::Status, >; - /// UpdateParams defines a rpc handler for MsgUpdateParams. - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Msg defines the ibc/transfer Msg service. #[derive(Debug)] @@ -387,50 +300,6 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.applications.transfer.v1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).update_params(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( @@ -472,6 +341,37 @@ pub mod msg_server { const NAME: &'static str = "ibc.applications.transfer.v1.Msg"; } } +/// DenomTrace contains the base denomination for ICS20 fungible tokens and the +/// source tracing information path. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DenomTrace { + /// path defines the chain of port/channel identifiers used for tracing the + /// source of the fungible token. + #[prost(string, tag = "1")] + pub path: ::prost::alloc::string::String, + /// base denomination of the relayed fungible token. + #[prost(string, tag = "2")] + pub base_denom: ::prost::alloc::string::String, +} +/// Params defines the set of IBC transfer parameters. +/// NOTE: To prevent a single token from being transferred, set the +/// TransfersEnabled parameter to true and then set the bank module's SendEnabled +/// parameter for the denomination to false. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + /// send_enabled enables or disables all cross-chain token transfers from this + /// chain. + #[prost(bool, tag = "1")] + pub send_enabled: bool, + /// receive_enabled enables or disables all cross-chain token transfers to this + /// chain. + #[prost(bool, tag = "2")] + pub receive_enabled: bool, +} /// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC /// method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] diff --git a/src/prost/ibc.core.channel.v1.rs b/src/prost/ibc.core.channel.v1.rs index 0611a0ba..07b06b94 100644 --- a/src/prost/ibc.core.channel.v1.rs +++ b/src/prost/ibc.core.channel.v1.rs @@ -169,20 +169,6 @@ pub mod acknowledgement { Error(::prost::alloc::string::String), } } -/// Timeout defines an execution deadline structure for 04-channel handlers. -/// This includes packet lifecycle handlers as well as the upgrade handshake handlers. -/// A valid Timeout contains either one or both of a timestamp and block height (sequence). -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Timeout { - /// block height after which the packet or upgrade times out - #[prost(message, optional, tag = "1")] - pub height: ::core::option::Option, - /// block timestamp (in nanoseconds) after which the packet or upgrade times out - #[prost(uint64, tag = "2")] - pub timestamp: u64, -} /// State defines if a channel is in one of the following states: /// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] @@ -2002,35 +1988,6 @@ pub struct QueryNextSequenceReceiveResponse { #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, } -/// QueryNextSequenceSendRequest is the request type for the -/// Query/QueryNextSequenceSend RPC method -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceSendRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryNextSequenceSendResponse is the request type for the -/// Query/QueryNextSequenceSend RPC method -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceSendResponse { - /// next sequence send number - #[prost(uint64, tag = "1")] - pub next_sequence_send: u64, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} /// Generated client implementations. #[cfg(feature = "client")] pub mod query_client { @@ -2485,34 +2442,6 @@ pub mod query_client { ); self.inner.unary(req, path, codec).await } - /// NextSequenceSend returns the next send sequence for a given channel. - pub async fn next_sequence_send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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.core.channel.v1.Query/NextSequenceSend", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "NextSequenceSend"), - ); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -2635,14 +2564,6 @@ pub mod query_server { tonic::Response, tonic::Status, >; - /// NextSequenceSend returns the next send sequence for a given channel. - async fn next_sequence_send( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Query provides defines the gRPC querier service #[derive(Debug)] @@ -3333,52 +3254,6 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/NextSequenceSend" => { - #[allow(non_camel_case_types)] - struct NextSequenceSendSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for NextSequenceSendSvc { - type Response = super::QueryNextSequenceSendResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).next_sequence_send(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = NextSequenceSendSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( diff --git a/src/prost/ibc.core.client.v1.rs b/src/prost/ibc.core.client.v1.rs index ace37f87..5407a7ea 100644 --- a/src/prost/ibc.core.client.v1.rs +++ b/src/prost/ibc.core.client.v1.rs @@ -143,9 +143,7 @@ pub struct GenesisState { pub clients_metadata: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] pub params: ::core::option::Option, - /// Deprecated: create_localhost has been deprecated. - /// The localhost client is automatically created at genesis. - #[deprecated] + /// create localhost on initialization #[prost(bool, tag = "5")] pub create_localhost: bool, /// the sequence for the next generated client identifier @@ -261,20 +259,23 @@ pub struct MsgUpgradeClient { pub struct MsgUpgradeClientResponse {} /// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for /// light client misbehaviour. -/// This message has been deprecated. Use MsgUpdateClient instead. +/// Warning: DEPRECATED #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitMisbehaviour { /// client unique identifier + #[deprecated] #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, /// misbehaviour used for freezing the light client + #[deprecated] #[prost(message, optional, tag = "2")] pub misbehaviour: ::core::option::Option< super::super::super::super::google::protobuf::Any, >, /// signer address + #[deprecated] #[prost(string, tag = "3")] pub signer: ::prost::alloc::string::String, } @@ -284,25 +285,6 @@ pub struct MsgSubmitMisbehaviour { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitMisbehaviourResponse {} -/// MsgUpdateParams defines the sdk.Msg type to update the client parameters. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the client parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -494,32 +476,6 @@ pub mod msg_client { .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "SubmitMisbehaviour")); self.inner.unary(req, path, codec).await } - /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. - pub async fn update_client_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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.core.client.v1.Msg/UpdateClientParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClientParams")); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -562,14 +518,6 @@ pub mod msg_server { tonic::Response, tonic::Status, >; - /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. - async fn update_client_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Msg defines the ibc/client Msg service. #[derive(Debug)] @@ -829,50 +777,6 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Msg/UpdateClientParams" => { - #[allow(non_camel_case_types)] - struct UpdateClientParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateClientParamsSvc { - type Response = super::MsgUpdateParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).update_client_params(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = UpdateClientParamsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( diff --git a/src/prost/ibc.core.connection.v1.rs b/src/prost/ibc.core.connection.v1.rs index 6b8fa832..184d65f5 100644 --- a/src/prost/ibc.core.connection.v1.rs +++ b/src/prost/ibc.core.connection.v1.rs @@ -313,25 +313,6 @@ pub struct MsgConnectionOpenConfirm { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgConnectionOpenConfirmResponse {} -/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the connection parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -535,38 +516,6 @@ pub mod msg_client { ); self.inner.unary(req, path, codec).await } - /// UpdateConnectionParams defines a rpc handler method for - /// MsgUpdateParams. - pub async fn update_connection_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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.core.connection.v1.Msg/UpdateConnectionParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "UpdateConnectionParams", - ), - ); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -610,15 +559,6 @@ pub mod msg_server { tonic::Response, tonic::Status, >; - /// UpdateConnectionParams defines a rpc handler method for - /// MsgUpdateParams. - async fn update_connection_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Msg defines the ibc/connection Msg service. #[derive(Debug)] @@ -880,50 +820,6 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Msg/UpdateConnectionParams" => { - #[allow(non_camel_case_types)] - struct UpdateConnectionParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateConnectionParamsSvc { - type Response = super::MsgUpdateParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).update_connection_params(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = UpdateConnectionParamsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( diff --git a/src/prost/interchain_security.ccv.consumer.v1.rs b/src/prost/interchain_security.ccv.consumer.v1.rs index d3126fc5..f9189e2a 100644 --- a/src/prost/interchain_security.ccv.consumer.v1.rs +++ b/src/prost/interchain_security.ccv.consumer.v1.rs @@ -1,9 +1,76 @@ -/// CrossChainValidator defines the type used to store validator information internal -/// to the consumer CCV module. Note one cross chain validator entry is persisted for -/// each consumer validator, where incoming VSC packets update this data, which is eventually -/// forwarded to comet for consumer chain consensus. -/// -/// Note this type is only used internally to the consumer CCV module. +/// Params defines the parameters for CCV consumer module +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + /// TODO: Remove enabled flag and find a better way to setup integration tests + /// See: + #[prost(bool, tag = "1")] + pub enabled: bool, + /// ///////////////////// + /// Distribution Params + /// Number of blocks between ibc-token-transfers from the consumer chain to + /// the provider chain. Note that at this transmission event a fraction of + /// the accumulated tokens are divided and sent consumer redistribution + /// address. + #[prost(int64, tag = "2")] + pub blocks_per_distribution_transmission: i64, + /// Channel, and provider-chain receiving address to send distribution token + /// transfers over. These parameters is auto-set during the consumer <-> + /// provider handshake procedure. + #[prost(string, tag = "3")] + pub distribution_transmission_channel: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub provider_fee_pool_addr_str: ::prost::alloc::string::String, + /// Sent CCV related IBC packets will timeout after this duration + #[prost(message, optional, tag = "5")] + pub ccv_timeout_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// Sent transfer related IBC packets will timeout after this duration + #[prost(message, optional, tag = "6")] + pub transfer_timeout_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// The fraction of tokens allocated to the consumer redistribution address + /// during distribution events. The fraction is a string representing a + /// decimal number. For example "0.75" would represent 75%. + #[prost(string, tag = "7")] + pub consumer_redistribution_fraction: ::prost::alloc::string::String, + /// The number of historical info entries to persist in store. + /// This param is a part of the cosmos sdk staking module. In the case of + /// a ccv enabled consumer chain, the ccv module acts as the staking module. + #[prost(int64, tag = "8")] + pub historical_entries: i64, + /// Unbonding period for the consumer, + /// which should be smaller than that of the provider in general. + #[prost(message, optional, tag = "9")] + pub unbonding_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// The threshold for the percentage of validators at the bottom of the set who + /// can opt out of running the consumer chain without being punished. For + /// example, a value of 0.05 means that the validators in the bottom 5% of the + /// set can opt out + #[prost(string, tag = "10")] + pub soft_opt_out_threshold: ::prost::alloc::string::String, + /// Reward denoms. These are the denominations which are allowed to be sent to + /// the provider as rewards. + #[prost(string, repeated, tag = "11")] + pub reward_denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Provider-originated reward denoms. These are denoms coming from the + /// provider which are allowed to be used as rewards. e.g. "uatom" + #[prost(string, repeated, tag = "12")] + pub provider_reward_denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// LastTransmissionBlockHeight is the last time validator holding +/// pools were transmitted to the provider chain +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LastTransmissionBlockHeight { + #[prost(int64, tag = "1")] + pub height: i64, +} +/// CrossChainValidator defines the validators for CCV consumer module #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CrossChainValidator { @@ -17,20 +84,88 @@ pub struct CrossChainValidator { super::super::super::super::google::protobuf::Any, >, } -/// A record storing the state of a slash packet sent to the provider chain -/// which may bounce back and forth until handled by the provider. -/// -/// Note this type is only used internally to the consumer CCV module. +/// MaturingVSCPacket contains the maturing time of a received VSCPacket #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SlashRecord { - #[prost(bool, tag = "1")] - pub waiting_on_reply: bool, +pub struct MaturingVscPacket { + #[prost(uint64, tag = "1")] + pub vsc_id: u64, #[prost(message, optional, tag = "2")] - pub send_time: ::core::option::Option< + pub maturity_time: ::core::option::Option< super::super::super::super::google::protobuf::Timestamp, >, } +/// GenesisState defines the CCV consumer chain genesis state +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + /// empty for a new chain, filled in on restart. + #[prost(string, tag = "2")] + pub provider_client_id: ::prost::alloc::string::String, + /// empty for a new chain, filled in on restart. + #[prost(string, tag = "3")] + pub provider_channel_id: ::prost::alloc::string::String, + /// true for new chain GenesisState, false for chain restart. + #[prost(bool, tag = "4")] + pub new_chain: bool, + /// ProviderClientState filled in on new chain, nil on restart. + #[prost(message, optional, tag = "5")] + pub provider_client_state: ::core::option::Option< + super::super::super::super::ibc::lightclients::tendermint::v1::ClientState, + >, + /// ProviderConsensusState filled in on new chain, nil on restart. + #[prost(message, optional, tag = "6")] + pub provider_consensus_state: ::core::option::Option< + super::super::super::super::ibc::lightclients::tendermint::v1::ConsensusState, + >, + /// MaturingPackets nil on new chain, filled in on restart. + #[prost(message, repeated, tag = "7")] + pub maturing_packets: ::prost::alloc::vec::Vec, + /// InitialValset filled in on new chain and on restart. + #[prost(message, repeated, tag = "8")] + pub initial_val_set: ::prost::alloc::vec::Vec< + ::tendermint_proto::abci::ValidatorUpdate, + >, + /// HeightToValsetUpdateId nil on new chain, filled in on restart. + #[prost(message, repeated, tag = "9")] + pub height_to_valset_update_id: ::prost::alloc::vec::Vec, + /// OutstandingDowntimes nil on new chain, filled in on restart. + #[prost(message, repeated, tag = "10")] + pub outstanding_downtime_slashing: ::prost::alloc::vec::Vec, + /// PendingConsumerPackets nil on new chain, filled in on restart. + #[prost(message, optional, tag = "11")] + pub pending_consumer_packets: ::core::option::Option< + super::super::v1::ConsumerPacketDataList, + >, + /// LastTransmissionBlockHeight nil on new chain, filled in on restart. + #[prost(message, optional, tag = "12")] + pub last_transmission_block_height: ::core::option::Option< + LastTransmissionBlockHeight, + >, + /// flag indicating whether the consumer CCV module starts in + #[prost(bool, tag = "13")] + pub pre_ccv: bool, +} +/// HeightValsetUpdateID defines the genesis information for the mapping +/// of each block height to a valset update id +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HeightToValsetUpdateId { + #[prost(uint64, tag = "1")] + pub height: u64, + #[prost(uint64, tag = "2")] + pub valset_update_id: u64, +} +/// OutstandingDowntime defines the genesis information for each validator +/// flagged with an outstanding downtime slashing. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OutstandingDowntime { + #[prost(string, tag = "1")] + pub validator_consensus_address: ::prost::alloc::string::String, +} /// NextFeeDistributionEstimate holds information about next fee distribution #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -75,30 +210,7 @@ pub struct QueryParamsRequest {} pub struct QueryParamsResponse { /// params holds all the parameters of this module. #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProviderInfoRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProviderInfoResponse { - #[prost(message, optional, tag = "1")] - pub consumer: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub provider: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChainInfo { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub channel_id: ::prost::alloc::string::String, + pub params: ::core::option::Option, } /// Generated client implementations. #[cfg(feature = "client")] @@ -251,36 +363,6 @@ pub mod query_client { ); self.inner.unary(req, path, codec).await } - pub async fn query_provider_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - 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( - "/interchain_security.ccv.consumer.v1.Query/QueryProviderInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "interchain_security.ccv.consumer.v1.Query", - "QueryProviderInfo", - ), - ); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -308,13 +390,6 @@ pub mod query_server { tonic::Response, tonic::Status, >; - async fn query_provider_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } #[derive(Debug)] pub struct QueryServer { @@ -488,52 +563,6 @@ pub mod query_server { }; Box::pin(fut) } - "/interchain_security.ccv.consumer.v1.Query/QueryProviderInfo" => { - #[allow(non_camel_case_types)] - struct QueryProviderInfoSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for QueryProviderInfoSvc { - type Response = super::QueryProviderInfoResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).query_provider_info(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - 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 = QueryProviderInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( diff --git a/src/prost/interchain_security.ccv.provider.v1.rs b/src/prost/interchain_security.ccv.provider.v1.rs index 56913a95..b21d482a 100644 --- a/src/prost/interchain_security.ccv.provider.v1.rs +++ b/src/prost/interchain_security.ccv.provider.v1.rs @@ -16,6 +16,22 @@ pub struct MsgAssignConsumerKey { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgAssignConsumerKeyResponse {} +/// MsgRegisterConsumerRewardDenom allows an account to register +/// a consumer reward denom, i.e., add it to the list of denoms +/// accepted by the provider as rewards. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterConsumerRewardDenom { + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub depositor: ::prost::alloc::string::String, +} +/// MsgRegisterConsumerRewardDenomResponse defines the +/// Msg/RegisterConsumerRewardDenom response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterConsumerRewardDenomResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -133,6 +149,36 @@ pub mod msg_client { ); self.inner.unary(req, path, codec).await } + pub async fn register_consumer_reward_denom( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/interchain_security.ccv.provider.v1.Msg/RegisterConsumerRewardDenom", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "interchain_security.ccv.provider.v1.Msg", + "RegisterConsumerRewardDenom", + ), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -150,6 +196,13 @@ pub mod msg_server { tonic::Response, tonic::Status, >; + async fn register_consumer_reward_denom( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// Msg defines the Msg service. #[derive(Debug)] @@ -275,6 +328,54 @@ pub mod msg_server { }; Box::pin(fut) } + "/interchain_security.ccv.provider.v1.Msg/RegisterConsumerRewardDenom" => { + #[allow(non_camel_case_types)] + struct RegisterConsumerRewardDenomSvc(pub Arc); + impl< + T: Msg, + > tonic::server::UnaryService + for RegisterConsumerRewardDenomSvc { + type Response = super::MsgRegisterConsumerRewardDenomResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::MsgRegisterConsumerRewardDenom, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).register_consumer_reward_denom(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + 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 = RegisterConsumerRewardDenomSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( @@ -422,10 +523,6 @@ pub struct ConsumerRemovalProposal { super::super::super::super::google::protobuf::Timestamp, >, } -/// EquivocationProposal is a governance proposal on the provider chain to -/// punish a validator for equivocation on a consumer chain. -/// -/// This type is only used internally to the consumer CCV module. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EquivocationProposal { @@ -441,24 +538,6 @@ pub struct EquivocationProposal { super::super::super::super::cosmos::evidence::v1beta1::Equivocation, >, } -/// ChangeRewardDenomsProposal is a governance proposal on the provider chain to -/// mutate the set of denoms accepted by the provider as rewards. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChangeRewardDenomsProposal { - /// the title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// the description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// the list of consumer reward denoms to add - #[prost(string, repeated, tag = "3")] - pub denoms_to_add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// the list of consumer reward denoms to remove - #[prost(string, repeated, tag = "4")] - pub denoms_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} /// A persisted queue entry indicating that a slash packet data instance needs to /// be handled. This type belongs in the "global" queue, to coordinate slash /// packet handling times between consumers. @@ -537,8 +616,16 @@ pub struct Params { super::super::super::super::cosmos::base::v1beta1::Coin, >, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HandshakeMetadata { + #[prost(string, tag = "1")] + pub provider_fee_pool_addr: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub version: ::prost::alloc::string::String, +} /// SlashAcks contains cons addresses of consumer chain validators -/// successfully slashed on the provider chain. +/// successfully slashed on the provider chain #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlashAcks { @@ -619,30 +706,6 @@ pub struct VscSendTimestamp { super::super::super::super::google::protobuf::Timestamp, >, } -/// ValidatorSetChangePackets is a pb list of ccv.ValidatorSetChangePacketData. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorSetChangePackets { - #[prost(message, repeated, tag = "1")] - pub list: ::prost::alloc::vec::Vec, -} -/// MaturedUnbondingOps defines a list of ids corresponding to ids of matured -/// unbonding operations. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MaturedUnbondingOps { - #[prost(uint64, repeated, tag = "1")] - pub ids: ::prost::alloc::vec::Vec, -} -/// ExportedVscSendTimestamps is VscSendTimestamp with chainID info for exporting to genesis -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportedVscSendTimestamp { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub vsc_send_timestamps: ::prost::alloc::vec::Vec, -} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyAssignmentReplacement { @@ -701,7 +764,7 @@ pub struct QueryConsumerGenesisRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryConsumerGenesisResponse { #[prost(message, optional, tag = "1")] - pub genesis_state: ::core::option::Option, + pub genesis_state: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1888,7 +1951,9 @@ pub struct GenesisState { pub unbonding_ops: ::prost::alloc::vec::Vec, /// empty for a new chain #[prost(message, optional, tag = "4")] - pub mature_unbonding_ops: ::core::option::Option, + pub mature_unbonding_ops: ::core::option::Option< + super::super::v1::MaturedUnbondingOps, + >, /// empty for a new chain #[prost(message, repeated, tag = "5")] pub valset_update_id_to_height: ::prost::alloc::vec::Vec, @@ -1909,14 +1974,8 @@ pub struct GenesisState { /// empty for a new chain #[prost(message, repeated, tag = "11")] pub consumer_addrs_to_prune: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "12")] - pub init_timeout_timestamps: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "13")] - pub exported_vsc_send_timestamps: ::prost::alloc::vec::Vec, } -/// The provider CCV module's knowledge of consumer state. -/// -/// Note this type is only used internally to the provider CCV module. +/// consumer chain #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConsumerState { @@ -1934,7 +1993,9 @@ pub struct ConsumerState { pub initial_height: u64, /// ConsumerGenesis defines the initial consumer chain genesis states #[prost(message, optional, tag = "5")] - pub consumer_genesis: ::core::option::Option, + pub consumer_genesis: ::core::option::Option< + super::super::consumer::v1::GenesisState, + >, /// PendingValsetChanges defines the pending validator set changes for the /// consumer chain #[prost(message, repeated, tag = "6")] diff --git a/src/prost/interchain_security.ccv.v1.rs b/src/prost/interchain_security.ccv.v1.rs index bded4941..4ffc3a50 100644 --- a/src/prost/interchain_security.ccv.v1.rs +++ b/src/prost/interchain_security.ccv.v1.rs @@ -17,6 +17,13 @@ pub struct ValidatorSetChangePacketData { #[prost(string, repeated, tag = "3")] pub slash_acks: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +/// List of ccv.ValidatorSetChangePacketData. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorSetChangePackets { + #[prost(message, repeated, tag = "1")] + pub list: ::prost::alloc::vec::Vec, +} /// This packet is sent from the consumer chain to the provider chain /// to notify that a VSC packet reached maturity on the consumer chain. #[allow(clippy::derive_partial_eq_without_eq)] @@ -44,6 +51,14 @@ pub struct SlashPacketData { )] pub infraction: i32, } +/// MaturedUnbondingOps defines a list of ids corresponding to ids of matured +/// unbonding operations. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MaturedUnbondingOps { + #[prost(uint64, repeated, tag = "1")] + pub ids: ::prost::alloc::vec::Vec, +} /// ConsumerPacketData contains a consumer packet data and a type tag #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -64,14 +79,12 @@ pub mod consumer_packet_data { VscMaturedPacketData(super::VscMaturedPacketData), } } -/// Note this type is used during IBC handshake methods for both the consumer and provider +/// ConsumerPacketDataList is a list of consumer packet data packets. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct HandshakeMetadata { - #[prost(string, tag = "1")] - pub provider_fee_pool_addr: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub version: ::prost::alloc::string::String, +pub struct ConsumerPacketDataList { + #[prost(message, repeated, tag = "1")] + pub list: ::prost::alloc::vec::Vec, } /// ConsumerPacketData contains a consumer packet data and a type tag /// that is compatible with ICS v1 and v2 over the wire. It is not used for internal storage. @@ -148,7 +161,7 @@ impl ConsumerPacketDataType { } } /// InfractionType indicates the infraction type a validator commited. -/// Note ccv.InfractionType to maintain compatibility between ICS versions +/// NOTE: ccv.InfractionType to maintain compatibility between ICS versions /// using different versions of the cosmos-sdk and ibc-go modules. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] @@ -182,182 +195,3 @@ impl InfractionType { } } } -/// Params defines the parameters for CCV consumer module. -/// -/// Note this type is referenced in both the consumer and provider CCV modules, -/// and persisted on the provider, see MakeConsumerGenesis and SetConsumerGenesis. -/// -/// TODO: Rename to ConsumerParams. See -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// TODO: Remove enabled flag and find a better way to setup integration tests - /// See: - #[prost(bool, tag = "1")] - pub enabled: bool, - /// ///////////////////// - /// Distribution Params - /// Number of blocks between ibc-token-transfers from the consumer chain to - /// the provider chain. Note that at this transmission event a fraction of - /// the accumulated tokens are divided and sent consumer redistribution - /// address. - #[prost(int64, tag = "2")] - pub blocks_per_distribution_transmission: i64, - /// Channel, and provider-chain receiving address to send distribution token - /// transfers over. These parameters is auto-set during the consumer <-> - /// provider handshake procedure. - #[prost(string, tag = "3")] - pub distribution_transmission_channel: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub provider_fee_pool_addr_str: ::prost::alloc::string::String, - /// Sent CCV related IBC packets will timeout after this duration - #[prost(message, optional, tag = "5")] - pub ccv_timeout_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, - /// Sent transfer related IBC packets will timeout after this duration - #[prost(message, optional, tag = "6")] - pub transfer_timeout_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, - /// The fraction of tokens allocated to the consumer redistribution address - /// during distribution events. The fraction is a string representing a - /// decimal number. For example "0.75" would represent 75%. - #[prost(string, tag = "7")] - pub consumer_redistribution_fraction: ::prost::alloc::string::String, - /// The number of historical info entries to persist in store. - /// This param is a part of the cosmos sdk staking module. In the case of - /// a ccv enabled consumer chain, the ccv module acts as the staking module. - #[prost(int64, tag = "8")] - pub historical_entries: i64, - /// Unbonding period for the consumer, - /// which should be smaller than that of the provider in general. - #[prost(message, optional, tag = "9")] - pub unbonding_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, - /// The threshold for the percentage of validators at the bottom of the set who - /// can opt out of running the consumer chain without being punished. For - /// example, a value of 0.05 means that the validators in the bottom 5% of the - /// set can opt out - #[prost(string, tag = "10")] - pub soft_opt_out_threshold: ::prost::alloc::string::String, - /// Reward denoms. These are the denominations which are allowed to be sent to - /// the provider as rewards. - #[prost(string, repeated, tag = "11")] - pub reward_denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Provider-originated reward denoms. These are denoms coming from the - /// provider which are allowed to be used as rewards. e.g. "uatom" - #[prost(string, repeated, tag = "12")] - pub provider_reward_denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// GenesisState defines the CCV consumer chain genesis state. -/// -/// Note this type is referenced in both the consumer and provider CCV modules, -/// and persisted on the provider, see MakeConsumerGenesis and SetConsumerGenesis. -/// -/// TODO: Rename to ConsumerGenesisState. See -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// empty for a new chain, filled in on restart. - #[prost(string, tag = "2")] - pub provider_client_id: ::prost::alloc::string::String, - /// empty for a new chain, filled in on restart. - #[prost(string, tag = "3")] - pub provider_channel_id: ::prost::alloc::string::String, - /// true for new chain GenesisState, false for chain restart. - #[prost(bool, tag = "4")] - pub new_chain: bool, - /// ProviderClientState filled in on new chain, nil on restart. - #[prost(message, optional, tag = "5")] - pub provider_client_state: ::core::option::Option< - super::super::super::ibc::lightclients::tendermint::v1::ClientState, - >, - /// ProviderConsensusState filled in on new chain, nil on restart. - #[prost(message, optional, tag = "6")] - pub provider_consensus_state: ::core::option::Option< - super::super::super::ibc::lightclients::tendermint::v1::ConsensusState, - >, - /// MaturingPackets nil on new chain, filled in on restart. - #[prost(message, repeated, tag = "7")] - pub maturing_packets: ::prost::alloc::vec::Vec, - /// InitialValset filled in on new chain and on restart. - #[prost(message, repeated, tag = "8")] - pub initial_val_set: ::prost::alloc::vec::Vec< - ::tendermint_proto::abci::ValidatorUpdate, - >, - /// HeightToValsetUpdateId nil on new chain, filled in on restart. - #[prost(message, repeated, tag = "9")] - pub height_to_valset_update_id: ::prost::alloc::vec::Vec, - /// OutstandingDowntimes nil on new chain, filled in on restart. - #[prost(message, repeated, tag = "10")] - pub outstanding_downtime_slashing: ::prost::alloc::vec::Vec, - /// PendingConsumerPackets nil on new chain, filled in on restart. - #[prost(message, optional, tag = "11")] - pub pending_consumer_packets: ::core::option::Option, - /// LastTransmissionBlockHeight nil on new chain, filled in on restart. - #[prost(message, optional, tag = "12")] - pub last_transmission_block_height: ::core::option::Option< - LastTransmissionBlockHeight, - >, - /// flag indicating whether the consumer CCV module starts in - #[prost(bool, tag = "13")] - pub pre_ccv: bool, -} -/// HeightValsetUpdateID represents a mapping internal to the consumer CCV module -/// AND used in shared consumer genesis state, which links a block height to each recv valset update id. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HeightToValsetUpdateId { - #[prost(uint64, tag = "1")] - pub height: u64, - #[prost(uint64, tag = "2")] - pub valset_update_id: u64, -} -/// OutstandingDowntime defines the type used internally to the consumer CCV module, -/// AND used in shared consumer genesis state, in order to not send multiple slashing -/// requests for the same downtime infraction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct OutstandingDowntime { - #[prost(string, tag = "1")] - pub validator_consensus_address: ::prost::alloc::string::String, -} -/// LastTransmissionBlockHeight is the last time validator holding -/// pools were transmitted to the provider chain. This type is used internally -/// to the consumer CCV module AND used in shared consumer genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LastTransmissionBlockHeight { - #[prost(int64, tag = "1")] - pub height: i64, -} -/// MaturingVSCPacket represents a vsc packet that is maturing internal to the -/// consumer CCV module, where the consumer has not yet relayed a VSCMatured packet -/// back to the provider. This type is used internally to the consumer CCV module -/// AND used in shared consumer genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MaturingVscPacket { - #[prost(uint64, tag = "1")] - pub vsc_id: u64, - #[prost(message, optional, tag = "2")] - pub maturity_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, -} -/// ConsumerPacketDataList is a list of consumer packet data packets. -/// -/// Note this type is is used internally to the consumer CCV module -/// for exporting / importing state in InitGenesis and ExportGenesis, -/// AND included in the consumer genesis type (reffed by provider and consumer modules), -/// hence this is a shared type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsumerPacketDataList { - #[prost(message, repeated, tag = "1")] - pub list: ::prost::alloc::vec::Vec, -} diff --git a/src/prost/proto_descriptor.bin b/src/prost/proto_descriptor.bin index 45d2bf4f..a6df2dab 100644 Binary files a/src/prost/proto_descriptor.bin and b/src/prost/proto_descriptor.bin differ