pub struct BlockHeader {
Show 13 fields pub hash: Sha256Hash, pub height: u64, pub justify: QuorumCertificate, pub data_hash: CryptoHash, pub chain_id: ChainID, pub proposer: PublicAddress, pub timestamp: u32, pub base_fee: u64, pub gas_used: u64, pub txs_hash: Sha256Hash, pub receipts_hash: Sha256Hash, pub state_hash: Sha256Hash, pub log_bloom: BloomFilter,
}
Expand description

Block header defines meta information of a block, including evidence for verifying validity of the block.

Fields§

§hash: Sha256Hash

Block hash of this block

§height: u64

The number of Justify-links between this Block and the Genesis Block. 0 for the Genesis Block

§justify: QuorumCertificate

A QuorumCertificate that points to the Block’s parent

§data_hash: CryptoHash

The SHA256 Hash over content inside the block header

§chain_id: ChainID

A number unique to a particular ParallelChain Mainnet-based blockchain. This prevents, for example, Blocks from one chain from being published in another chain as evidence of malfeasance.

§proposer: PublicAddress

The Public Address of the Validator that is the Leader of the View this Block was proposed in

§timestamp: u32

A Unix timestamp

§base_fee: u64

The (inclusive) minimum number of Grays that a Transaction included in this Block must pay for every Gas used.

§gas_used: u64

The total gas used for producing the block.

§txs_hash: Sha256Hash

Transactions Hash, the Binary Merkle Tree root hash over the Block’s Transactions

§receipts_hash: Sha256Hash

Receipts Hash, the Binary Merkle Tree root hash over the Block’s Receipts

§state_hash: Sha256Hash

State Hash, the SHA256 root hash of the blockchain’s World State Merkle Patricia Trie (MPT) after executing all of this Block’s Transactions

§log_bloom: BloomFilter

Log Bloom, the 256-byte Block-level Bloom Filter union of all the Bloom Filters of each Log topic from the Block’s Receipts

Trait Implementations§

source§

impl BorshDeserialize for BlockHeaderwhere Sha256Hash: BorshDeserialize, u64: BorshDeserialize, QuorumCertificate: BorshDeserialize, CryptoHash: BorshDeserialize, ChainID: BorshDeserialize, PublicAddress: BorshDeserialize, u32: BorshDeserialize, BloomFilter: BorshDeserialize,

source§

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,

source§

impl BorshSerialize for BlockHeaderwhere Sha256Hash: BorshSerialize, u64: BorshSerialize, QuorumCertificate: BorshSerialize, CryptoHash: BorshSerialize, ChainID: BorshSerialize, PublicAddress: BorshSerialize, u32: BorshSerialize, BloomFilter: BorshSerialize,

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

source§

fn try_to_vec(&self) -> Result<Vec<u8, Global>, Error>

Serialize this instance into a vector of bytes.
source§

impl Clone for BlockHeader

source§

fn clone(&self) -> BlockHeader

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Deserializable for BlockHeader

source§

fn deserialize(args: &[u8]) -> Result<Self, Error>

source§

impl Serializable for BlockHeader

source§

fn serialize(&self) -> Vec<u8>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V