Struct abci::types::EvidenceParams
source · [−]pub struct EvidenceParams {
pub max_age_num_blocks: i64,
pub max_age_duration: Option<Duration>,
pub max_bytes: i64,
}
Expand description
EvidenceParams determine how we handle evidence of malfeasance.
Fields
max_age_num_blocks: i64
Max age of evidence, in blocks.
The basic formula for calculating this is: MaxAgeDuration / {average block time}.
max_age_duration: Option<Duration>
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.
max_bytes: i64
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
Trait Implementations
sourceimpl Clone for EvidenceParams
impl Clone for EvidenceParams
sourcefn clone(&self) -> EvidenceParams
fn clone(&self) -> EvidenceParams
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for EvidenceParams
impl Debug for EvidenceParams
sourceimpl Default for EvidenceParams
impl Default for EvidenceParams
sourcefn default() -> EvidenceParams
fn default() -> EvidenceParams
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for EvidenceParams
impl<'de> Deserialize<'de> for EvidenceParams
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<EvidenceParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EvidenceParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Message for EvidenceParams
impl Message for EvidenceParams
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message to a buffer. Read more
sourcefn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Encodes the message to a newly allocated buffer.
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message with a length-delimiter to a buffer. Read more
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Encodes the message with a length-delimiter to a newly allocated buffer.
sourcefn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
. Read moresourceimpl PartialEq<EvidenceParams> for EvidenceParams
impl PartialEq<EvidenceParams> for EvidenceParams
sourcefn eq(&self, other: &EvidenceParams) -> bool
fn eq(&self, other: &EvidenceParams) -> bool
sourceimpl Serialize for EvidenceParams
impl Serialize for EvidenceParams
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for EvidenceParams
Auto Trait Implementations
impl RefUnwindSafe for EvidenceParams
impl Send for EvidenceParams
impl Sync for EvidenceParams
impl Unpin for EvidenceParams
impl UnwindSafe for EvidenceParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more