Struct ethcore::engines::AuthorityRound  
                   
                       [−]
                   
               [src]
pub struct AuthorityRound { /* fields omitted */ }Engine using AuthorityRound proof-of-authority BFT consensus.
Methods
impl AuthorityRound[src] 
impl AuthorityRoundpub fn new(
    our_params: AuthorityRoundParams, 
    machine: EthereumMachine
) -> Result<Arc<Self>, Error>[src] 
pub fn new(
    our_params: AuthorityRoundParams, 
    machine: EthereumMachine
) -> Result<Arc<Self>, Error>Create a new instance of AuthorityRound engine.
Trait Implementations
impl Engine<EthereumMachine> for AuthorityRound[src] 
impl Engine<EthereumMachine> for AuthorityRoundfn name(&self) -> &str[src] 
fn name(&self) -> &strThe name of this engine.
fn machine(&self) -> &EthereumMachine[src] 
fn machine(&self) -> &EthereumMachineGet access to the underlying state machine.
fn seal_fields(&self, header: &Header) -> usize[src] 
fn seal_fields(&self, header: &Header) -> usizeThree fields - consensus step and the corresponding proposer signature, and a list of empty step messages (which should be empty if no steps are skipped)
fn step(&self)[src] 
fn step(&self)Trigger next step of the consensus engine.
fn extra_info(&self, header: &Header) -> BTreeMap<String, String>[src] 
fn extra_info(&self, header: &Header) -> BTreeMap<String, String>Additional engine-specific information for the user/developer concerning header.
fn maximum_uncle_count(&self, block: BlockNumber) -> usize[src] 
fn maximum_uncle_count(&self, block: BlockNumber) -> usizeMaximum number of uncles a block is allowed to declare.
fn populate_from_parent(&self, header: &mut Header, parent: &Header)[src] 
fn populate_from_parent(&self, header: &mut Header, parent: &Header)Populate a header's fields based on its parent's header. Usually implements the chain scoring rule based on weight. Read more
fn seals_internally(&self) -> Option<bool>[src] 
fn seals_internally(&self) -> Option<bool>None means that it requires external input (e.g. PoW) to seal a block. Some(true) means the engine is currently prime for seal generation (i.e. node is the current validator). Some(false) means that the node might seal internally but is not qualified now. Read more
fn handle_message(&self, rlp: &[u8]) -> Result<(), EngineError>[src] 
fn handle_message(&self, rlp: &[u8]) -> Result<(), EngineError>Handle any potential consensus messages; updating consensus state and potentially issuing a new one. Read more
fn generate_seal(&self, block: &ExecutedBlock, parent: &Header) -> Seal[src] 
fn generate_seal(&self, block: &ExecutedBlock, parent: &Header) -> SealAttempt to seal the block internally.
This operation is synchronous and may (quite reasonably) not be available, in which case
Seal::None will be returned.
fn verify_local_seal(&self, _header: &Header) -> Result<(), Error>[src] 
fn verify_local_seal(&self, _header: &Header) -> Result<(), Error>Verify a locally-generated seal of a header. Read more
fn on_new_block(
    &self, 
    block: &mut ExecutedBlock, 
    epoch_begin: bool, 
    _ancestry: &mut Iterator<Item = ExtendedHeader>
) -> Result<(), Error>[src] 
fn on_new_block(
    &self, 
    block: &mut ExecutedBlock, 
    epoch_begin: bool, 
    _ancestry: &mut Iterator<Item = ExtendedHeader>
) -> Result<(), Error>Block transformation functions, before the transactions. epoch_begin set to true if this block kicks off an epoch. Read more
fn on_close_block(&self, block: &mut ExecutedBlock) -> Result<(), Error>[src] 
fn on_close_block(&self, block: &mut ExecutedBlock) -> Result<(), Error>Apply the block reward on finalisation of the block.
fn verify_block_basic(&self, header: &Header) -> Result<(), Error>[src] 
fn verify_block_basic(&self, header: &Header) -> Result<(), Error>Check the number of seal fields.
fn verify_block_family(
    &self, 
    header: &Header, 
    parent: &Header
) -> Result<(), Error>[src] 
fn verify_block_family(
    &self, 
    header: &Header, 
    parent: &Header
) -> Result<(), Error>Do the step and gas limit validation.
fn verify_block_external(&self, header: &Header) -> Result<(), Error>[src] 
fn verify_block_external(&self, header: &Header) -> Result<(), Error>Phase 4 verification. Verify block header against potentially external data. Should only be called when register_client has been called previously. Read more
fn genesis_epoch_data(
    &self, 
    header: &Header, 
    call: &Call
) -> Result<Vec<u8>, String>[src] 
fn genesis_epoch_data(
    &self, 
    header: &Header, 
    call: &Call
) -> Result<Vec<u8>, String>Genesis epoch data.
fn signals_epoch_end(
    &self, 
    header: &Header, 
    aux: AuxiliaryData
) -> EpochChange<EthereumMachine>[src] 
fn signals_epoch_end(
    &self, 
    header: &Header, 
    aux: AuxiliaryData
) -> EpochChange<EthereumMachine>Whether an epoch change is signalled at the given header but will require finality. If a change can be enacted immediately then return No from this function but Yes from is_epoch_end. Read more
fn is_epoch_end(
    &self, 
    chain_head: &Header, 
    chain: &Headers<Header>, 
    transition_store: &PendingTransitionStore
) -> Option<Vec<u8>>[src] 
fn is_epoch_end(
    &self, 
    chain_head: &Header, 
    chain: &Headers<Header>, 
    transition_store: &PendingTransitionStore
) -> Option<Vec<u8>>Whether a block is the end of an epoch. Read more
fn epoch_verifier<'a>(
    &self, 
    _header: &Header, 
    proof: &'a [u8]
) -> ConstructedVerifier<'a, EthereumMachine>[src] 
fn epoch_verifier<'a>(
    &self, 
    _header: &Header, 
    proof: &'a [u8]
) -> ConstructedVerifier<'a, EthereumMachine>Create an epoch verifier from validation proof and a flag indicating whether finality is required. Read more
fn register_client(&self, client: Weak<EngineClient>)[src] 
fn register_client(&self, client: Weak<EngineClient>)Add Client which can be used for sealing, potentially querying the state and sending messages.
fn set_signer(
    &self, 
    ap: Arc<AccountProvider>, 
    address: Address, 
    password: String
)[src] 
fn set_signer(
    &self, 
    ap: Arc<AccountProvider>, 
    address: Address, 
    password: String
)Register an account which signs consensus messages.
fn sign(&self, hash: H256) -> Result<Signature, Error>[src] 
fn sign(&self, hash: H256) -> Result<Signature, Error>Sign using the EngineSigner, to be used for consensus tx signing.
fn snapshot_components(&self) -> Option<Box<SnapshotComponents>>[src] 
fn snapshot_components(&self) -> Option<Box<SnapshotComponents>>Create a factory for building snapshot chunks and restoring from them. Returning None indicates that this engine doesn't support snapshot creation. Read more
fn fork_choice(
    &self, 
    new: &ExtendedHeader, 
    current: &ExtendedHeader
) -> ForkChoice[src] 
fn fork_choice(
    &self, 
    new: &ExtendedHeader, 
    current: &ExtendedHeader
) -> ForkChoiceCheck whether the given new block is the best block, after finalization check.
fn maximum_uncle_age(&self) -> usize[src] 
fn maximum_uncle_age(&self) -> usizeThe number of generations back that uncles can be.
fn verify_block_unordered(&self, _header: &M::Header) -> Result<(), M::Error>[src] 
fn verify_block_unordered(&self, _header: &M::Header) -> Result<(), M::Error>Phase 2 verification. Perform costly checks such as transaction signatures. Returns either a null Ok or a general error detailing the problem with import.
fn is_proposal(&self, _verified_header: &M::Header) -> bool[src] 
fn is_proposal(&self, _verified_header: &M::Header) -> boolFind out if the block is a proposal block and should not be inserted into the DB. Takes a header of a fully verified block. Read more
fn stop(&self)[src] 
fn stop(&self)Stops any services that the may hold the Engine and makes it safe to drop.
fn supports_warp(&self) -> bool[src] 
fn supports_warp(&self) -> boolWhether this engine supports warp sync.
fn open_block_header_timestamp(&self, parent_timestamp: u64) -> u64[src] 
fn open_block_header_timestamp(&self, parent_timestamp: u64) -> u64Return a new open block header timestamp based on the parent timestamp.
fn is_timestamp_valid(
    &self, 
    header_timestamp: u64, 
    parent_timestamp: u64
) -> bool[src] 
fn is_timestamp_valid(
    &self, 
    header_timestamp: u64, 
    parent_timestamp: u64
) -> boolCheck whether the parent timestamp is valid.
fn ancestry_actions(
    &self, 
    _block: &M::LiveBlock, 
    _ancestry: &mut Iterator<Item = M::ExtendedHeader>
) -> Vec<AncestryAction>[src] 
fn ancestry_actions(
    &self, 
    _block: &M::LiveBlock, 
    _ancestry: &mut Iterator<Item = M::ExtendedHeader>
) -> Vec<AncestryAction>Gather all ancestry actions. Called at the last stage when a block is committed. The Engine must guarantee that the ancestry exists. Read more
Auto Trait Implementations
impl Send for AuthorityRound
impl Send for AuthorityRoundimpl Sync for AuthorityRound
impl Sync for AuthorityRound