Skip to content

Commit 0b0e33c

Browse files
kent-3jstuczynpensoalexheretictony-iqlusion
authored
sync fork (#3)
* 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 <[email protected]> Co-authored-by: Fabien Penso <[email protected]> Co-authored-by: Alex Butler <[email protected]> Co-authored-by: Tony Arcieri (iqlusion) <[email protected]>
1 parent 2e969f1 commit 0b0e33c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2216
-157
lines changed

Cargo.lock

+98-65
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cosmos-sdk-proto/CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.21.1 (2024-03-15)
9+
### Removed
10+
- Deprecated `MessageExt` methods: missed from v0.21.0, technically a breaking
11+
change, but the just-published v0.21.0 release will be yanked ([#465])
12+
13+
[#465]: https://github.com/cosmos/cosmos-rust/pull/465
14+
15+
## 0.21.0 (2024-03-15) [YANKED]
16+
### Changed
17+
- Update `tonic` to v0.11 ([#460])
18+
- Bump `tendermint-proto` dependency to v0.35 ([#461])
19+
- Use `prost-build` to gen IBC `Name` impls ([#462])
20+
21+
[#460]: https://github.com/cosmos/cosmos-rust/pull/460
22+
[#461]: https://github.com/cosmos/cosmos-rust/pull/461
23+
[#462]: https://github.com/cosmos/cosmos-rust/pull/462
24+
825
## 0.20.0 (2023-10-03)
926
### Added
1027
- Expose `gov::v1` module ([#437])

cosmos-sdk-proto/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cosmos-sdk-proto"
3-
version = "0.20.0"
3+
version = "0.21.1"
44
authors = [
55
"Justin Kilpatrick <[email protected]>",
66
"Greg Szabo <[email protected]>",
@@ -16,12 +16,12 @@ edition = "2021"
1616
rust-version = "1.72"
1717

1818
[dependencies]
19-
prost = "0.12"
19+
prost = "0.12.3"
2020
prost-types = "0.12"
21-
tendermint-proto = "0.34"
21+
tendermint-proto = "0.35"
2222

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

2626
[features]
2727
default = ["grpc-transport"]

cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs

+21
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ pub struct BaseAccount {
1313
#[prost(uint64, tag = "4")]
1414
pub sequence: u64,
1515
}
16+
impl ::prost::Name for BaseAccount {
17+
const NAME: &'static str = "BaseAccount";
18+
const PACKAGE: &'static str = "cosmos.auth.v1beta1";
19+
fn full_name() -> ::prost::alloc::string::String {
20+
::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME)
21+
}
22+
}
1623
/// ModuleAccount defines an account for modules that holds coins on a pool.
1724
#[allow(clippy::derive_partial_eq_without_eq)]
1825
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -24,6 +31,13 @@ pub struct ModuleAccount {
2431
#[prost(string, repeated, tag = "3")]
2532
pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2633
}
34+
impl ::prost::Name for ModuleAccount {
35+
const NAME: &'static str = "ModuleAccount";
36+
const PACKAGE: &'static str = "cosmos.auth.v1beta1";
37+
fn full_name() -> ::prost::alloc::string::String {
38+
::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME)
39+
}
40+
}
2741
/// Params defines the parameters for the auth module.
2842
#[allow(clippy::derive_partial_eq_without_eq)]
2943
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -39,3 +53,10 @@ pub struct Params {
3953
#[prost(uint64, tag = "5")]
4054
pub sig_verify_cost_secp256k1: u64,
4155
}
56+
impl ::prost::Name for Params {
57+
const NAME: &'static str = "Params";
58+
const PACKAGE: &'static str = "cosmos.auth.v1beta1";
59+
fn full_name() -> ::prost::alloc::string::String {
60+
::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME)
61+
}
62+
}

cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs

+14
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ pub struct PageRequest {
2929
#[prost(bool, tag = "4")]
3030
pub count_total: bool,
3131
}
32+
impl ::prost::Name for PageRequest {
33+
const NAME: &'static str = "PageRequest";
34+
const PACKAGE: &'static str = "cosmos.base.query.v1beta1";
35+
fn full_name() -> ::prost::alloc::string::String {
36+
::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME)
37+
}
38+
}
3239
/// PageResponse is to be embedded in gRPC response messages where the
3340
/// corresponding request message has used PageRequest.
3441
///
@@ -48,3 +55,10 @@ pub struct PageResponse {
4855
#[prost(uint64, tag = "2")]
4956
pub total: u64,
5057
}
58+
impl ::prost::Name for PageResponse {
59+
const NAME: &'static str = "PageResponse";
60+
const PACKAGE: &'static str = "cosmos.base.query.v1beta1";
61+
fn full_name() -> ::prost::alloc::string::String {
62+
::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME)
63+
}
64+
}

cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs

+28
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ pub struct Coin {
1010
#[prost(string, tag = "2")]
1111
pub amount: ::prost::alloc::string::String,
1212
}
13+
impl ::prost::Name for Coin {
14+
const NAME: &'static str = "Coin";
15+
const PACKAGE: &'static str = "cosmos.base.v1beta1";
16+
fn full_name() -> ::prost::alloc::string::String {
17+
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
18+
}
19+
}
1320
/// DecCoin defines a token with a denomination and a decimal amount.
1421
///
1522
/// NOTE: The amount field is an Dec which implements the custom method
@@ -22,17 +29,38 @@ pub struct DecCoin {
2229
#[prost(string, tag = "2")]
2330
pub amount: ::prost::alloc::string::String,
2431
}
32+
impl ::prost::Name for DecCoin {
33+
const NAME: &'static str = "DecCoin";
34+
const PACKAGE: &'static str = "cosmos.base.v1beta1";
35+
fn full_name() -> ::prost::alloc::string::String {
36+
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
37+
}
38+
}
2539
/// IntProto defines a Protobuf wrapper around an Int object.
2640
#[allow(clippy::derive_partial_eq_without_eq)]
2741
#[derive(Clone, PartialEq, ::prost::Message)]
2842
pub struct IntProto {
2943
#[prost(string, tag = "1")]
3044
pub int: ::prost::alloc::string::String,
3145
}
46+
impl ::prost::Name for IntProto {
47+
const NAME: &'static str = "IntProto";
48+
const PACKAGE: &'static str = "cosmos.base.v1beta1";
49+
fn full_name() -> ::prost::alloc::string::String {
50+
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
51+
}
52+
}
3253
/// DecProto defines a Protobuf wrapper around a Dec object.
3354
#[allow(clippy::derive_partial_eq_without_eq)]
3455
#[derive(Clone, PartialEq, ::prost::Message)]
3556
pub struct DecProto {
3657
#[prost(string, tag = "1")]
3758
pub dec: ::prost::alloc::string::String,
3859
}
60+
impl ::prost::Name for DecProto {
61+
const NAME: &'static str = "DecProto";
62+
const PACKAGE: &'static str = "cosmos.base.v1beta1";
63+
fn full_name() -> ::prost::alloc::string::String {
64+
::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME)
65+
}
66+
}

cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs

+21
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ pub struct Plan {
2424
#[prost(string, tag = "4")]
2525
pub info: ::prost::alloc::string::String,
2626
}
27+
impl ::prost::Name for Plan {
28+
const NAME: &'static str = "Plan";
29+
const PACKAGE: &'static str = "cosmos.upgrade.v1beta1";
30+
fn full_name() -> ::prost::alloc::string::String {
31+
::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME)
32+
}
33+
}
2734
/// SoftwareUpgradeProposal is a gov Content type for initiating a software
2835
/// upgrade.
2936
#[allow(clippy::derive_partial_eq_without_eq)]
@@ -36,6 +43,13 @@ pub struct SoftwareUpgradeProposal {
3643
#[prost(message, optional, tag = "3")]
3744
pub plan: ::core::option::Option<Plan>,
3845
}
46+
impl ::prost::Name for SoftwareUpgradeProposal {
47+
const NAME: &'static str = "SoftwareUpgradeProposal";
48+
const PACKAGE: &'static str = "cosmos.upgrade.v1beta1";
49+
fn full_name() -> ::prost::alloc::string::String {
50+
::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME)
51+
}
52+
}
3953
/// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
4054
/// upgrade.
4155
#[allow(clippy::derive_partial_eq_without_eq)]
@@ -46,3 +60,10 @@ pub struct CancelSoftwareUpgradeProposal {
4660
#[prost(string, tag = "2")]
4761
pub description: ::prost::alloc::string::String,
4862
}
63+
impl ::prost::Name for CancelSoftwareUpgradeProposal {
64+
const NAME: &'static str = "CancelSoftwareUpgradeProposal";
65+
const PACKAGE: &'static str = "cosmos.upgrade.v1beta1";
66+
fn full_name() -> ::prost::alloc::string::String {
67+
::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME)
68+
}
69+
}

cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs

+30
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,30 @@ pub struct Params {
77
#[prost(bool, tag = "1")]
88
pub controller_enabled: bool,
99
}
10+
impl ::prost::Name for Params {
11+
const NAME: &'static str = "Params";
12+
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
13+
fn full_name() -> ::prost::alloc::string::String {
14+
::prost::alloc::format!(
15+
"ibc.applications.interchain_accounts.controller.v1.{}",
16+
Self::NAME
17+
)
18+
}
19+
}
1020
/// QueryParamsRequest is the request type for the Query/Params RPC method.
1121
#[allow(clippy::derive_partial_eq_without_eq)]
1222
#[derive(Clone, PartialEq, ::prost::Message)]
1323
pub struct QueryParamsRequest {}
24+
impl ::prost::Name for QueryParamsRequest {
25+
const NAME: &'static str = "QueryParamsRequest";
26+
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
27+
fn full_name() -> ::prost::alloc::string::String {
28+
::prost::alloc::format!(
29+
"ibc.applications.interchain_accounts.controller.v1.{}",
30+
Self::NAME
31+
)
32+
}
33+
}
1434
/// QueryParamsResponse is the response type for the Query/Params RPC method.
1535
#[allow(clippy::derive_partial_eq_without_eq)]
1636
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -19,6 +39,16 @@ pub struct QueryParamsResponse {
1939
#[prost(message, optional, tag = "1")]
2040
pub params: ::core::option::Option<Params>,
2141
}
42+
impl ::prost::Name for QueryParamsResponse {
43+
const NAME: &'static str = "QueryParamsResponse";
44+
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1";
45+
fn full_name() -> ::prost::alloc::string::String {
46+
::prost::alloc::format!(
47+
"ibc.applications.interchain_accounts.controller.v1.{}",
48+
Self::NAME
49+
)
50+
}
51+
}
2252
/// Generated client implementations.
2353
#[cfg(feature = "grpc")]
2454
pub mod query_client {

cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs

+30
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,30 @@ pub struct Params {
1010
#[prost(string, repeated, tag = "2")]
1111
pub allow_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1212
}
13+
impl ::prost::Name for Params {
14+
const NAME: &'static str = "Params";
15+
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1";
16+
fn full_name() -> ::prost::alloc::string::String {
17+
::prost::alloc::format!(
18+
"ibc.applications.interchain_accounts.host.v1.{}",
19+
Self::NAME
20+
)
21+
}
22+
}
1323
/// QueryParamsRequest is the request type for the Query/Params RPC method.
1424
#[allow(clippy::derive_partial_eq_without_eq)]
1525
#[derive(Clone, PartialEq, ::prost::Message)]
1626
pub struct QueryParamsRequest {}
27+
impl ::prost::Name for QueryParamsRequest {
28+
const NAME: &'static str = "QueryParamsRequest";
29+
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1";
30+
fn full_name() -> ::prost::alloc::string::String {
31+
::prost::alloc::format!(
32+
"ibc.applications.interchain_accounts.host.v1.{}",
33+
Self::NAME
34+
)
35+
}
36+
}
1737
/// QueryParamsResponse is the response type for the Query/Params RPC method.
1838
#[allow(clippy::derive_partial_eq_without_eq)]
1939
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -22,6 +42,16 @@ pub struct QueryParamsResponse {
2242
#[prost(message, optional, tag = "1")]
2343
pub params: ::core::option::Option<Params>,
2444
}
45+
impl ::prost::Name for QueryParamsResponse {
46+
const NAME: &'static str = "QueryParamsResponse";
47+
const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1";
48+
fn full_name() -> ::prost::alloc::string::String {
49+
::prost::alloc::format!(
50+
"ibc.applications.interchain_accounts.host.v1.{}",
51+
Self::NAME
52+
)
53+
}
54+
}
2555
/// Generated client implementations.
2656
#[cfg(feature = "grpc")]
2757
pub mod query_client {

0 commit comments

Comments
 (0)