Struct MsgSlashValidator
pub struct MsgSlashValidator {
pub authority: String,
pub validator_address: String,
pub infraction_height: u32,
pub tokens_at_infraction_height: Vec<u8>,
pub slash_factor: String,
}Expand description
MsgSlashValidator is the Msg/SlashValidator request type.
Fields§
§validator_address: StringConsensus address of the validator to slash
infraction_height: u32Colloquially, the height at which the validator is deemed to have misbehaved. In practice, this is the height used to determine the targets of the slash. For example, undelegating after this height will not escape slashing. This height should be set to a recent height at the time of the proposal to prevent delegators from undelegating during the vote period. i.e. infraction_height <= proposal submission height.
NB: At the time this message is applied, this height must have occured equal to or less than an unbonding period in the past in order for the slash to be effective. i.e. time(proposal pass height) - time(infraction_height) < unbonding period
tokens_at_infraction_height: Vec<u8>Tokens of the validator at the specified height. Used to compute the slash amount. The x/staking HistoricalInfo query endpoint can be used to find this.
slash_factor: StringMultiplier for how much of the validator’s stake should be slashed. slash_factor * tokens_at_infraction_height = tokens slashed
Trait Implementations§
§impl Clone for MsgSlashValidator
impl Clone for MsgSlashValidator
§fn clone(&self) -> MsgSlashValidator
fn clone(&self) -> MsgSlashValidator
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for MsgSlashValidator
impl Debug for MsgSlashValidator
§impl Default for MsgSlashValidator
impl Default for MsgSlashValidator
§fn default() -> MsgSlashValidator
fn default() -> MsgSlashValidator
§impl Message for MsgSlashValidator
impl Message for MsgSlashValidator
§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.§impl Name for MsgSlashValidator
impl Name for MsgSlashValidator
§const NAME: &'static str = "MsgSlashValidator"
const NAME: &'static str = "MsgSlashValidator"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.§const PACKAGE: &'static str = "dydxprotocol.govplus"
const PACKAGE: &'static str = "dydxprotocol.govplus"
., e.g. google.protobuf.§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.§impl PartialEq for MsgSlashValidator
impl PartialEq for MsgSlashValidator
impl StructuralPartialEq for MsgSlashValidator
Auto Trait Implementations§
impl Freeze for MsgSlashValidator
impl RefUnwindSafe for MsgSlashValidator
impl Send for MsgSlashValidator
impl Sync for MsgSlashValidator
impl Unpin for MsgSlashValidator
impl UnwindSafe for MsgSlashValidator
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].