pub struct Header {Show 14 fields
pub version: Option<Consensus>,
pub chain_id: String,
pub height: i64,
pub time: Option<Timestamp>,
pub last_block_id: Option<BlockId>,
pub last_commit_hash: Vec<u8>,
pub data_hash: Vec<u8>,
pub validators_hash: Vec<u8>,
pub next_validators_hash: Vec<u8>,
pub consensus_hash: Vec<u8>,
pub app_hash: Vec<u8>,
pub last_results_hash: Vec<u8>,
pub evidence_hash: Vec<u8>,
pub proposer_address: String,
}
Expand description
Header defines the structure of a Tendermint block header.
Fields§
§version: Option<Consensus>
basic block info
chain_id: String
§height: i64
§time: Option<Timestamp>
§last_block_id: Option<BlockId>
prev block info
last_commit_hash: Vec<u8>
hashes of block data
commit from validators from the last block
data_hash: Vec<u8>
transactions
validators_hash: Vec<u8>
hashes from the app output from the prev block
validators for the current block
next_validators_hash: Vec<u8>
validators for the next block
consensus_hash: Vec<u8>
consensus params for current block
app_hash: Vec<u8>
state after txs from the previous block
last_results_hash: Vec<u8>
root hash of all results from the txs from the previous block
evidence_hash: Vec<u8>
consensus info
evidence included in the block
proposer_address: String
proposer_address is the original block proposer address, formatted as a Bech32 string.
In Tendermint, this type is bytes
, but in the SDK, we convert it to a Bech32 string
for better UX.
original proposer of the block
Trait Implementations§
source§impl Message for Header
impl Message for Header
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn 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
source§fn 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.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq<Header> for Header
impl PartialEq<Header> for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request