pub struct Genesis {
pub chain_config_hash: Bytes32,
pub coins_root: Bytes32,
pub contracts_root: Bytes32,
pub messages_root: Bytes32,
}
Expand description
The first block of the blockchain is a genesis block. It determines the initial state of the network - contracts states, contracts balances, unspent coins, and messages. It also contains the hash on the initial config of the network that defines the consensus rules for following blocks.
Fields§
§chain_config_hash: Bytes32
The chain config define what consensus type to use, what settlement layer to use, rules of block validity, etc.
coins_root: Bytes32
The Binary Merkle Tree root of all genesis coins.
contracts_root: Bytes32
The Binary Merkle Tree root of state, balances, contracts code hash of each contract.
messages_root: Bytes32
The Binary Merkle Tree root of all genesis messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Genesis
impl RefUnwindSafe for Genesis
impl Send for Genesis
impl Sync for Genesis
impl Unpin for Genesis
impl UnwindSafe for Genesis
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,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more