cosmos_sdk_proto_nymlab/prost/cosmos-sdk/
cosmos.slashing.v1beta1.rs

1// @generated
2/// ValidatorSigningInfo defines a validator's signing info for monitoring their
3/// liveness activity.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct ValidatorSigningInfo {
6    #[prost(string, tag = "1")]
7    pub address: ::prost::alloc::string::String,
8    /// Height at which validator was first a candidate OR was unjailed
9    #[prost(int64, tag = "2")]
10    pub start_height: i64,
11    /// Index which is incremented each time the validator was a bonded
12    /// in a block and may have signed a precommit or not. This in conjunction with the
13    /// `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`.
14    #[prost(int64, tag = "3")]
15    pub index_offset: i64,
16    /// Timestamp until which the validator is jailed due to liveness downtime.
17    #[prost(message, optional, tag = "4")]
18    pub jailed_until: ::core::option::Option<::prost_types::Timestamp>,
19    /// Whether or not a validator has been tombstoned (killed out of validator set). It is set
20    /// once the validator commits an equivocation or for any other configured misbehiavor.
21    #[prost(bool, tag = "5")]
22    pub tombstoned: bool,
23    /// A counter kept to avoid unnecessary array reads.
24    /// Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`.
25    #[prost(int64, tag = "6")]
26    pub missed_blocks_counter: i64,
27}
28/// Params represents the parameters used for by the slashing module.
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct Params {
31    #[prost(int64, tag = "1")]
32    pub signed_blocks_window: i64,
33    #[prost(bytes = "vec", tag = "2")]
34    pub min_signed_per_window: ::prost::alloc::vec::Vec<u8>,
35    #[prost(message, optional, tag = "3")]
36    pub downtime_jail_duration: ::core::option::Option<::prost_types::Duration>,
37    #[prost(bytes = "vec", tag = "4")]
38    pub slash_fraction_double_sign: ::prost::alloc::vec::Vec<u8>,
39    #[prost(bytes = "vec", tag = "5")]
40    pub slash_fraction_downtime: ::prost::alloc::vec::Vec<u8>,
41}
42/// GenesisState defines the slashing module's genesis state.
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct GenesisState {
45    /// params defines all the parameters of the module.
46    #[prost(message, optional, tag = "1")]
47    pub params: ::core::option::Option<Params>,
48    /// signing_infos represents a map between validator addresses and their
49    /// signing infos.
50    #[prost(message, repeated, tag = "2")]
51    pub signing_infos: ::prost::alloc::vec::Vec<SigningInfo>,
52    /// missed_blocks represents a map between validator addresses and their
53    /// missed blocks.
54    #[prost(message, repeated, tag = "3")]
55    pub missed_blocks: ::prost::alloc::vec::Vec<ValidatorMissedBlocks>,
56}
57/// SigningInfo stores validator signing info of corresponding address.
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct SigningInfo {
60    /// address is the validator address.
61    #[prost(string, tag = "1")]
62    pub address: ::prost::alloc::string::String,
63    /// validator_signing_info represents the signing info of this validator.
64    #[prost(message, optional, tag = "2")]
65    pub validator_signing_info: ::core::option::Option<ValidatorSigningInfo>,
66}
67/// ValidatorMissedBlocks contains array of missed blocks of corresponding
68/// address.
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct ValidatorMissedBlocks {
71    /// address is the validator address.
72    #[prost(string, tag = "1")]
73    pub address: ::prost::alloc::string::String,
74    /// missed_blocks is an array of missed blocks by the validator.
75    #[prost(message, repeated, tag = "2")]
76    pub missed_blocks: ::prost::alloc::vec::Vec<MissedBlock>,
77}
78/// MissedBlock contains height and missed status as boolean.
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct MissedBlock {
81    /// index is the height at which the block was missed.
82    #[prost(int64, tag = "1")]
83    pub index: i64,
84    /// missed is the missed status.
85    #[prost(bool, tag = "2")]
86    pub missed: bool,
87}
88/// QueryParamsRequest is the request type for the Query/Params RPC method
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct QueryParamsRequest {}
91/// QueryParamsResponse is the response type for the Query/Params RPC method
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct QueryParamsResponse {
94    #[prost(message, optional, tag = "1")]
95    pub params: ::core::option::Option<Params>,
96}
97/// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC
98/// method
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct QuerySigningInfoRequest {
101    /// cons_address is the address to query signing info of
102    #[prost(string, tag = "1")]
103    pub cons_address: ::prost::alloc::string::String,
104}
105/// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC
106/// method
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct QuerySigningInfoResponse {
109    /// val_signing_info is the signing info of requested val cons address
110    #[prost(message, optional, tag = "1")]
111    pub val_signing_info: ::core::option::Option<ValidatorSigningInfo>,
112}
113/// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC
114/// method
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct QuerySigningInfosRequest {
117    #[prost(message, optional, tag = "1")]
118    pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
119}
120/// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC
121/// method
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct QuerySigningInfosResponse {
124    /// info is the signing info of all validators
125    #[prost(message, repeated, tag = "1")]
126    pub info: ::prost::alloc::vec::Vec<ValidatorSigningInfo>,
127    #[prost(message, optional, tag = "2")]
128    pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
129}
130/// MsgUnjail defines the Msg/Unjail request type
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct MsgUnjail {
133    #[prost(string, tag = "1")]
134    pub validator_addr: ::prost::alloc::string::String,
135}
136/// MsgUnjailResponse defines the Msg/Unjail response type
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct MsgUnjailResponse {}
139/// MsgUpdateParams is the Msg/UpdateParams request type.
140///
141/// Since: cosmos-sdk 0.47
142#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct MsgUpdateParams {
144    /// authority is the address that controls the module (defaults to x/gov unless overwritten).
145    #[prost(string, tag = "1")]
146    pub authority: ::prost::alloc::string::String,
147    /// params defines the x/slashing parameters to update.
148    ///
149    /// NOTE: All parameters must be supplied.
150    #[prost(message, optional, tag = "2")]
151    pub params: ::core::option::Option<Params>,
152}
153/// MsgUpdateParamsResponse defines the response structure for executing a
154/// MsgUpdateParams message.
155///
156/// Since: cosmos-sdk 0.47
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct MsgUpdateParamsResponse {}
159include!("cosmos.slashing.v1beta1.tonic.rs");
160// @@protoc_insertion_point(module)