diff --git a/proto/src/prelude.rs b/proto/src/prelude.rs index 593052fb..868fffd2 100644 --- a/proto/src/prelude.rs +++ b/proto/src/prelude.rs @@ -1,12 +1,13 @@ // Re-export according to alloc::prelude::v1 because it is not yet stabilized // https://doc.rust-lang.org/src/alloc/prelude/v1.rs.html -#[allow(unused_imports)] -pub use alloc::vec; +#![allow(unused_imports)] + pub use alloc::{ borrow::ToOwned, format, string::{String, ToString}, + vec, vec::Vec, }; pub use core::prelude::v1::*; diff --git a/proto/src/prost/cometbft.abci.v1.rs b/proto/src/prost/cometbft.abci.v1.rs index 3014ab1f..4ed73bc2 100644 --- a/proto/src/prost/cometbft.abci.v1.rs +++ b/proto/src/prost/cometbft.abci.v1.rs @@ -1,4 +1,5 @@ /// Request represents a request to the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { @@ -12,6 +13,7 @@ pub struct Request { /// Nested message and enum types in `Request`. pub mod request { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -50,6 +52,7 @@ pub mod request { } } /// EchoRequest is a request to "echo" the given string. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EchoRequest { @@ -57,10 +60,12 @@ pub struct EchoRequest { pub message: ::prost::alloc::string::String, } /// FlushRequest is a request to flush the write buffer. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FlushRequest {} /// InfoRequest is a request for the ABCI application version. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InfoRequest { @@ -74,6 +79,7 @@ pub struct InfoRequest { pub abci_version: ::prost::alloc::string::String, } /// InitChainRequest is a request to initialize the blockchain. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InitChainRequest { @@ -93,6 +99,7 @@ pub struct InitChainRequest { pub initial_height: i64, } /// QueryRequest is a request to query the application state. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRequest { @@ -106,6 +113,7 @@ pub struct QueryRequest { pub prove: bool, } /// CheckTxRequest is a request to check that the transaction is valid. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckTxRequest { @@ -115,14 +123,17 @@ pub struct CheckTxRequest { pub r#type: i32, } /// CommitRequest is a request to commit the pending application state. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitRequest {} /// Request to list available snapshots. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsRequest {} /// Request offering a snapshot to the application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OfferSnapshotRequest { @@ -134,6 +145,7 @@ pub struct OfferSnapshotRequest { pub app_hash: ::prost::bytes::Bytes, } /// Request to load a snapshot chunk. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LoadSnapshotChunkRequest { @@ -145,6 +157,7 @@ pub struct LoadSnapshotChunkRequest { pub chunk: u32, } /// Request to apply a snapshot chunk. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ApplySnapshotChunkRequest { @@ -157,6 +170,7 @@ pub struct ApplySnapshotChunkRequest { } /// PrepareProposalRequest is a request for the ABCI application to prepare a new /// block proposal. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrepareProposalRequest { @@ -183,6 +197,7 @@ pub struct PrepareProposalRequest { } /// ProcessProposalRequest is a request for the ABCI application to process a proposal /// received from another validator. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProcessProposalRequest { @@ -206,6 +221,7 @@ pub struct ProcessProposalRequest { pub proposer_address: ::prost::bytes::Bytes, } /// ExtendVoteRequest extends a precommit vote with application-injected data. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendVoteRequest { @@ -232,6 +248,7 @@ pub struct ExtendVoteRequest { } /// VerifyVoteExtensionRequest is a request for the application to verify a vote extension /// produced by a different validator. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VerifyVoteExtensionRequest { @@ -247,6 +264,7 @@ pub struct VerifyVoteExtensionRequest { pub vote_extension: ::prost::bytes::Bytes, } /// FinalizeBlockRequest is a request to finalize the block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FinalizeBlockRequest { @@ -270,6 +288,7 @@ pub struct FinalizeBlockRequest { pub proposer_address: ::prost::bytes::Bytes, } /// Response represents a response from the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { @@ -283,6 +302,7 @@ pub struct Response { /// Nested message and enum types in `Response`. pub mod response { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -323,6 +343,7 @@ pub mod response { } } /// nondeterministic +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExceptionResponse { @@ -330,6 +351,7 @@ pub struct ExceptionResponse { pub error: ::prost::alloc::string::String, } /// EchoResponse indicates that the connection is still alive. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EchoResponse { @@ -337,11 +359,13 @@ pub struct EchoResponse { pub message: ::prost::alloc::string::String, } /// FlushResponse indicates that the write buffer was flushed. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FlushResponse {} /// InfoResponse contains the ABCI application version information. #[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InfoResponse { @@ -364,6 +388,7 @@ pub struct InfoResponse { } /// InitChainResponse contains the ABCI application's hash and updates to the /// validator set and/or the consensus params, if any. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InitChainResponse { @@ -377,6 +402,7 @@ pub struct InitChainResponse { pub app_hash: ::prost::bytes::Bytes, } /// QueryResponse contains the ABCI application data along with a proof. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryResponse { @@ -405,6 +431,7 @@ pub struct QueryResponse { } /// CheckTxResponse shows if the transaction was deemed valid by the ABCI /// application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckTxResponse { @@ -428,6 +455,7 @@ pub struct CheckTxResponse { pub codespace: ::prost::alloc::string::String, } /// CommitResponse indicates how much blocks should CometBFT retain. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitResponse { @@ -435,6 +463,7 @@ pub struct CommitResponse { pub retain_height: i64, } /// ListSnapshotsResponse contains the list of snapshots. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsResponse { @@ -443,6 +472,7 @@ pub struct ListSnapshotsResponse { } /// OfferSnapshotResponse indicates the ABCI application decision whenever to /// provide a snapshot to the requester or not. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OfferSnapshotResponse { @@ -450,6 +480,7 @@ pub struct OfferSnapshotResponse { pub result: i32, } /// LoadSnapshotChunkResponse returns a snapshot's chunk. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LoadSnapshotChunkResponse { @@ -457,6 +488,7 @@ pub struct LoadSnapshotChunkResponse { pub chunk: ::prost::bytes::Bytes, } /// ApplySnapshotChunkResponse returns a result of applying the specified chunk. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ApplySnapshotChunkResponse { @@ -470,6 +502,7 @@ pub struct ApplySnapshotChunkResponse { pub reject_senders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// PrepareProposalResponse contains a list of transactions, which will form a block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrepareProposalResponse { @@ -478,6 +511,7 @@ pub struct PrepareProposalResponse { } /// ProcessProposalResponse indicates the ABCI application's decision whenever /// the given proposal should be accepted or not. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProcessProposalResponse { @@ -486,6 +520,7 @@ pub struct ProcessProposalResponse { } /// ExtendVoteResponse contains the vote extension that the application would like to /// attach to its next precommit vote. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendVoteResponse { @@ -494,6 +529,7 @@ pub struct ExtendVoteResponse { } /// VerifyVoteExtensionResponse indicates the ABCI application's decision /// whenever the vote extension should be accepted or not. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VerifyVoteExtensionResponse { @@ -501,6 +537,7 @@ pub struct VerifyVoteExtensionResponse { pub status: i32, } /// FinalizeBlockResponse contains the result of executing the block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FinalizeBlockResponse { @@ -527,6 +564,7 @@ pub struct FinalizeBlockResponse { pub app_hash: ::prost::bytes::Bytes, } /// CommitInfo contains votes for the particular round. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitInfo { @@ -538,6 +576,7 @@ pub struct CommitInfo { /// ExtendedCommitInfo is similar to CommitInfo except that it is only used in /// the PrepareProposal request such that Tendermint can provide vote extensions /// to the application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendedCommitInfo { @@ -554,6 +593,7 @@ pub struct ExtendedCommitInfo { /// Up to 0.37, this could also be used in ResponseBeginBlock, ResponseEndBlock, /// and ResponseDeliverTx. /// Later, transactions may be queried using these events. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Event { @@ -563,6 +603,7 @@ pub struct Event { pub attributes: ::prost::alloc::vec::Vec, } /// EventAttribute is a single key-value pair, associated with an event. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventAttribute { @@ -577,6 +618,7 @@ pub struct EventAttribute { /// ExecTxResult contains results of executing one individual transaction. /// /// * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecTxResult { @@ -603,6 +645,7 @@ pub struct ExecTxResult { /// TxResult contains results of executing the transaction. /// /// One usage is indexing transaction results. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxResult { @@ -616,6 +659,7 @@ pub struct TxResult { pub result: ::core::option::Option, } /// Validator in the validator set. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validator { @@ -629,6 +673,7 @@ pub struct Validator { pub power: i64, } /// ValidatorUpdate is a singular update to a validator set. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorUpdate { @@ -638,6 +683,7 @@ pub struct ValidatorUpdate { pub power: i64, } /// VoteInfo contains the information about the vote. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VoteInfo { @@ -647,6 +693,7 @@ pub struct VoteInfo { pub block_id_flag: i32, } /// ExtendedVoteInfo extends VoteInfo with the vote extentions (non-deterministic). +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendedVoteInfo { @@ -664,6 +711,7 @@ pub struct ExtendedVoteInfo { pub block_id_flag: i32, } /// Misbehavior is a type of misbehavior committed by a validator. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Misbehavior { @@ -685,6 +733,7 @@ pub struct Misbehavior { pub total_voting_power: i64, } /// Snapshot of the ABCI application state. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Snapshot { @@ -709,6 +758,7 @@ pub struct Snapshot { /// This enumeration is incompatible with the CheckTxType definition in /// cometbft.abci.v1beta1 and therefore shall not be used in encoding with the same /// field number. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum CheckTxType { @@ -742,6 +792,7 @@ impl CheckTxType { } } /// The result of offering a snapshot. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum OfferSnapshotResult { @@ -787,6 +838,7 @@ impl OfferSnapshotResult { } } /// The result of applying a snapshot chunk. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ApplySnapshotChunkResult { @@ -836,6 +888,7 @@ impl ApplySnapshotChunkResult { } } /// ProcessProposalStatus is the status of the proposal processing. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ProcessProposalStatus { @@ -869,6 +922,7 @@ impl ProcessProposalStatus { } } /// VerifyVoteExtensionStatus is the status of the vote extension verification. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum VerifyVoteExtensionStatus { @@ -905,6 +959,7 @@ impl VerifyVoteExtensionStatus { } } /// The type of misbehavior committed by a validator. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum MisbehaviorType { diff --git a/proto/src/prost/cometbft.abci.v1beta1.rs b/proto/src/prost/cometbft.abci.v1beta1.rs index 7ae3f835..95204f84 100644 --- a/proto/src/prost/cometbft.abci.v1beta1.rs +++ b/proto/src/prost/cometbft.abci.v1beta1.rs @@ -1,4 +1,5 @@ /// Request represents a request to the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { @@ -12,6 +13,7 @@ pub struct Request { /// Nested message and enum types in `Request`. pub mod request { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -48,6 +50,7 @@ pub mod request { } } /// RequestEcho is a request to "echo" the given string. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestEcho { @@ -55,10 +58,12 @@ pub struct RequestEcho { pub message: ::prost::alloc::string::String, } /// RequestFlush is a request to flush the write buffer. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestFlush {} /// RequestInfo is a request for the ABCI application version. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestInfo { @@ -70,6 +75,7 @@ pub struct RequestInfo { pub p2p_version: u64, } /// nondeterministic +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestSetOption { @@ -79,6 +85,7 @@ pub struct RequestSetOption { pub value: ::prost::alloc::string::String, } /// RequestInitChain is a request to initialize the blockchain. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestInitChain { @@ -96,6 +103,7 @@ pub struct RequestInitChain { pub initial_height: i64, } /// RequestQuery is a request to query the application state. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestQuery { @@ -109,6 +117,7 @@ pub struct RequestQuery { pub prove: bool, } /// RequestBeginBlock indicates the beginning of commiting the block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestBeginBlock { @@ -122,6 +131,7 @@ pub struct RequestBeginBlock { pub byzantine_validators: ::prost::alloc::vec::Vec, } /// RequestCheckTx is a request to check the transaction. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestCheckTx { @@ -131,6 +141,7 @@ pub struct RequestCheckTx { pub r#type: i32, } /// RequestDeliverTx is a request to apply the transaction. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestDeliverTx { @@ -138,6 +149,7 @@ pub struct RequestDeliverTx { pub tx: ::prost::bytes::Bytes, } /// RequestEndBlock indicates the end of committing the block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestEndBlock { @@ -145,14 +157,17 @@ pub struct RequestEndBlock { pub height: i64, } /// RequestCommit is a request to commit the pending application state. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestCommit {} /// lists available snapshots +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestListSnapshots {} /// offers a snapshot to the application +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestOfferSnapshot { @@ -164,6 +179,7 @@ pub struct RequestOfferSnapshot { pub app_hash: ::prost::bytes::Bytes, } /// loads a snapshot chunk +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestLoadSnapshotChunk { @@ -175,6 +191,7 @@ pub struct RequestLoadSnapshotChunk { pub chunk: u32, } /// Applies a snapshot chunk +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestApplySnapshotChunk { @@ -186,6 +203,7 @@ pub struct RequestApplySnapshotChunk { pub sender: ::prost::alloc::string::String, } /// Response represents a response from the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { @@ -199,6 +217,7 @@ pub struct Response { /// Nested message and enum types in `Response`. pub mod response { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -237,6 +256,7 @@ pub mod response { } } /// nondeterministic +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseException { @@ -244,6 +264,7 @@ pub struct ResponseException { pub error: ::prost::alloc::string::String, } /// ResponseEcho indicates that the connection is still alive. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseEcho { @@ -251,11 +272,13 @@ pub struct ResponseEcho { pub message: ::prost::alloc::string::String, } /// ResponseFlush indicates that the ABCI application state was flushed? +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseFlush {} /// ResponseInfo contains the ABCI application version information. #[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseInfo { @@ -277,6 +300,7 @@ pub struct ResponseInfo { pub last_block_app_hash: ::prost::bytes::Bytes, } /// nondeterministic +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseSetOption { @@ -290,6 +314,7 @@ pub struct ResponseSetOption { } /// ResponseInitChain contains the ABCI application's hash and updates to the /// validator set and/or the consensus params, if any. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseInitChain { @@ -301,6 +326,7 @@ pub struct ResponseInitChain { pub app_hash: ::prost::bytes::Bytes, } /// ResponseQuery contains the ABCI application data along with a proof. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseQuery { @@ -328,6 +354,7 @@ pub struct ResponseQuery { pub codespace: ::prost::alloc::string::String, } /// ResponseBeginBlock contains a list of block-level events. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseBeginBlock { @@ -336,6 +363,7 @@ pub struct ResponseBeginBlock { } /// ResponseCheckTx shows if the transaction was deemed valid by the ABCI /// application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseCheckTx { @@ -368,6 +396,7 @@ pub struct ResponseCheckTx { } /// ResponseDeliverTx contains a result of committing the given transaction and a /// list of events. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseDeliverTx { @@ -392,6 +421,7 @@ pub struct ResponseDeliverTx { pub codespace: ::prost::alloc::string::String, } /// ResponseEndBlock contains updates to consensus params and/or validator set changes, if any. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseEndBlock { @@ -403,6 +433,7 @@ pub struct ResponseEndBlock { pub events: ::prost::alloc::vec::Vec, } /// ResponseCommit indicates how much blocks should CometBFT retain. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseCommit { @@ -413,6 +444,7 @@ pub struct ResponseCommit { pub retain_height: i64, } /// ResponseListSnapshots contains the list of snapshots. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseListSnapshots { @@ -421,6 +453,7 @@ pub struct ResponseListSnapshots { } /// ResponseOfferSnapshot indicates the ABCI application decision whenever to /// provide a snapshot to the requester or not. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseOfferSnapshot { @@ -430,6 +463,7 @@ pub struct ResponseOfferSnapshot { /// Nested message and enum types in `ResponseOfferSnapshot`. pub mod response_offer_snapshot { /// The status code. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[derive( Clone, Copy, @@ -486,6 +520,7 @@ pub mod response_offer_snapshot { } } /// ResponseLoadSnapshotChunk returns a snapshot's chunk. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseLoadSnapshotChunk { @@ -493,6 +528,7 @@ pub struct ResponseLoadSnapshotChunk { pub chunk: ::prost::bytes::Bytes, } /// ResponseApplySnapshotChunk returns a result of applying the specified chunk. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseApplySnapshotChunk { @@ -508,6 +544,7 @@ pub struct ResponseApplySnapshotChunk { /// Nested message and enum types in `ResponseApplySnapshotChunk`. pub mod response_apply_snapshot_chunk { /// The status code. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[derive( Clone, Copy, @@ -565,6 +602,7 @@ pub mod response_apply_snapshot_chunk { } /// ConsensusParams contains all consensus-relevant parameters /// that can be adjusted by the abci app +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConsensusParams { @@ -578,6 +616,7 @@ pub struct ConsensusParams { pub version: ::core::option::Option, } /// BlockParams contains limits on the block size. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockParams { @@ -589,6 +628,7 @@ pub struct BlockParams { pub max_gas: i64, } /// LastCommitInfo contains votes for the particular round. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LastCommitInfo { @@ -600,6 +640,7 @@ pub struct LastCommitInfo { /// Event allows application developers to attach additional information to /// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. /// Later, transactions may be queried using these events. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Event { @@ -609,6 +650,7 @@ pub struct Event { pub attributes: ::prost::alloc::vec::Vec, } /// EventAttribute is a single key-value pair, associated with an event. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventAttribute { @@ -623,6 +665,7 @@ pub struct EventAttribute { /// TxResult contains results of executing the transaction. /// /// One usage is indexing transaction results. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxResult { @@ -636,6 +679,7 @@ pub struct TxResult { pub result: ::core::option::Option, } /// Validator in the validator set. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validator { @@ -649,6 +693,7 @@ pub struct Validator { pub power: i64, } /// ValidatorUpdate is a singular update to a validator set. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorUpdate { @@ -658,6 +703,7 @@ pub struct ValidatorUpdate { pub power: i64, } /// VoteInfo contains the information about the vote. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VoteInfo { @@ -667,6 +713,7 @@ pub struct VoteInfo { pub signed_last_block: bool, } /// Evidence of a misbehavior committed by a validator. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Evidence { @@ -688,6 +735,7 @@ pub struct Evidence { pub total_voting_power: i64, } /// Snapshot of the ABCI application state. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Snapshot { @@ -708,6 +756,7 @@ pub struct Snapshot { pub metadata: ::prost::bytes::Bytes, } /// Type of the transaction check request. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum CheckTxType { @@ -737,6 +786,7 @@ impl CheckTxType { } } /// The type of evidence. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum EvidenceType { diff --git a/proto/src/prost/cometbft.abci.v1beta2.rs b/proto/src/prost/cometbft.abci.v1beta2.rs index acf9cb1b..5bea5fbe 100644 --- a/proto/src/prost/cometbft.abci.v1beta2.rs +++ b/proto/src/prost/cometbft.abci.v1beta2.rs @@ -1,4 +1,5 @@ /// Request represents a request to the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { @@ -12,6 +13,7 @@ pub struct Request { /// Nested message and enum types in `Request`. pub mod request { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -50,6 +52,7 @@ pub mod request { } } /// RequestInfo is a request for the ABCI application version. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestInfo { @@ -63,6 +66,7 @@ pub struct RequestInfo { pub abci_version: ::prost::alloc::string::String, } /// RequestInitChain is a request to initialize the blockchain. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestInitChain { @@ -82,6 +86,7 @@ pub struct RequestInitChain { pub initial_height: i64, } /// RequestBeginBlock indicates the beginning of commiting the block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestBeginBlock { @@ -96,6 +101,7 @@ pub struct RequestBeginBlock { } /// RequestPrepareProposal is a request for the ABCI application to prepare a new /// block proposal. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestPrepareProposal { @@ -121,6 +127,7 @@ pub struct RequestPrepareProposal { pub proposer_address: ::prost::bytes::Bytes, } /// RequestProcessProposal is a request for the ABCI application to process proposal. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestProcessProposal { @@ -144,6 +151,7 @@ pub struct RequestProcessProposal { pub proposer_address: ::prost::bytes::Bytes, } /// Response represents a response from the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { @@ -157,6 +165,7 @@ pub struct Response { /// Nested message and enum types in `Response`. pub mod response { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -198,6 +207,7 @@ pub mod response { } /// ResponseInitChain contains the ABCI application's hash and updates to the /// validator set and/or the consensus params, if any. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseInitChain { @@ -211,6 +221,7 @@ pub struct ResponseInitChain { pub app_hash: ::prost::bytes::Bytes, } /// ResponseBeginBlock contains a list of block-level events. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseBeginBlock { @@ -219,6 +230,7 @@ pub struct ResponseBeginBlock { } /// ResponseCheckTx shows if the transaction was deemed valid by the ABCI /// application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseCheckTx { @@ -251,6 +263,7 @@ pub struct ResponseCheckTx { } /// ResponseDeliverTx contains a result of committing the given transaction and a /// list of events. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseDeliverTx { @@ -275,6 +288,7 @@ pub struct ResponseDeliverTx { pub codespace: ::prost::alloc::string::String, } /// ResponseEndBlock contains updates to consensus params and/or validator set changes, if any. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseEndBlock { @@ -288,6 +302,7 @@ pub struct ResponseEndBlock { pub events: ::prost::alloc::vec::Vec, } /// ResponsePrepareProposal contains the list of transactions that will be included in the proposal. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponsePrepareProposal { @@ -295,6 +310,7 @@ pub struct ResponsePrepareProposal { pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, } /// ResponseProcessProposal contains the result of processing a proposal. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseProcessProposal { @@ -304,6 +320,7 @@ pub struct ResponseProcessProposal { /// Nested message and enum types in `ResponseProcessProposal`. pub mod response_process_proposal { /// The status. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[derive( Clone, Copy, @@ -348,6 +365,7 @@ pub mod response_process_proposal { } } /// CommitInfo contains votes for the particular round. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitInfo { @@ -359,6 +377,7 @@ pub struct CommitInfo { /// ExtendedCommitInfo is similar to CommitInfo except that it is only used in /// the PrepareProposal request such that Tendermint can provide vote extensions /// to the application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendedCommitInfo { @@ -375,6 +394,7 @@ pub struct ExtendedCommitInfo { /// Up to 0.37, this could also be used in ResponseBeginBlock, ResponseEndBlock, /// and ResponseDeliverTx. /// Later, transactions may be queried using these events. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Event { @@ -384,6 +404,7 @@ pub struct Event { pub attributes: ::prost::alloc::vec::Vec, } /// EventAttribute is a single key-value pair, associated with an event. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventAttribute { @@ -396,6 +417,7 @@ pub struct EventAttribute { pub index: bool, } /// ExtendedVoteInfo extends VoteInfo with the vote extentions (non-deterministic). +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendedVoteInfo { @@ -410,6 +432,7 @@ pub struct ExtendedVoteInfo { pub vote_extension: ::prost::bytes::Bytes, } /// Misbehavior is a type of misbehavior committed by a validator. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Misbehavior { @@ -431,6 +454,7 @@ pub struct Misbehavior { pub total_voting_power: i64, } /// The type of misbehavior committed by a validator. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum MisbehaviorType { diff --git a/proto/src/prost/cometbft.abci.v1beta3.rs b/proto/src/prost/cometbft.abci.v1beta3.rs index 9d6f4a0d..c65f6a16 100644 --- a/proto/src/prost/cometbft.abci.v1beta3.rs +++ b/proto/src/prost/cometbft.abci.v1beta3.rs @@ -1,4 +1,5 @@ /// Request represents a request to the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { @@ -12,6 +13,7 @@ pub struct Request { /// Nested message and enum types in `Request`. pub mod request { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -50,6 +52,7 @@ pub mod request { } } /// RequestInitChain is a request to initialize the blockchain. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestInitChain { @@ -70,6 +73,7 @@ pub struct RequestInitChain { } /// RequestPrepareProposal is a request for the ABCI application to prepare a new /// block proposal. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestPrepareProposal { @@ -95,6 +99,7 @@ pub struct RequestPrepareProposal { pub proposer_address: ::prost::bytes::Bytes, } /// RequestProcessProposal is a request for the ABCI application to process proposal. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestProcessProposal { @@ -118,6 +123,7 @@ pub struct RequestProcessProposal { pub proposer_address: ::prost::bytes::Bytes, } /// Extends a vote with application-injected data +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestExtendVote { @@ -143,6 +149,7 @@ pub struct RequestExtendVote { pub proposer_address: ::prost::bytes::Bytes, } /// Verify the vote extension +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestVerifyVoteExtension { @@ -158,6 +165,7 @@ pub struct RequestVerifyVoteExtension { pub vote_extension: ::prost::bytes::Bytes, } /// RequestFinalizeBlock is a request to finalize the block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestFinalizeBlock { @@ -181,6 +189,7 @@ pub struct RequestFinalizeBlock { pub proposer_address: ::prost::bytes::Bytes, } /// Response represents a response from the ABCI application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { @@ -194,6 +203,7 @@ pub struct Response { /// Nested message and enum types in `Response`. pub mod response { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { @@ -235,6 +245,7 @@ pub mod response { } /// ResponseInitChain contains the ABCI application's hash and updates to the /// validator set and/or the consensus params, if any. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseInitChain { @@ -249,6 +260,7 @@ pub struct ResponseInitChain { } /// ResponseCheckTx shows if the transaction was deemed valid by the ABCI /// application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseCheckTx { @@ -272,6 +284,7 @@ pub struct ResponseCheckTx { pub codespace: ::prost::alloc::string::String, } /// ResponseCommit indicates how much blocks should CometBFT retain. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseCommit { @@ -279,6 +292,7 @@ pub struct ResponseCommit { pub retain_height: i64, } /// ResponseExtendVote is the result of extending a vote with application-injected data. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseExtendVote { @@ -286,6 +300,7 @@ pub struct ResponseExtendVote { pub vote_extension: ::prost::bytes::Bytes, } /// ResponseVerifyVoteExtension is the result of verifying a vote extension. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseVerifyVoteExtension { @@ -295,6 +310,7 @@ pub struct ResponseVerifyVoteExtension { /// Nested message and enum types in `ResponseVerifyVoteExtension`. pub mod response_verify_vote_extension { /// Verification status. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[derive( Clone, Copy, @@ -342,6 +358,7 @@ pub mod response_verify_vote_extension { } } /// FinalizeBlockResponse contains the result of executing the block. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseFinalizeBlock { @@ -368,6 +385,7 @@ pub struct ResponseFinalizeBlock { pub app_hash: ::prost::bytes::Bytes, } /// VoteInfo contains the information about the vote. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VoteInfo { @@ -377,6 +395,7 @@ pub struct VoteInfo { pub block_id_flag: i32, } /// ExtendedVoteInfo extends VoteInfo with the vote extentions (non-deterministic). +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendedVoteInfo { @@ -394,6 +413,7 @@ pub struct ExtendedVoteInfo { pub block_id_flag: i32, } /// CommitInfo contains votes for the particular round. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitInfo { @@ -405,6 +425,7 @@ pub struct CommitInfo { /// ExtendedCommitInfo is similar to CommitInfo except that it is only used in /// the PrepareProposal request such that Tendermint can provide vote extensions /// to the application. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtendedCommitInfo { @@ -419,6 +440,7 @@ pub struct ExtendedCommitInfo { /// ExecTxResult contains results of executing one individual transaction. /// /// * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecTxResult { @@ -445,6 +467,7 @@ pub struct ExecTxResult { /// TxResult contains results of executing the transaction. /// /// One usage is indexing transaction results. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxResult { diff --git a/proto/src/prost/cometbft.crypto.v1.rs b/proto/src/prost/cometbft.crypto.v1.rs index cf2e7f44..2b322d9a 100644 --- a/proto/src/prost/cometbft.crypto.v1.rs +++ b/proto/src/prost/cometbft.crypto.v1.rs @@ -1,33 +1,3 @@ -/// PublicKey is a ED25519 or a secp256k1 public key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PublicKey { - /// The type of key. - #[prost(oneof = "public_key::Sum", tags = "1, 2")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `PublicKey`. -pub mod public_key { - /// The type of key. - #[derive(::serde::Deserialize, ::serde::Serialize)] - #[serde(tag = "type", content = "value")] - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Sum { - #[prost(bytes, tag = "1")] - #[serde( - rename = "tendermint/PubKeyEd25519", - with = "crate::serializers::bytes::base64string" - )] - Ed25519(::prost::alloc::vec::Vec), - #[prost(bytes, tag = "2")] - #[serde( - rename = "tendermint/PubKeySecp256k1", - with = "crate::serializers::bytes::base64string" - )] - Secp256k1(::prost::alloc::vec::Vec), - } -} /// Proof is a Merkle proof. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -88,3 +58,33 @@ pub struct ProofOps { #[prost(message, repeated, tag = "1")] pub ops: ::prost::alloc::vec::Vec, } +/// PublicKey is a ED25519 or a secp256k1 public key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PublicKey { + /// The type of key. + #[prost(oneof = "public_key::Sum", tags = "1, 2")] + pub sum: ::core::option::Option, +} +/// Nested message and enum types in `PublicKey`. +pub mod public_key { + /// The type of key. + #[derive(::serde::Deserialize, ::serde::Serialize)] + #[serde(tag = "type", content = "value")] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Sum { + #[prost(bytes, tag = "1")] + #[serde( + rename = "tendermint/PubKeyEd25519", + with = "crate::serializers::bytes::base64string" + )] + Ed25519(::prost::alloc::vec::Vec), + #[prost(bytes, tag = "2")] + #[serde( + rename = "tendermint/PubKeySecp256k1", + with = "crate::serializers::bytes::base64string" + )] + Secp256k1(::prost::alloc::vec::Vec), + } +} diff --git a/proto/src/prost/cometbft.p2p.v1.rs b/proto/src/prost/cometbft.p2p.v1.rs index 2a134e97..f76419b1 100644 --- a/proto/src/prost/cometbft.p2p.v1.rs +++ b/proto/src/prost/cometbft.p2p.v1.rs @@ -1,56 +1,5 @@ -/// PacketPing is a request to confirm that the connection is alive. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketPing {} -/// PacketPong is a response to confirm that the connection is alive. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketPong {} -/// PacketMsg contains data for the specified channel ID. EOF means the message -/// is fully received. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketMsg { - #[prost(int32, tag = "1")] - pub channel_id: i32, - #[prost(bool, tag = "2")] - pub eof: bool, - #[prost(bytes = "vec", tag = "3")] - pub data: ::prost::alloc::vec::Vec, -} -/// Packet is an abstract p2p message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Packet { - /// Sum of all possible messages. - #[prost(oneof = "packet::Sum", tags = "1, 2, 3")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Packet`. -pub mod packet { - /// Sum of all possible messages. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Sum { - #[prost(message, tag = "1")] - PacketPing(super::PacketPing), - #[prost(message, tag = "2")] - PacketPong(super::PacketPong), - #[prost(message, tag = "3")] - PacketMsg(super::PacketMsg), - } -} -/// AuthSigMessage is sent during the authentication and contains our/remote's -/// signature along with the public key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AuthSigMessage { - #[prost(message, optional, tag = "1")] - pub pub_key: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub sig: ::prost::alloc::vec::Vec, -} /// NetAddress represents a peer's network address. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NetAddress { @@ -62,6 +11,7 @@ pub struct NetAddress { pub port: u32, } /// ProtocolVersion represents the current p2p protocol version. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProtocolVersion { @@ -74,6 +24,7 @@ pub struct ProtocolVersion { } /// DefaultNodeInfo is a basic node's information sent to other peers during the /// p2p handshake. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DefaultNodeInfo { @@ -95,6 +46,7 @@ pub struct DefaultNodeInfo { pub other: ::core::option::Option, } /// DefaultNodeInfoOther is the misc. application specific data. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DefaultNodeInfoOther { @@ -103,11 +55,71 @@ pub struct DefaultNodeInfoOther { #[prost(string, tag = "2")] pub rpc_address: ::prost::alloc::string::String, } +/// PacketPing is a request to confirm that the connection is alive. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PacketPing {} +/// PacketPong is a response to confirm that the connection is alive. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PacketPong {} +/// PacketMsg contains data for the specified channel ID. EOF means the message +/// is fully received. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PacketMsg { + #[prost(int32, tag = "1")] + pub channel_id: i32, + #[prost(bool, tag = "2")] + pub eof: bool, + #[prost(bytes = "vec", tag = "3")] + pub data: ::prost::alloc::vec::Vec, +} +/// Packet is an abstract p2p message. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Packet { + /// Sum of all possible messages. + #[prost(oneof = "packet::Sum", tags = "1, 2, 3")] + pub sum: ::core::option::Option, +} +/// Nested message and enum types in `Packet`. +pub mod packet { + /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Sum { + #[prost(message, tag = "1")] + PacketPing(super::PacketPing), + #[prost(message, tag = "2")] + PacketPong(super::PacketPong), + #[prost(message, tag = "3")] + PacketMsg(super::PacketMsg), + } +} +/// AuthSigMessage is sent during the authentication and contains our/remote's +/// signature along with the public key. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthSigMessage { + #[prost(message, optional, tag = "1")] + pub pub_key: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub sig: ::prost::alloc::vec::Vec, +} /// PexRequest is a request for peer addresses. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PexRequest {} /// PexAddrs is a response with peer addresses. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PexAddrs { @@ -115,6 +127,7 @@ pub struct PexAddrs { pub addrs: ::prost::alloc::vec::Vec, } /// Message is an abstract PEX message. +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Message { @@ -125,6 +138,7 @@ pub struct Message { /// Nested message and enum types in `Message`. pub mod message { /// Sum of all possible messages. + #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Sum { diff --git a/proto/src/prost/cometbft.types.v1.rs b/proto/src/prost/cometbft.types.v1.rs index ee5e0b5b..44c63fa6 100644 --- a/proto/src/prost/cometbft.types.v1.rs +++ b/proto/src/prost/cometbft.types.v1.rs @@ -1,101 +1,3 @@ -/// ConsensusParams contains consensus critical parameters that determine the -/// validity of blocks. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusParams { - #[prost(message, optional, tag = "1")] - pub block: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub validator: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub version: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub abci: ::core::option::Option, -} -/// BlockParams contains limits on the block size. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockParams { - /// Max block size, in bytes. - /// Note: must be greater than 0 - #[prost(int64, tag = "1")] - pub max_bytes: i64, - /// Max gas per block. - /// Note: must be greater or equal to -1 - #[prost(int64, tag = "2")] - pub max_gas: i64, -} -/// EvidenceParams determine how we handle evidence of malfeasance. -#[derive(::serde::Deserialize, ::serde::Serialize)] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EvidenceParams { - /// Max age of evidence, in blocks. - /// - /// The basic formula for calculating this is: MaxAgeDuration / {average block - /// time}. - #[prost(int64, tag = "1")] - #[serde(with = "crate::serializers::from_str", default)] - pub max_age_num_blocks: i64, - /// Max age of evidence, in time. - /// - /// It should correspond with an app's "unbonding period" or other similar - /// mechanism for handling [Nothing-At-Stake - /// attacks](). - #[prost(message, optional, tag = "2")] - pub max_age_duration: ::core::option::Option, - /// This sets the maximum size of total evidence in bytes that can be committed in a single block. - /// and should fall comfortably under the max block bytes. - /// Default is 1048576 or 1MB - #[prost(int64, tag = "3")] - #[serde(with = "crate::serializers::from_str", default)] - pub max_bytes: i64, -} -/// ValidatorParams restrict the public key types validators can use. -/// NOTE: uses ABCI pubkey naming, not Amino names. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorParams { - #[prost(string, repeated, tag = "1")] - pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// VersionParams contains the ABCI application version. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VersionParams { - /// Was named app_version in Tendermint 0.34 - #[prost(uint64, tag = "1")] - pub app: u64, -} -/// HashedParams is a subset of ConsensusParams. -/// -/// It is hashed into the Header.ConsensusHash. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HashedParams { - #[prost(int64, tag = "1")] - pub block_max_bytes: i64, - #[prost(int64, tag = "2")] - pub block_max_gas: i64, -} -/// ABCIParams configure functionality specific to the Application Blockchain Interface. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AbciParams { - /// vote_extensions_enable_height configures the first height during which - /// vote extensions will be enabled. During this specified height, and for all - /// subsequent heights, precommit messages that do not contain valid extension data - /// will be considered invalid. Prior to this height, vote extensions will not - /// be used or accepted by validators on the network. - /// - /// Once enabled, vote extensions will be created by the application in ExtendVote, - /// passed to the application for validation in VerifyVoteExtension and given - /// to the application to use when proposing a block during PrepareProposal. - #[prost(int64, tag = "1")] - pub vote_extensions_enable_height: i64, -} /// ValidatorSet defines a set of validators. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -544,8 +446,8 @@ pub struct DuplicateVoteEvidence { pub timestamp: ::core::option::Option, } /// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -#[derive(::serde::Deserialize, ::serde::Serialize)] #[serde(rename_all = "PascalCase")] +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LightClientAttackEvidence { @@ -596,6 +498,106 @@ pub struct EventDataRoundState { #[prost(string, tag = "3")] pub step: ::prost::alloc::string::String, } +/// ConsensusParams contains consensus critical parameters that determine the +/// validity of blocks. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsensusParams { + #[prost(message, optional, tag = "1")] + pub block: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub evidence: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub validator: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub version: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub abci: ::core::option::Option, +} +/// BlockParams contains limits on the block size. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlockParams { + /// Max block size, in bytes. + /// Note: must be greater than 0 + #[prost(int64, tag = "1")] + pub max_bytes: i64, + /// Max gas per block. + /// Note: must be greater or equal to -1 + #[prost(int64, tag = "2")] + pub max_gas: i64, +} +/// EvidenceParams determine how we handle evidence of malfeasance. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvidenceParams { + /// Max age of evidence, in blocks. + /// + /// The basic formula for calculating this is: MaxAgeDuration / {average block + /// time}. + #[prost(int64, tag = "1")] + #[serde(with = "crate::serializers::from_str", default)] + pub max_age_num_blocks: i64, + /// Max age of evidence, in time. + /// + /// It should correspond with an app's "unbonding period" or other similar + /// mechanism for handling [Nothing-At-Stake + /// attacks](). + #[prost(message, optional, tag = "2")] + pub max_age_duration: ::core::option::Option, + /// This sets the maximum size of total evidence in bytes that can be committed in a single block. + /// and should fall comfortably under the max block bytes. + /// Default is 1048576 or 1MB + #[prost(int64, tag = "3")] + #[serde(with = "crate::serializers::from_str", default)] + pub max_bytes: i64, +} +/// ValidatorParams restrict the public key types validators can use. +/// NOTE: uses ABCI pubkey naming, not Amino names. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorParams { + #[prost(string, repeated, tag = "1")] + pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// VersionParams contains the ABCI application version. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VersionParams { + /// Was named app_version in Tendermint 0.34 + #[prost(uint64, tag = "1")] + pub app: u64, +} +/// HashedParams is a subset of ConsensusParams. +/// +/// It is hashed into the Header.ConsensusHash. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HashedParams { + #[prost(int64, tag = "1")] + pub block_max_bytes: i64, + #[prost(int64, tag = "2")] + pub block_max_gas: i64, +} +/// ABCIParams configure functionality specific to the Application Blockchain Interface. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AbciParams { + /// vote_extensions_enable_height configures the first height during which + /// vote extensions will be enabled. During this specified height, and for all + /// subsequent heights, precommit messages that do not contain valid extension data + /// will be considered invalid. Prior to this height, vote extensions will not + /// be used or accepted by validators on the network. + /// + /// Once enabled, vote extensions will be created by the application in ExtendVote, + /// passed to the application for validation in VerifyVoteExtension and given + /// to the application to use when proposing a block during PrepareProposal. + #[prost(int64, tag = "1")] + pub vote_extensions_enable_height: i64, +} /// CanonicalBlockID is a canonical representation of a BlockID, which gets /// serialized and signed. #[derive(::serde::Deserialize, ::serde::Serialize)] diff --git a/proto/src/prost/cometbft.types.v1beta1.rs b/proto/src/prost/cometbft.types.v1beta1.rs index 11f424b3..175e2330 100644 --- a/proto/src/prost/cometbft.types.v1beta1.rs +++ b/proto/src/prost/cometbft.types.v1beta1.rs @@ -1,89 +1,3 @@ -/// ConsensusParams contains consensus critical parameters that determine the -/// validity of blocks. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusParams { - #[prost(message, optional, tag = "1")] - pub block: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub validator: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub version: ::core::option::Option, -} -/// BlockParams contains limits on the block size. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockParams { - /// Max block size, in bytes. - /// Note: must be greater than 0 - #[prost(int64, tag = "1")] - pub max_bytes: i64, - /// Max gas per block. - /// Note: must be greater or equal to -1 - #[prost(int64, tag = "2")] - pub max_gas: i64, - /// Minimum time increment between consecutive blocks (in milliseconds) If the - /// block header timestamp is ahead of the system clock, decrease this value. - /// - /// Not exposed to the application. - #[prost(int64, tag = "3")] - pub time_iota_ms: i64, -} -/// EvidenceParams determine how we handle evidence of malfeasance. -#[derive(::serde::Deserialize, ::serde::Serialize)] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EvidenceParams { - /// Max age of evidence, in blocks. - /// - /// The basic formula for calculating this is: MaxAgeDuration / {average block - /// time}. - #[prost(int64, tag = "1")] - #[serde(with = "crate::serializers::from_str", default)] - pub max_age_num_blocks: i64, - /// Max age of evidence, in time. - /// - /// It should correspond with an app's "unbonding period" or other similar - /// mechanism for handling [Nothing-At-Stake - /// attacks](). - #[prost(message, optional, tag = "2")] - pub max_age_duration: ::core::option::Option, - /// This sets the maximum size of total evidence in bytes that can be committed in a single block. - /// and should fall comfortably under the max block bytes. - /// Default is 1048576 or 1MB - #[prost(int64, tag = "3")] - #[serde(with = "crate::serializers::from_str", default)] - pub max_bytes: i64, -} -/// ValidatorParams restrict the public key types validators can use. -/// NOTE: uses ABCI pubkey naming, not Amino names. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorParams { - #[prost(string, repeated, tag = "1")] - pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// VersionParams contains the ABCI application version. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VersionParams { - /// Was named app_version in Tendermint 0.34 - #[prost(uint64, tag = "1")] - pub app: u64, -} -/// HashedParams is a subset of ConsensusParams. -/// -/// It is hashed into the Header.ConsensusHash. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HashedParams { - #[prost(int64, tag = "1")] - pub block_max_bytes: i64, - #[prost(int64, tag = "2")] - pub block_max_gas: i64, -} /// ValidatorSet defines a set of validators. #[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -485,8 +399,8 @@ pub struct DuplicateVoteEvidence { pub timestamp: ::core::option::Option, } /// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -#[derive(::serde::Deserialize, ::serde::Serialize)] #[serde(rename_all = "PascalCase")] +#[derive(::serde::Deserialize, ::serde::Serialize)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LightClientAttackEvidence { @@ -537,6 +451,92 @@ pub struct EventDataRoundState { #[prost(string, tag = "3")] pub step: ::prost::alloc::string::String, } +/// ConsensusParams contains consensus critical parameters that determine the +/// validity of blocks. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsensusParams { + #[prost(message, optional, tag = "1")] + pub block: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub evidence: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub validator: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub version: ::core::option::Option, +} +/// BlockParams contains limits on the block size. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlockParams { + /// Max block size, in bytes. + /// Note: must be greater than 0 + #[prost(int64, tag = "1")] + pub max_bytes: i64, + /// Max gas per block. + /// Note: must be greater or equal to -1 + #[prost(int64, tag = "2")] + pub max_gas: i64, + /// Minimum time increment between consecutive blocks (in milliseconds) If the + /// block header timestamp is ahead of the system clock, decrease this value. + /// + /// Not exposed to the application. + #[prost(int64, tag = "3")] + pub time_iota_ms: i64, +} +/// EvidenceParams determine how we handle evidence of malfeasance. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvidenceParams { + /// Max age of evidence, in blocks. + /// + /// The basic formula for calculating this is: MaxAgeDuration / {average block + /// time}. + #[prost(int64, tag = "1")] + #[serde(with = "crate::serializers::from_str", default)] + pub max_age_num_blocks: i64, + /// Max age of evidence, in time. + /// + /// It should correspond with an app's "unbonding period" or other similar + /// mechanism for handling [Nothing-At-Stake + /// attacks](). + #[prost(message, optional, tag = "2")] + pub max_age_duration: ::core::option::Option, + /// This sets the maximum size of total evidence in bytes that can be committed in a single block. + /// and should fall comfortably under the max block bytes. + /// Default is 1048576 or 1MB + #[prost(int64, tag = "3")] + #[serde(with = "crate::serializers::from_str", default)] + pub max_bytes: i64, +} +/// ValidatorParams restrict the public key types validators can use. +/// NOTE: uses ABCI pubkey naming, not Amino names. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorParams { + #[prost(string, repeated, tag = "1")] + pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// VersionParams contains the ABCI application version. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VersionParams { + /// Was named app_version in Tendermint 0.34 + #[prost(uint64, tag = "1")] + pub app: u64, +} +/// HashedParams is a subset of ConsensusParams. +/// +/// It is hashed into the Header.ConsensusHash. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HashedParams { + #[prost(int64, tag = "1")] + pub block_max_bytes: i64, + #[prost(int64, tag = "2")] + pub block_max_gas: i64, +} /// CanonicalBlockID is a canonical representation of a BlockID, which gets /// serialized and signed. #[derive(::serde::Deserialize, ::serde::Serialize)] diff --git a/tools/proto-compiler/src/constants.rs b/tools/proto-compiler/src/constants.rs index f71b0d50..b9e44312 100644 --- a/tools/proto-compiler/src/constants.rs +++ b/tools/proto-compiler/src/constants.rs @@ -50,72 +50,81 @@ const RENAME_PARTS: &str = r#"#[serde(rename = "parts", alias = "part_set_header /// The first item is a path as defined in the prost_build::Config::btree_map here: /// https://docs.rs/prost-build/0.6.1/prost_build/struct.Config.html#method.btree_map pub static CUSTOM_TYPE_ATTRIBUTES: &[(&str, &str)] = &[ + (".cometbft.abci", SERIALIZED), + (".cometbft.abci.v1.InfoResponse", SERIALIZED), + (".cometbft.abci.v1beta1.ResponseInfo", SERIALIZED), + (".cometbft.crypto.Proof", SERIALIZED), + (".cometbft.crypto.ProofOp", SERIALIZED), + (".cometbft.crypto.ProofOps", SERIALIZED), + (".cometbft.crypto.PublicKey.sum", SERIALIZED), + (".cometbft.crypto.PublicKey.sum", TYPE_TAG), + (".cometbft.crypto.v1.Proof", SERIALIZED), + (".cometbft.crypto.v1.PublicKey.sum", SERIALIZED), + (".cometbft.crypto.v1.PublicKey.sum", TYPE_TAG), (".cometbft.libs.bits.v1.BitArray", SERIALIZED), - (".cometbft.types.v1beta1.BlockIDFlag", PRIMITIVE_ENUM), - (".cometbft.types.v1.BlockIDFlag", PRIMITIVE_ENUM), - (".cometbft.types.v1beta1.Block", SERIALIZED), + (".cometbft.p2p", SERIALIZED), + (".cometbft.types.v1.ABCIParams", SERIALIZED), (".cometbft.types.v1.Block", SERIALIZED), - (".cometbft.types.v1beta1.Data", SERIALIZED), + (".cometbft.types.v1.BlockID", SERIALIZED), + (".cometbft.types.v1.BlockIDFlag", PRIMITIVE_ENUM), + (".cometbft.types.v1.BlockMeta", SERIALIZED), + (".cometbft.types.v1.CanonicalBlockID", SERIALIZED), + (".cometbft.types.v1.CanonicalPartSetHeader", SERIALIZED), + (".cometbft.types.v1.CanonicalVote", SERIALIZED), + (".cometbft.types.v1.Commit", SERIALIZED), + (".cometbft.types.v1.CommitSig", SERIALIZED), + (".cometbft.types.v1.ConsensusParams", SERIALIZED), (".cometbft.types.v1.Data", SERIALIZED), - (".cometbft.types.v1beta1.EvidenceParams", SERIALIZED), - (".cometbft.types.v1.EvidenceParams", SERIALIZED), - (".cometbft.types.v1beta1.Evidence.sum", SERIALIZED), + (".cometbft.types.v1.DuplicateVoteEvidence", SERIALIZED), (".cometbft.types.v1.Evidence.sum", SERIALIZED), - (".cometbft.types.v1beta1.Evidence.sum", TYPE_TAG), (".cometbft.types.v1.Evidence.sum", TYPE_TAG), - (".cometbft.types.v1beta1.EvidenceList", SERIALIZED), (".cometbft.types.v1.EvidenceList", SERIALIZED), - (".cometbft.types.v1beta1.DuplicateVoteEvidence", SERIALIZED), - (".cometbft.types.v1.DuplicateVoteEvidence", SERIALIZED), - (".cometbft.types.v1beta1.Vote", SERIALIZED), - (".cometbft.types.v1.Vote", SERIALIZED), - (".cometbft.types.v1beta1.BlockID", SERIALIZED), - (".cometbft.types.v1.BlockID", SERIALIZED), - (".cometbft.types.v1beta1.PartSetHeader", SERIALIZED), - (".cometbft.types.v1.PartSetHeader", SERIALIZED), + (".cometbft.types.v1.EvidenceParams", SERIALIZED), + (".cometbft.types.v1.Header", SERIALIZED), + (".cometbft.types.v1.LightBlock", SERIALIZED), ( - ".cometbft.types.v1beta1.LightClientAttackEvidence", - SERIALIZED, + ".cometbft.types.v1.LightClientAttackEvidence", + RENAME_ALL_PASCALCASE, ), (".cometbft.types.v1.LightClientAttackEvidence", SERIALIZED), + (".cometbft.types.v1.PartSetHeader", SERIALIZED), + (".cometbft.types.v1.SignedHeader", SERIALIZED), + (".cometbft.types.v1.TxProof", SERIALIZED), + (".cometbft.types.v1.Validator", SERIALIZED), + (".cometbft.types.v1.ValidatorSet", SERIALIZED), + (".cometbft.types.v1.Vote", SERIALIZED), + (".cometbft.types.v1beta1.Block", SERIALIZED), + (".cometbft.types.v1beta1.BlockID", SERIALIZED), + (".cometbft.types.v1beta1.BlockIDFlag", PRIMITIVE_ENUM), + (".cometbft.types.v1beta1.BlockMeta", SERIALIZED), + (".cometbft.types.v1beta1.CanonicalBlockID", SERIALIZED), + (".cometbft.types.v1beta1.CanonicalPartSetHeader", SERIALIZED), + (".cometbft.types.v1beta1.CanonicalVote", SERIALIZED), + (".cometbft.types.v1beta1.Commit", SERIALIZED), + (".cometbft.types.v1beta1.CommitSig", SERIALIZED), + (".cometbft.types.v1beta1.Data", SERIALIZED), + (".cometbft.types.v1beta1.DuplicateVoteEvidence", SERIALIZED), + (".cometbft.types.v1beta1.Evidence.sum", SERIALIZED), + (".cometbft.types.v1beta1.Evidence.sum", TYPE_TAG), + (".cometbft.types.v1beta1.EvidenceList", SERIALIZED), + (".cometbft.types.v1beta1.EvidenceParams", SERIALIZED), + (".cometbft.types.v1beta1.Header", SERIALIZED), + (".cometbft.types.v1beta1.LightBlock", SERIALIZED), ( ".cometbft.types.v1beta1.LightClientAttackEvidence", RENAME_ALL_PASCALCASE, ), ( - ".cometbft.types.v1.LightClientAttackEvidence", - RENAME_ALL_PASCALCASE, + ".cometbft.types.v1beta1.LightClientAttackEvidence", + SERIALIZED, ), - (".cometbft.types.v1beta1.LightBlock", SERIALIZED), - (".cometbft.types.v1.LightBlock", SERIALIZED), + (".cometbft.types.v1beta1.PartSetHeader", SERIALIZED), (".cometbft.types.v1beta1.SignedHeader", SERIALIZED), - (".cometbft.types.v1.SignedHeader", SERIALIZED), - (".cometbft.types.v1beta1.Header", SERIALIZED), - (".cometbft.types.v1.Header", SERIALIZED), - (".cometbft.version.v1.Consensus", SERIALIZED), - (".cometbft.types.v1beta1.Commit", SERIALIZED), - (".cometbft.types.v1.Commit", SERIALIZED), - (".cometbft.types.v1beta1.CommitSig", SERIALIZED), - (".cometbft.types.v1.CommitSig", SERIALIZED), - (".cometbft.types.v1beta1.ValidatorSet", SERIALIZED), - (".cometbft.types.v1.ValidatorSet", SERIALIZED), - (".cometbft.crypto.v1.PublicKey.sum", SERIALIZED), - (".cometbft.crypto.v1.PublicKey.sum", TYPE_TAG), - (".cometbft.abci.v1beta1.ResponseInfo", SERIALIZED), - (".cometbft.abci.v1.InfoResponse", SERIALIZED), - (".cometbft.types.v1beta1.CanonicalBlockID", SERIALIZED), - (".cometbft.types.v1.CanonicalBlockID", SERIALIZED), - (".cometbft.types.v1beta1.CanonicalPartSetHeader", SERIALIZED), - (".cometbft.types.v1.CanonicalPartSetHeader", SERIALIZED), - (".cometbft.types.v1beta1.Validator", SERIALIZED), - (".cometbft.types.v1.Validator", SERIALIZED), - (".cometbft.types.v1beta1.CanonicalVote", SERIALIZED), - (".cometbft.types.v1.CanonicalVote", SERIALIZED), - (".cometbft.types.v1beta1.BlockMeta", SERIALIZED), - (".cometbft.types.v1.BlockMeta", SERIALIZED), (".cometbft.types.v1beta1.TxProof", SERIALIZED), - (".cometbft.types.v1.TxProof", SERIALIZED), - (".cometbft.crypto.v1.Proof", SERIALIZED), + (".cometbft.types.v1beta1.Validator", SERIALIZED), + (".cometbft.types.v1beta1.ValidatorSet", SERIALIZED), + (".cometbft.types.v1beta1.Vote", SERIALIZED), + (".cometbft.version.v1.Consensus", SERIALIZED), ]; /// Custom field attributes applied on top of protobuf fields in (a) struct(s)