pub struct MempoolGlobalConfig {
pub genesis_info: GenesisInfo,
pub consensus_config: Option<ConsensusConfig>,
}Expand description
Default zeros for start round and genesis time are the same in
ConsensusInfo.
This will replace genesis from master chain data only if this has time greater than in mc. Also, this genesis must have round not less than in last applied mc block.
Fields§
§genesis_info: GenesisInfostart round must be set to the processed_to_anchor_id from last applied master chain block
actual genesis round may be greater (or still equal) after alignment;
millis must be set not less than last applied mc block time, or better use actual time
consensus_config: Option<ConsensusConfig>To restart a stale consensus with a new config, the majority of nodes has to provide new common genesis and settings in a global config file. Then an external message must be sent to update blockchain config contract ASAP in order to issue a key block with updated consensus config and persist it in blockchain state. Until then “mempool” part of the global config file must contain all the same data.
It’s because a block can include any settings only when config contract is called, otherwise contract state will not match. Quite the opposite is a recovery genesis info: it is immediately included into the first master chain block as an “extra” part, and makes it a key block.
Trait Implementations§
Source§impl Clone for MempoolGlobalConfig
impl Clone for MempoolGlobalConfig
Source§fn clone(&self) -> MempoolGlobalConfig
fn clone(&self) -> MempoolGlobalConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MempoolGlobalConfig
impl Debug for MempoolGlobalConfig
Source§impl<'de> Deserialize<'de> for MempoolGlobalConfig
impl<'de> Deserialize<'de> for MempoolGlobalConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for MempoolGlobalConfig
impl RefUnwindSafe for MempoolGlobalConfig
impl Send for MempoolGlobalConfig
impl Sync for MempoolGlobalConfig
impl Unpin for MempoolGlobalConfig
impl UnwindSafe for MempoolGlobalConfig
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> 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>
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>
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