Skip to content

Commit

Permalink
Bump tendermint-rs dependencies to v0.39
Browse files Browse the repository at this point in the history
Also regenerates protos.

This notably switches from sourcing the `google.protobuf` well-known
types from the `prost-types` crate and using `tendermint-proto`'s
definitions instead.
  • Loading branch information
tony-iqlusion committed Aug 8, 2024
1 parent eba698b commit c081135
Show file tree
Hide file tree
Showing 75 changed files with 1,917 additions and 446 deletions.
76 changes: 21 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ members = [
"cosmos-sdk-proto",
"cosmrs"
]

[patch.crates-io]
tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs" }
7 changes: 3 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.23.0"
version = "0.24.0-pre"
authors = [
"Justin Kilpatrick <justin@althea.net>",
"Greg Szabo <greg@informal.systems>",
Expand All @@ -17,15 +17,14 @@ rust-version = "1.72"

[dependencies]
prost = { version = "0.13", default-features = false }
prost-types = { version = "0.13", default-features = false }
tendermint-proto = "0.38"
tendermint-proto = "0.39"

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

[features]
default = ["grpc-transport"]
std = ["prost/std", "prost-types/std"]
std = ["prost/std", "tendermint-proto/std"]
grpc = ["std", "tonic"]
grpc-transport = ["grpc", "tonic/transport"]
cosmwasm = []
Expand Down
2 changes: 1 addition & 1 deletion cosmos-sdk-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pub mod traits;
mod type_names;

pub use prost;
pub use prost_types::{Any, Timestamp};
pub use tendermint_proto as tendermint;
pub use tendermint_proto::google::protobuf::{Any, Timestamp};

/// The version (commit hash) of the Cosmos SDK used when generating this library.
pub const COSMOS_SDK_VERSION: &str = include_str!("prost/cosmos-sdk/COSMOS_SDK_COMMIT");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @generated
/// Module is the module config object for the cosmos.app v1 app module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Module {}
// @@protoc_insertion_point(module)
9 changes: 8 additions & 1 deletion cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @generated
/// ModuleDescriptor describes an app module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModuleDescriptor {
/// go_import names the package that should be imported by an app to load the
Expand All @@ -24,6 +25,7 @@ pub struct ModuleDescriptor {
pub can_migrate_from: ::prost::alloc::vec::Vec<MigrateFromInfo>,
}
/// PackageReference is a reference to a protobuf package used by a module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PackageReference {
/// name is the fully-qualified name of the package.
Expand Down Expand Up @@ -69,6 +71,7 @@ pub struct PackageReference {
}
/// MigrateFromInfo is information on a module version that a newer module
/// can migrate from.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrateFromInfo {
/// module is the fully-qualified protobuf name of the module config object
Expand All @@ -83,13 +86,15 @@ pub struct MigrateFromInfo {
/// allow a mixture of declarative and imperative app wiring, however, apps
/// that strive for the maximum ease of maintainability should be able to describe
/// their state machine with a config object alone.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Config {
/// modules are the module configurations for the app.
#[prost(message, repeated, tag = "1")]
pub modules: ::prost::alloc::vec::Vec<ModuleConfig>,
}
/// ModuleConfig is a module configuration for an app.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModuleConfig {
/// name is the unique name of the module within the app. It should be a name
Expand All @@ -107,12 +112,14 @@ pub struct ModuleConfig {
/// config is the config object for the module. Module config messages should
/// define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension.
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<::prost_types::Any>,
pub config: ::core::option::Option<::tendermint_proto::google::protobuf::Any>,
}
/// QueryConfigRequest is the Query/Config request type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConfigRequest {}
/// QueryConfigRequest is the Query/Config response type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConfigResponse {
/// config is the current app config.
Expand Down
Loading

0 comments on commit c081135

Please sign in to comment.