pub struct CoreConfig {Show 38 fields
pub era_duration: TimeDiff,
pub minimum_era_height: u64,
pub minimum_block_time: TimeDiff,
pub validator_slots: u32,
pub finality_threshold_fraction: Ratio<u64>,
pub start_protocol_version_with_strict_finality_signatures_required: ProtocolVersion,
pub legacy_required_finality: LegacyRequiredFinality,
pub auction_delay: u64,
pub locked_funds_period: TimeDiff,
pub vesting_schedule_period: TimeDiff,
pub unbonding_delay: u64,
pub round_seigniorage_rate: Ratio<u64>,
pub max_associated_keys: u32,
pub max_runtime_call_stack_height: u32,
pub minimum_delegation_amount: u64,
pub maximum_delegation_amount: u64,
pub minimum_bid_amount: u64,
pub prune_batch_size: u64,
pub strict_argument_checking: bool,
pub simultaneous_peer_requests: u8,
pub consensus_protocol: ConsensusProtocolName,
pub max_delegators_per_validator: u32,
pub finders_fee: Ratio<u64>,
pub finality_signature_proportion: Ratio<u64>,
pub validator_credit_cap: Ratio<u64>,
pub signature_rewards_max_delay: u64,
pub allow_auction_bids: bool,
pub allow_unrestricted_transfers: bool,
pub compute_rewards: bool,
pub refund_handling: RefundHandling,
pub fee_handling: FeeHandling,
pub pricing_handling: PricingHandling,
pub allow_prepaid: bool,
pub gas_hold_balance_handling: HoldBalanceHandling,
pub gas_hold_interval: TimeDiff,
pub administrators: BTreeSet<PublicKey>,
pub enable_addressable_entity: bool,
pub baseline_motes_amount: u64,
}std only.Expand description
Configuration values associated with the core protocol.
Fields§
§era_duration: TimeDiffDuration of an era.
minimum_era_height: u64Minimum era height.
minimum_block_time: TimeDiffMinimum block time.
validator_slots: u32Validator slots.
finality_threshold_fraction: Ratio<u64>Finality threshold fraction.
start_protocol_version_with_strict_finality_signatures_required: ProtocolVersionProtocol version from which nodes are required to hold strict finality signatures.
legacy_required_finality: LegacyRequiredFinalityWhich finality is required for legacy blocks.
Used to determine finality sufficiency for new joiners syncing blocks created
in a protocol version before
start_protocol_version_with_strict_finality_signatures_required.
auction_delay: u64Number of eras before an auction actually defines the set of validators. If you bond with a sufficient bid in era N, you will be a validator in era N + auction_delay + 1
locked_funds_period: TimeDiffThe period after genesis during which a genesis validator’s bid is locked.
vesting_schedule_period: TimeDiffThe period in which genesis validator’s bid is released over time after it’s unlocked.
unbonding_delay: u64The delay in number of eras for paying out the unbonding amount.
round_seigniorage_rate: Ratio<u64>Round seigniorage rate represented as a fractional number.
max_associated_keys: u32Maximum number of associated keys for a single account.
max_runtime_call_stack_height: u32Maximum height of contract runtime call stack.
minimum_delegation_amount: u64The minimum bound of motes that can be delegated to a validator.
maximum_delegation_amount: u64The maximum bound of motes that can be delegated to a validator.
minimum_bid_amount: u64The minimum bound of motes that can be bid for a validator.
prune_batch_size: u64Global state prune batch size (0 means the feature is off in the current protocol version).
strict_argument_checking: boolEnables strict arguments checking when calling a contract.
simultaneous_peer_requests: u8How many peers to simultaneously ask when sync leaping.
consensus_protocol: ConsensusProtocolNameWhich consensus protocol to use.
max_delegators_per_validator: u32The maximum amount of delegators per validator. if the value is 0, there is no maximum capacity.
finders_fee: Ratio<u64>The split in finality signature rewards between block producer and participating signers.
finality_signature_proportion: Ratio<u64>The proportion of baseline rewards going to reward finality signatures specifically.
validator_credit_cap: Ratio<u64>The cap for validator credits based upon a proportion of a receiving validator’s total stake.
signature_rewards_max_delay: u64Lookback interval indicating which past block we are looking at to reward.
allow_auction_bids: boolAuction entrypoints such as “add_bid” or “delegate” are disabled if this flag is set to
false. Setting up this option makes sense only for private chains where validator set
rotation is unnecessary.
allow_unrestricted_transfers: boolAllows unrestricted transfers between users.
compute_rewards: boolIf set to false then consensus doesn’t compute rewards and always uses 0.
refund_handling: RefundHandlingRefund handling.
fee_handling: FeeHandlingFee handling.
pricing_handling: PricingHandlingPricing handling.
allow_prepaid: boolAllow prepaid.
gas_hold_balance_handling: HoldBalanceHandlingHow do gas holds affect available balance calculations?
gas_hold_interval: TimeDiffHow long does it take for a gas hold to expire?
administrators: BTreeSet<PublicKey>Administrative accounts are a valid option for a private chain only.
enable_addressable_entity: boolTurn on migration to addressable entity behavior.
baseline_motes_amount: u64This value is used as the penalty payment amount, the minimum balance amount, and the minimum consumed amount.
Implementations§
Source§impl CoreConfig
impl CoreConfig
Sourcepub fn enable_addressable_entity(&self) -> bool
pub fn enable_addressable_entity(&self) -> bool
Turn on migration to addressable entity behavior.
Sourcepub fn recent_era_count(&self) -> u64
pub fn recent_era_count(&self) -> u64
The number of eras that have already started and whose validators are still bonded.
Sourcepub fn production_rewards_proportion(&self) -> Ratio<u64>
pub fn production_rewards_proportion(&self) -> Ratio<u64>
The proportion of the total rewards going to block production.
Sourcepub fn collection_rewards_proportion(&self) -> Ratio<u64>
pub fn collection_rewards_proportion(&self) -> Ratio<u64>
The finder’s fee, i.e. the proportion of the total rewards going to the validator collecting the finality signatures which is the validator producing the block.
Sourcepub fn contribution_rewards_proportion(&self) -> Ratio<u64>
pub fn contribution_rewards_proportion(&self) -> Ratio<u64>
The proportion of the total rewards going to finality signatures collection.
Sourcepub fn baseline_motes_amount_u512(&self) -> U512
pub fn baseline_motes_amount_u512(&self) -> U512
The baseline motes amount as a U512.
Trait Implementations§
Source§impl Clone for CoreConfig
impl Clone for CoreConfig
Source§fn clone(&self) -> CoreConfig
fn clone(&self) -> CoreConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DataSize for CoreConfig
impl DataSize for CoreConfig
Source§const IS_DYNAMIC: bool = true
const IS_DYNAMIC: bool = true
true, the type has a heap size that can vary at runtime, depending on the actual value.Source§const STATIC_HEAP_SIZE: usize = 0usize
const STATIC_HEAP_SIZE: usize = 0usize
IS_DYNAMIC is false, this is
the total amount of heap memory occupied by the value. Otherwise this is a lower bound.Source§fn estimate_heap_size(&self) -> usize
fn estimate_heap_size(&self) -> usize
Source§impl Debug for CoreConfig
impl Debug for CoreConfig
Source§impl Default for CoreConfig
impl Default for CoreConfig
Source§impl<'de> Deserialize<'de> for CoreConfig
impl<'de> Deserialize<'de> for CoreConfig
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>,
Source§impl FromBytes for CoreConfig
impl FromBytes for CoreConfig
Source§impl PartialEq for CoreConfig
impl PartialEq for CoreConfig
Source§impl Serialize for CoreConfig
impl Serialize for CoreConfig
Source§impl ToBytes for CoreConfig
impl ToBytes for CoreConfig
Source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Vec<u8> which would be returned from a successful call to
to_bytes() or into_bytes(). The data is not actually serialized, so this call is
relatively cheap.impl Eq for CoreConfig
impl StructuralPartialEq for CoreConfig
Auto Trait Implementations§
impl Freeze for CoreConfig
impl RefUnwindSafe for CoreConfig
impl Send for CoreConfig
impl Sync for CoreConfig
impl Unpin for CoreConfig
impl UnwindSafe for CoreConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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