pub struct Header {
pub version: Option<Version>,
pub height: u64,
pub time: u64,
pub last_header_hash: Vec<u8>,
pub last_commit_hash: Vec<u8>,
pub data_hash: Vec<u8>,
pub consensus_hash: Vec<u8>,
pub app_hash: Vec<u8>,
pub last_results_hash: Vec<u8>,
pub proposer_address: Vec<u8>,
pub validator_hash: Vec<u8>,
pub chain_id: String,
}Expand description
Header is the header of a block in the blockchain.
Fields§
§version: Option<Version>Block and App version
height: u64Block height
time: u64Block creation time
last_header_hash: Vec<u8>Previous block info
last_commit_hash: Vec<u8>Commit from aggregator(s) from the last block
data_hash: Vec<u8>Block.Data root aka Transactions
consensus_hash: Vec<u8>Consensus params for current block
app_hash: Vec<u8>State after applying txs from the current block
last_results_hash: Vec<u8>Root hash of all results from the txs from the previous block. This is ABCI specific but smart-contract chains require some way of committing to transaction receipts/results.
proposer_address: Vec<u8>Original proposer of the block Note that the address can be derived from the pubkey which can be derived from the signature when using secp256k. We keep this in case users choose another signature format where the pubkey can’t be recovered by the signature (e.g. ed25519).
validator_hash: Vec<u8>validatorhash for compatibility with tendermint light client.
chain_id: StringChain ID the block belongs to
Trait Implementations§
Source§impl Message for Header
impl Message for Header
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
T in a tonic::Request