pub struct RequestVerifyVoteExtension {
pub hash: Vec<u8>,
pub validator_pro_tx_hash: Vec<u8>,
pub height: i64,
pub round: i32,
pub vote_extensions: Vec<ExtendVoteExtension>,
}Expand description
Verify the vote extension
§Usage
RequestVerifyVoteExtension.vote_extensioncan be an empty byte array. The Application’s interpretation of it should be that the Application running at the process that sent the vote chose not to extend it. Tenderdash will always callRequestVerifyVoteExtension, even for 0 length vote extensions.- If
ResponseVerifyVoteExtension.statusisREJECT, Tenderdash will reject the whole received vote. See the Requirements section to understand the potential liveness implications of this. - The implementation of
VerifyVoteExtensionMUST be deterministic. Moreover, the value ofResponseVerifyVoteExtension.statusMUST exclusively depend on the parameters passed in the call toRequestVerifyVoteExtension, and the last committed Application state (see Requirements section). - Moreover, application implementers SHOULD always set
ResponseVerifyVoteExtension.statustoACCEPT, unless they really know what the potential liveness implications of returningREJECTare.
§When does Tenderdash call it?
When a validator p is in Tenderdash consensus round r, height h, state prevote (TODO discuss: I think I must remove the state from this condition, but not sure), and p receives a Precommit message for round r, height h from q:
- If the Precommit message does not contain a vote extensions with a valid signature, Tenderdash discards the message as invalid.
- a 0-length vote extensions is valid as long as its accompanying signature is also valid.
- Else, p’s Tenderdash calls
RequestVerifyVoteExtension. - The Application returns accept or reject via
ResponseVerifyVoteExtension.status. - If the Application returns
- accept, p’s Tenderdash will keep the received vote, together with its corresponding
vote extension in its internal data structures. It will be used to populate the ExtendedCommitInfo
structure in calls to
RequestPrepareProposal, in rounds of height h + 1 where p is the proposer. - reject, p’s Tenderdash will deem the Precommit message invalid and discard it.
Fields§
§hash: Vec<u8>The header hash of the propsed block that the vote extensions refers to.
validator_pro_tx_hash: Vec<u8>ProTxHash of the validator that signed the extensions.
height: i64Height of the block (for sanity check).
round: i32// Round number for the block.
vote_extensions: Vec<ExtendVoteExtension>Application-specific information signed by Tenderdash. Can have 0 length.
Trait Implementations§
Source§impl Clone for RequestVerifyVoteExtension
impl Clone for RequestVerifyVoteExtension
Source§fn clone(&self) -> RequestVerifyVoteExtension
fn clone(&self) -> RequestVerifyVoteExtension
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestVerifyVoteExtension
impl Debug for RequestVerifyVoteExtension
Source§impl Default for RequestVerifyVoteExtension
impl Default for RequestVerifyVoteExtension
Source§impl<'de> Deserialize<'de> for RequestVerifyVoteExtension
impl<'de> Deserialize<'de> for RequestVerifyVoteExtension
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<RequestVerifyVoteExtension> for Value
impl From<RequestVerifyVoteExtension> for Value
Source§fn from(value: RequestVerifyVoteExtension) -> Self
fn from(value: RequestVerifyVoteExtension) -> Self
Converts to this type from the input type.
Source§impl Message for RequestVerifyVoteExtension
impl Message for RequestVerifyVoteExtension
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for RequestVerifyVoteExtension
Auto Trait Implementations§
impl Freeze for RequestVerifyVoteExtension
impl RefUnwindSafe for RequestVerifyVoteExtension
impl Send for RequestVerifyVoteExtension
impl Sync for RequestVerifyVoteExtension
impl Unpin for RequestVerifyVoteExtension
impl UnwindSafe for RequestVerifyVoteExtension
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].