Skip to content

Commit

Permalink
sync fork (#3)
Browse files Browse the repository at this point in the history
* cosmrs: expose `base::query` module and pagination types (cosmos#454)

* cosmos-sdk-proto: add more IBC related names (cosmos#457)

* cosmrs: added support for validator-related queries in staking module (cosmos#453)

* correctly populate 'updated' and 'msg' fields from proto responses (cosmos#451)

* cosmos-sdk-proto: update tonic to 0.11 (cosmos#460)

Minimise lockfile changes

* Bump tendermint-rs dependencies to v0.35 (cosmos#461)

* cosmos-sdk-proto: use `prost-build` to gen IBC `Name` impls (cosmos#462)

Uses the recently added support in `prost-build` for automatically
generating impls of the `Name` trait for IBC-related types, rather than
maintaining them by hand in the `type_names` module.

Unfortunately we can only do this for the IBC protos, since we build the
others using `buf`.

* cosmos-sdk-proto v0.21.0 (cosmos#463)

* cosmrs v0.16.0 (cosmos#464)

* cosmos-sdk-proto: remove deprecated `MessageExt` methods (cosmos#465)

* cosmos-sdk-proto v0.21.1 (cosmos#466)

---------

Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
Co-authored-by: Fabien Penso <git@pen.so>
Co-authored-by: Alex Butler <alexheretic@gmail.com>
Co-authored-by: Tony Arcieri (iqlusion) <tony@iqlusion.io>
  • Loading branch information
5 people committed Apr 15, 2024
1 parent 2e969f1 commit 0b0e33c
Show file tree
Hide file tree
Showing 44 changed files with 2,216 additions and 157 deletions.
163 changes: 98 additions & 65 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions cosmos-sdk-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.21.1 (2024-03-15)
### Removed
- Deprecated `MessageExt` methods: missed from v0.21.0, technically a breaking
change, but the just-published v0.21.0 release will be yanked ([#465])

[#465]: https://github.com/cosmos/cosmos-rust/pull/465

## 0.21.0 (2024-03-15) [YANKED]
### Changed
- Update `tonic` to v0.11 ([#460])
- Bump `tendermint-proto` dependency to v0.35 ([#461])
- Use `prost-build` to gen IBC `Name` impls ([#462])

[#460]: https://github.com/cosmos/cosmos-rust/pull/460
[#461]: https://github.com/cosmos/cosmos-rust/pull/461
[#462]: https://github.com/cosmos/cosmos-rust/pull/462

## 0.20.0 (2023-10-03)
### Added
- Expose `gov::v1` module ([#437])
Expand Down
8 changes: 4 additions & 4 deletions cosmos-sdk-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosmos-sdk-proto"
version = "0.20.0"
version = "0.21.1"
authors = [
"Justin Kilpatrick <justin@althea.net>",
"Greg Szabo <greg@informal.systems>",
Expand All @@ -16,12 +16,12 @@ edition = "2021"
rust-version = "1.72"

[dependencies]
prost = "0.12"
prost = "0.12.3"
prost-types = "0.12"
tendermint-proto = "0.34"
tendermint-proto = "0.35"

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

[features]
default = ["grpc-transport"]
Expand Down
21 changes: 21 additions & 0 deletions cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ pub struct BaseAccount {
#[prost(uint64, tag = "4")]
pub sequence: u64,
}
impl ::prost::Name for BaseAccount {
const NAME: &'static str = "BaseAccount";
const PACKAGE: &'static str = "cosmos.auth.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME)
}
}
/// ModuleAccount defines an account for modules that holds coins on a pool.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand All @@ -24,6 +31,13 @@ pub struct ModuleAccount {
#[prost(string, repeated, tag = "3")]
pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for ModuleAccount {
const NAME: &'static str = "ModuleAccount";
const PACKAGE: &'static str = "cosmos.auth.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME)
}
}
/// Params defines the parameters for the auth module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand All @@ -39,3 +53,10 @@ pub struct Params {
#[prost(uint64, tag = "5")]
pub sig_verify_cost_secp256k1: u64,
}
impl ::prost::Name for Params {
const NAME: &'static str = "Params";
const PACKAGE: &'static str = "cosmos.auth.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME)
}
}
14 changes: 14 additions & 0 deletions cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ pub struct PageRequest {
#[prost(bool, tag = "4")]
pub count_total: bool,
}
impl ::prost::Name for PageRequest {
const NAME: &'static str = "PageRequest";
const PACKAGE: &'static str = "cosmos.base.query.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME)
}
}
/// PageResponse is to be embedded in gRPC response messages where the
/// corresponding request message has used PageRequest.
///
Expand All @@ -48,3 +55,10 @@ pub struct PageResponse {
#[prost(uint64, tag = "2")]
pub total: u64,
}
impl ::prost::Name for PageResponse {
const NAME: &'static str = "PageResponse";
const PACKAGE: &'static str = "cosmos.base.query.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME)
}
}
28 changes: 28 additions & 0 deletions cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ pub struct Coin {
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
}
impl ::prost::Name for Coin {
const NAME: &'static str = "Coin";
const PACKAGE: &'static str = "cosmos.base.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
}
}
/// DecCoin defines a token with a denomination and a decimal amount.
///
/// NOTE: The amount field is an Dec which implements the custom method
Expand All @@ -22,17 +29,38 @@ pub struct DecCoin {
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
}
impl ::prost::Name for DecCoin {
const NAME: &'static str = "DecCoin";
const PACKAGE: &'static str = "cosmos.base.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
}
}
/// IntProto defines a Protobuf wrapper around an Int object.
#[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,
}
impl ::prost::Name for IntProto {
const NAME: &'static str = "IntProto";
const PACKAGE: &'static str = "cosmos.base.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
}
}
/// DecProto defines a Protobuf wrapper around a Dec object.
#[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,
}
impl ::prost::Name for DecProto {
const NAME: &'static str = "DecProto";
const PACKAGE: &'static str = "cosmos.base.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
}
}
21 changes: 21 additions & 0 deletions cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ pub struct Plan {
#[prost(string, tag = "4")]
pub info: ::prost::alloc::string::String,
}
impl ::prost::Name for Plan {
const NAME: &'static str = "Plan";
const PACKAGE: &'static str = "cosmos.upgrade.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME)
}
}
/// SoftwareUpgradeProposal is a gov Content type for initiating a software
/// upgrade.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand All @@ -36,6 +43,13 @@ pub struct SoftwareUpgradeProposal {
#[prost(message, optional, tag = "3")]
pub plan: ::core::option::Option<Plan>,
}
impl ::prost::Name for SoftwareUpgradeProposal {
const NAME: &'static str = "SoftwareUpgradeProposal";
const PACKAGE: &'static str = "cosmos.upgrade.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME)
}
}
/// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
/// upgrade.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand All @@ -46,3 +60,10 @@ pub struct CancelSoftwareUpgradeProposal {
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
}
impl ::prost::Name for CancelSoftwareUpgradeProposal {
const NAME: &'static str = "CancelSoftwareUpgradeProposal";
const PACKAGE: &'static str = "cosmos.upgrade.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,30 @@ pub struct Params {
#[prost(bool, tag = "1")]
pub controller_enabled: bool,
}
impl ::prost::Name for Params {
const NAME: &'static str = "Params";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"ibc.applications.interchain_accounts.controller.v1.{}",
Self::NAME
)
}
}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
impl ::prost::Name for QueryParamsRequest {
const NAME: &'static str = "QueryParamsRequest";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"ibc.applications.interchain_accounts.controller.v1.{}",
Self::NAME
)
}
}
/// QueryParamsResponse is the response type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand All @@ -19,6 +39,16 @@ pub struct QueryParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for QueryParamsResponse {
const NAME: &'static str = "QueryParamsResponse";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"ibc.applications.interchain_accounts.controller.v1.{}",
Self::NAME
)
}
}
/// Generated client implementations.
#[cfg(feature = "grpc")]
pub mod query_client {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,30 @@ pub struct Params {
#[prost(string, repeated, tag = "2")]
pub allow_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for Params {
const NAME: &'static str = "Params";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"ibc.applications.interchain_accounts.host.v1.{}",
Self::NAME
)
}
}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
impl ::prost::Name for QueryParamsRequest {
const NAME: &'static str = "QueryParamsRequest";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"ibc.applications.interchain_accounts.host.v1.{}",
Self::NAME
)
}
}
/// QueryParamsResponse is the response type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand All @@ -22,6 +42,16 @@ pub struct QueryParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for QueryParamsResponse {
const NAME: &'static str = "QueryParamsResponse";
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"ibc.applications.interchain_accounts.host.v1.{}",
Self::NAME
)
}
}
/// Generated client implementations.
#[cfg(feature = "grpc")]
pub mod query_client {
Expand Down
Loading

0 comments on commit 0b0e33c

Please sign in to comment.