pub struct ExtendVoteExtension {
pub type: i32,
pub extension: Vec<u8>,
pub sign_request_id: Option<Vec<u8>>,
}Expand description
Provides a vote extension for signing. type and extension fields are mandatory for filling
Fields§
§type: i32Vote extension type can be either DEFAULT, THRESHOLD_RECOVER or THRESHOLD_RECOVER_RAW. The Tenderdash supports only THRESHOLD_RECOVER and THRESHOLD_RECOVER_RAW at this moment.
extension: Vec<u8>Deterministic or (Non-Deterministic) extension provided by the sending validator’s Application.
For THRESHOLD_RECOVER_RAW, it MUST be 32 bytes.
Sign request ID that will be used to sign the vote extensions. Only applicable for THRESHOLD_RECOVER_RAW vote extension type.
Tenderdash will use SHA256 checksum of sign_request_id when generating quorum signatures of
THRESHOLD_RECOVER_RAW vote extensions. It MUST NOT be set for any other vote extension types.
sign_request_id: Option<Vec<u8>>If not set, Tenderdash will generate it based on height and round.
If set, it SHOULD be unique per voting round, and it MUST start with dpevote or \x06plwdtx prefix.
Use with caution - it can have severe security consequences.
Implementations§
Source§impl ExtendVoteExtension
impl ExtendVoteExtension
Sourcepub fn type(&self) -> VoteExtensionType
pub fn type(&self) -> VoteExtensionType
Returns the enum value of type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_type(&mut self, value: VoteExtensionType)
pub fn set_type(&mut self, value: VoteExtensionType)
Sets type to the provided enum value.
Sourcepub fn sign_request_id(&self) -> &[u8] ⓘ
pub fn sign_request_id(&self) -> &[u8] ⓘ
Returns the value of sign_request_id, or the default value if sign_request_id is unset.
Trait Implementations§
Source§impl Clone for ExtendVoteExtension
impl Clone for ExtendVoteExtension
Source§fn clone(&self) -> ExtendVoteExtension
fn clone(&self) -> ExtendVoteExtension
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExtendVoteExtension
impl Debug for ExtendVoteExtension
Source§impl Default for ExtendVoteExtension
impl Default for ExtendVoteExtension
Source§impl<'de> Deserialize<'de> for ExtendVoteExtension
impl<'de> Deserialize<'de> for ExtendVoteExtension
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ExtendVoteExtension
impl Hash for ExtendVoteExtension
Source§impl Message for ExtendVoteExtension
impl Message for ExtendVoteExtension
Source§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.Source§impl PartialEq for ExtendVoteExtension
impl PartialEq for ExtendVoteExtension
Source§impl Serialize for ExtendVoteExtension
impl Serialize for ExtendVoteExtension
impl Eq for ExtendVoteExtension
impl StructuralPartialEq for ExtendVoteExtension
Auto Trait Implementations§
impl Freeze for ExtendVoteExtension
impl RefUnwindSafe for ExtendVoteExtension
impl Send for ExtendVoteExtension
impl Sync for ExtendVoteExtension
impl Unpin for ExtendVoteExtension
impl UnwindSafe for ExtendVoteExtension
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
§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].