pub enum OnChainConsensusConfig {
V1(ConsensusConfigV1),
}Expand description
The on-chain consensus config, in order to be able to add fields, we use enum to wrap the actual struct.
Variants
V1(ConsensusConfigV1)
Implementations
sourceimpl OnChainConsensusConfig
impl OnChainConsensusConfig
The public interface that exposes all values with safe fallback.
sourcepub fn leader_reputation_exclude_round(&self) -> u64
pub fn leader_reputation_exclude_round(&self) -> u64
The number of recent rounds that don’t count into reputations.
sourcepub fn decoupled_execution(&self) -> bool
pub fn decoupled_execution(&self) -> bool
Decouple execution from consensus or not.
sourcepub fn back_pressure_limit(&self) -> u64
pub fn back_pressure_limit(&self) -> u64
Backpressure controls
- how much gaps can be between ordered and committed blocks in decoupled execution setup.
- how much gaps can be between the root and the remote sync info ledger.
pub fn proposer_election_type(&self) -> &ProposerElectionType
Trait Implementations
sourceimpl Clone for OnChainConsensusConfig
impl Clone for OnChainConsensusConfig
sourcefn clone(&self) -> OnChainConsensusConfig
fn clone(&self) -> OnChainConsensusConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for OnChainConsensusConfig
impl Debug for OnChainConsensusConfig
sourceimpl Default for OnChainConsensusConfig
impl Default for OnChainConsensusConfig
This is used when on-chain config is not initialized.
sourceimpl<'de> Deserialize<'de> for OnChainConsensusConfig
impl<'de> Deserialize<'de> for OnChainConsensusConfig
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl OnChainConfig for OnChainConsensusConfig
impl OnChainConfig for OnChainConsensusConfig
sourcefn deserialize_into_config(bytes: &[u8]) -> Result<Self>
fn deserialize_into_config(bytes: &[u8]) -> Result<Self>
The Move resource is
struct AptosConsensusConfig has copy, drop, store {
config: vector<u8>,
}so we need two rounds of bcs deserilization to turn it back to OnChainConsensusConfig
const MODULE_IDENTIFIER: &'static str = "consensus_config"
const TYPE_IDENTIFIER: &'static str = "ConsensusConfig"
const ADDRESS: &'static str = "0x1"
const CONFIG_ID: ConfigID = _
fn deserialize_default_impl(bytes: &[u8]) -> Result<Self>
fn fetch_config<T>(storage: &T) -> Option<Self> where
T: ConfigStorage,
sourceimpl PartialEq<OnChainConsensusConfig> for OnChainConsensusConfig
impl PartialEq<OnChainConsensusConfig> for OnChainConsensusConfig
sourcefn eq(&self, other: &OnChainConsensusConfig) -> bool
fn eq(&self, other: &OnChainConsensusConfig) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &OnChainConsensusConfig) -> bool
fn ne(&self, other: &OnChainConsensusConfig) -> bool
This method tests for !=.
sourceimpl Serialize for OnChainConsensusConfig
impl Serialize for OnChainConsensusConfig
impl StructuralPartialEq for OnChainConsensusConfig
Auto Trait Implementations
impl RefUnwindSafe for OnChainConsensusConfig
impl Send for OnChainConsensusConfig
impl Sync for OnChainConsensusConfig
impl Unpin for OnChainConsensusConfig
impl UnwindSafe for OnChainConsensusConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
sourcefn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more