Struct zksync_consensus_roles::validator::GenesisRaw
source · pub struct GenesisRaw {
pub chain_id: ChainId,
pub fork_number: ForkNumber,
pub protocol_version: ProtocolVersion,
pub first_block: BlockNumber,
pub validators: Committee,
pub attesters: Option<Committee>,
pub leader_selection: LeaderSelectionMode,
}
Expand description
Genesis of the blockchain, unique for each blockchain instance.
Fields§
§chain_id: ChainId
ID of the blockchain.
fork_number: ForkNumber
Number of the fork. Should be incremented every time the genesis is updated, i.e. whenever a hard fork is performed.
protocol_version: ProtocolVersion
Protocol version used by this fork.
first_block: BlockNumber
First block of a fork.
validators: Committee
Set of validators of the chain.
attesters: Option<Committee>
Set of attesters of the chain.
leader_selection: LeaderSelectionMode
The mode used for selecting leader for a given view.
Implementations§
Trait Implementations§
source§impl Clone for GenesisRaw
impl Clone for GenesisRaw
source§fn clone(&self) -> GenesisRaw
fn clone(&self) -> GenesisRaw
Returns a copy 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 GenesisRaw
impl Debug for GenesisRaw
source§impl Distribution<GenesisRaw> for Standard
impl Distribution<GenesisRaw> for Standard
source§impl PartialEq for GenesisRaw
impl PartialEq for GenesisRaw
source§impl ProtoFmt for GenesisRaw
impl ProtoFmt for GenesisRaw
impl StructuralPartialEq for GenesisRaw
Auto Trait Implementations§
impl Freeze for GenesisRaw
impl RefUnwindSafe for GenesisRaw
impl Send for GenesisRaw
impl Sync for GenesisRaw
impl Unpin for GenesisRaw
impl UnwindSafe for GenesisRaw
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)