Struct vapjson::spec::authority_round::AuthorityRoundParams[][src]

pub struct AuthorityRoundParams {
    pub step_duration: StepDuration,
    pub validators: ValidatorSet,
    pub start_step: Option<Uint>,
    pub validate_score_transition: Option<Uint>,
    pub validate_step_transition: Option<Uint>,
    pub immediate_transitions: Option<bool>,
    pub block_reward: Option<Uint>,
    pub block_reward_contract_transition: Option<Uint>,
    pub block_reward_contract_address: Option<Address>,
    pub block_reward_contract_transitions: Option<BTreeMap<Uint, Address>>,
    pub block_reward_contract_code: Option<Bytes>,
    pub maximum_uncle_count_transition: Option<Uint>,
    pub maximum_uncle_count: Option<Uint>,
    pub empty_steps_transition: Option<Uint>,
    pub maximum_empty_steps: Option<Uint>,
    pub strict_empty_steps_transition: Option<Uint>,
    pub two_thirds_majority_transition: Option<Uint>,
    pub randomness_contract_address: Option<BTreeMap<Uint, Address>>,
    pub block_gas_limit_contract_transitions: Option<BTreeMap<Uint, Address>>,
}

Authority params deserialization.

Fields

step_duration: StepDuration

Block duration, in seconds.

validators: ValidatorSet

Valid authorities

start_step: Option<Uint>

Starting step. Determined automatically if not specified. To be used for testing only.

validate_score_transition: Option<Uint>

Block at which score validation should start.

validate_step_transition: Option<Uint>

Block from which monotonic steps start.

immediate_transitions: Option<bool>

Whether transitions should be immediate.

block_reward: Option<Uint>

Reward per block in wei.

block_reward_contract_transition: Option<Uint>

Block at which the block reward contract should start being used. This option allows one to add a single block reward contract transition and is compatible with the multiple address option block_reward_contract_transitions below.

block_reward_contract_address: Option<Address>

Block reward contract address which overrides the block_reward setting. This option allows one to add a single block reward contract address and is compatible with the multiple address option block_reward_contract_transitions below.

block_reward_contract_transitions: Option<BTreeMap<Uint, Address>>

Block reward contract addresses with their associated starting block numbers.

Setting the block reward contract overrides block_reward. If the single block reward contract address is also present then it is added into the map at the block number stored in block_reward_contract_transition or 0 if that block number is not provided. Therefore both a single block reward contract transition and a map of reward contract transitions can be used simulataneously in the same configuration. In such a case the code requires that the block number of the single transition is strictly less than any of the block numbers in the map.

block_reward_contract_code: Option<Bytes>

Block reward code. This overrides the block reward contract address.

maximum_uncle_count_transition: Option<Uint>

Block at which maximum uncle count should be considered.

maximum_uncle_count: Option<Uint>

Maximum number of accepted uncles.

empty_steps_transition: Option<Uint>

Block at which empty step messages should start.

maximum_empty_steps: Option<Uint>

Maximum number of accepted empty steps.

strict_empty_steps_transition: Option<Uint>

Strict validation of empty steps transition block.

two_thirds_majority_transition: Option<Uint>

First block for which a 2/3 quorum (instead of 1/2) is required.

randomness_contract_address: Option<BTreeMap<Uint, Address>>

The random number contract’s address, or a map of contract transitions.

block_gas_limit_contract_transitions: Option<BTreeMap<Uint, Address>>

The addresses of contracts that determine the block gas limit starting from the block number associated with each of those contracts.

Trait Implementations

impl Debug for AuthorityRoundParams[src]

impl<'de> Deserialize<'de> for AuthorityRoundParams[src]

impl PartialEq<AuthorityRoundParams> for AuthorityRoundParams[src]

impl StructuralPartialEq for AuthorityRoundParams[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,