#[repr(i32)]pub enum VoteExtensionType {
Default = 0,
ThresholdRecover = 1,
ThresholdRecoverRaw = 2,
}Variants§
Default = 0
Unsupported
ThresholdRecover = 1
Sign canonical form of vote extension and threshold-recover signatures.
Deterministic vote extension - each validator in a quorum must provide the same vote extension data.
ThresholdRecoverRaw = 2
Sign raw form of vote extension and threshold-recover signatures.
Deterministic vote extension - each validator in a quorum must provide the same vote extension data. Use with caution - it can have severe security consequences, like replay attacks.
THRESHOLD_RECOVER_RAW alows overriding sign request ID with sign_request_id field
of ExtendVoteExtension.sign_request_id. If sign_request_id is provided, SHA256(sign_request_id) will be used as
a sign request ID.
It also changes how threshold-recover signatures are generated. Instead of signing canonical form of
threshold-recover signatures, it signs SHA256 of raw form of the vote extension (ExtendVoteExtension.extension).
Implementations§
Source§impl VoteExtensionType
impl VoteExtensionType
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for VoteExtensionType
impl Clone for VoteExtensionType
Source§fn clone(&self) -> VoteExtensionType
fn clone(&self) -> VoteExtensionType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VoteExtensionType
impl Debug for VoteExtensionType
Source§impl Default for VoteExtensionType
impl Default for VoteExtensionType
Source§fn default() -> VoteExtensionType
fn default() -> VoteExtensionType
Source§impl<'de> Deserialize<'de> for VoteExtensionType
impl<'de> Deserialize<'de> for VoteExtensionType
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 From<VoteExtensionType> for i32
impl From<VoteExtensionType> for i32
Source§fn from(value: VoteExtensionType) -> i32
fn from(value: VoteExtensionType) -> i32
Source§impl Hash for VoteExtensionType
impl Hash for VoteExtensionType
Source§impl Ord for VoteExtensionType
impl Ord for VoteExtensionType
Source§fn cmp(&self, other: &VoteExtensionType) -> Ordering
fn cmp(&self, other: &VoteExtensionType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for VoteExtensionType
impl PartialEq for VoteExtensionType
Source§impl PartialOrd for VoteExtensionType
impl PartialOrd for VoteExtensionType
Source§impl Serialize for VoteExtensionType
impl Serialize for VoteExtensionType
Source§impl TryFrom<i32> for VoteExtensionType
impl TryFrom<i32> for VoteExtensionType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<VoteExtensionType, UnknownEnumValue>
fn try_from(value: i32) -> Result<VoteExtensionType, UnknownEnumValue>
impl Copy for VoteExtensionType
impl Eq for VoteExtensionType
impl StructuralPartialEq for VoteExtensionType
Auto Trait Implementations§
impl Freeze for VoteExtensionType
impl RefUnwindSafe for VoteExtensionType
impl Send for VoteExtensionType
impl Sync for VoteExtensionType
impl Unpin for VoteExtensionType
impl UnwindSafe for VoteExtensionType
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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].