Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade prost and tonic to latest and rebuild protos #7

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
318 changes: 233 additions & 85 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ members = ["althea_proto", "cosmos_sdk_proto", "gravity_proto", "proto_build"]
resolver = "2"

[workspace.dependencies]
prost = "0.12"
prost-build = "0.12"
prost-types = "0.12"
tonic = "0.10"
tonic-build = "0.10"
prost = "0.13"
prost-build = "0.13"
prost-types = "0.13"
tonic = "0.12"
tonic-build = "0.12"
log = "0.4"
env_logger = "0.10"
env_logger = "0.11"
4 changes: 2 additions & 2 deletions althea_proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "althea_proto"
version = "0.8.0"
version = "0.9.0"
description = "Protobuf stuct defintions for interacting with Althea Chain"
authors = ["Justin Kilpatrick <[email protected]>", "Christian Borst <[email protected]>"]
edition = "2021"
Expand All @@ -15,6 +15,6 @@ keywords = ["blockchain", "cosmos", "tendermint", "proto"]
[dependencies]
prost = {workspace = true}
prost-types = {workspace = true}
cosmos-sdk-proto = {package="cosmos-sdk-proto-althea", version="0.17", path = "../cosmos_sdk_proto", features = ["ethermint"]}
cosmos-sdk-proto = {package="cosmos-sdk-proto-althea", version="0.18", path = "../cosmos_sdk_proto", features = ["ethermint"]}
tonic = {workspace = true}

3 changes: 1 addition & 2 deletions althea_proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ pub mod ethermint {
}
}

/// note to future readers I have hand copied the RegisteredInterchainAccount file from ibc.applications.interchain_accounts.v1.rs which is compiled
/// but not checked in into gaia.icaauth.v1.rs
/// note to future readers I have hand copied these two files from the gravity_proto folder
pub mod althea_test {
pub mod gaia {
pub mod globalfee {
Expand Down
24 changes: 13 additions & 11 deletions althea_proto/src/prost/althea.gasfree.v1.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
// This file is @generated by prost-build.
/// Params struct
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
/// Messages with one of these types will not be charged gas fees in the
/// AnteHandler, but will later be charged some form of fee in the Msg handler
#[prost(string, repeated, tag = "1")]
pub gas_free_message_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[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<Params>,
}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
/// QueryParamsResponse is the response type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
/// params defines the parameters of the module.
Expand All @@ -27,7 +24,13 @@ pub struct QueryParamsResponse {
}
/// Generated client implementations.
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Query defines the gRPC querier service.
Expand All @@ -50,8 +53,8 @@ pub mod query_client {
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Expand All @@ -76,7 +79,7 @@ pub mod query_client {
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -123,8 +126,7 @@ pub mod query_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand Down
3 changes: 1 addition & 2 deletions althea_proto/src/prost/althea.lockup.v1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is @generated by prost-build.
/// Params struct
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
/// The lockup module is engaged if locked is true (chain is "locked up")
Expand All @@ -16,7 +16,6 @@ pub struct Params {
#[prost(string, repeated, tag = "4")]
pub locked_token_denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, optional, tag = "1")]
Expand Down
82 changes: 35 additions & 47 deletions althea_proto/src/prost/althea.microtx.v1.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// This file is @generated by prost-build.
/// Params struct
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(uint64, tag = "1")]
pub microtx_fee_basis_points: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
Expand All @@ -19,7 +18,6 @@ pub struct GenesisState {
/// RECEIVER The account receiving funds from sender
/// AMOUNTS The tokens and their quantities which should be transferred, these
/// must be Cosmos coins registered as ERC20s, or the Cosmos representation of ERC20s
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMicrotx {
#[prost(string, tag = "1")]
Expand All @@ -29,12 +27,10 @@ pub struct MsgMicrotx {
#[prost(message, optional, tag = "3")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgMicrotxResponse {}
/// A type for the block's event log, every successful Microtx must create one of
/// these in the event log
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMicrotx {
#[prost(string, tag = "1")]
Expand All @@ -48,7 +44,6 @@ pub struct EventMicrotx {
}
/// A type for the block's event log, Microtx fees may be collected out-of-band and so
/// this event may be emitted in an AnteHandler or during the Msg handler
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMicrotxFeeCollected {
#[prost(string, tag = "1")]
Expand All @@ -58,7 +53,6 @@ pub struct EventMicrotxFeeCollected {
}
/// A type for the block's event log recording when a Liquid Infrastructure account
/// has a received balance redirected to its registered LiquidInfrastructureNFT
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventBalanceRedirect {
#[prost(string, tag = "1")]
Expand All @@ -70,7 +64,6 @@ pub struct EventBalanceRedirect {
/// ACCOUNT The bech32 address of the liquid infrastructure account
/// OWNER The bech32 address of the account now in control of the liquid infrastructure
/// NFT_ADDRESS The EVM address of the token contract in control of the liquid infrastructure account's accrued profits
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LiquidInfrastructureAccount {
#[prost(string, tag = "1")]
Expand All @@ -86,22 +79,19 @@ pub struct LiquidInfrastructureAccount {
/// The liquid infrastructure account itself will be the initial owner of the NFT,
/// and must transfer control through the EVM NFT contract
/// SENDER The bech32 address of the account to liquify, must also be the signer of the message
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgLiquify {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
}
/// MsgLiquifyResponse potentially returns useful information from the liquification of an account
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgLiquifyResponse {
#[prost(message, optional, tag = "1")]
pub account: ::core::option::Option<LiquidInfrastructureAccount>,
}
/// A type for the block's event log, every successful MsgLiquify must create one of
/// these in the event log
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventAccountLiquified {
#[prost(string, tag = "1")]
Expand All @@ -111,7 +101,13 @@ pub struct EventAccountLiquified {
}
/// Generated client implementations.
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Msg defines the state transitions possible within microtx
Expand All @@ -134,8 +130,8 @@ pub mod msg_client {
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Expand All @@ -160,7 +156,7 @@ pub mod msg_client {
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -207,8 +203,7 @@ pub mod msg_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand All @@ -233,8 +228,7 @@ pub mod msg_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand All @@ -250,33 +244,27 @@ pub mod msg_client {
}
}
/// Query the current microtx params
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
/// Query the additional fee paid on MsgMicrotx, determined by governance
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryMicrotxFeeRequest {
#[prost(uint64, tag = "1")]
pub amount: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryMicrotxFeeResponse {
#[prost(uint64, tag = "1")]
pub fee_amount: u64,
}
/// Query the Liquid Infrastructure accounts known to the module
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryLiquidAccountsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidAccountsResponse {
#[prost(message, repeated, tag = "1")]
Expand All @@ -286,7 +274,6 @@ pub struct QueryLiquidAccountsResponse {
/// OWNER if a bech32 address is provided, potenitally many accounts will be returned
/// ACCOUNT if a bech32 address is provided, the owner and nft contract address will be returned
/// NFT if a EVM address is provided and happens to be a LiquidInfrastructureNFT contract, the owner and account will be returned
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidAccountRequest {
#[prost(string, tag = "1")]
Expand All @@ -296,15 +283,20 @@ pub struct QueryLiquidAccountRequest {
#[prost(string, tag = "3")]
pub nft: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidAccountResponse {
#[prost(message, repeated, tag = "1")]
pub accounts: ::prost::alloc::vec::Vec<LiquidInfrastructureAccount>,
}
/// Generated client implementations.
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Query defines the possible queries to make of the microtx module
Expand All @@ -327,8 +319,8 @@ pub mod query_client {
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Expand All @@ -353,7 +345,7 @@ pub mod query_client {
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -400,8 +392,7 @@ pub mod query_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand All @@ -426,8 +417,7 @@ pub mod query_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand All @@ -452,8 +442,7 @@ pub mod query_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand Down Expand Up @@ -483,8 +472,7 @@ pub mod query_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand Down
Loading
Loading