pub struct Clique { /* private fields */ }
Expand description

Clique Engine implementation

Implementations

Initialize Clique engine from empty state.

Trait Implementations

Clique doesn’t require external work to seal, so we always return true here.

Returns if we are ready to seal, the real sealing (signing extra_data) is actually done in on_seal_block().

Verify block family by looking up parent state (backfill if needed), then try to apply current header. see https://github.com/ethereum/go-ethereum/blob/master/consensus/clique/clique.go#L338

Clique timestamp is set to parent + period , or current time which ever is higher.

The name of this engine.

Get access to the underlying state machine.

The number of additional header fields required for this engine.

Maximum number of uncles a block is allowed to declare.

Block transformation functions, before the transactions. epoch_begin set to true if this block kicks off an epoch. Read more

Block transformation functions, after the transactions.

Allow mutating the header during seal generation. Currently only used by Clique.

Verify a locally-generated seal of a header. Read more

Phase 1 quick block verification. Only does checks that are cheap. Returns either a null Ok or a general error detailing the problem with import. The verification module can optionally avoid checking the seal (check_seal), if seal verification is disabled this method won’t be called. Read more

Phase 2 verification. Perform costly checks such as transaction signatures. Returns either a null Ok or a general error detailing the problem with import. The verification module can optionally avoid checking the seal (check_seal), if seal verification is disabled this method won’t be called. Read more

Genesis epoch data.

Populate a header’s fields based on its parent’s header. Usually implements the chain scoring rule based on weight. Read more

Register a component which signs consensus messages.

Add Client which can be used for sealing, potentially querying the state and sending messages.

Trigger next step of the consensus engine.

Check whether the parent timestamp is valid.

Check whether the given new block is the best block, after finalization check.

Returns author should used when executing tx’s for this block.

Additional engine-specific information for the user/developer concerning header.

Optional maximum gas limit.

Called in miner.chain_new_blocks if the engine wishes to update_sealing after a block was recently sealed. Read more

Phase 4 verification. Verify block header against potentially external data. Should only be called when register_client has been called previously. Read more

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

Whether a block is the end of an epoch. Read more

Create an epoch verifier from validation proof and a flag indicating whether finality is required. Read more

Handle any potential consensus messages; updating consensus state and potentially issuing a new one. Read more

Returns whether the current node is a validator and actually may seal a block if AuRa engine is used. Read more

Sign using the EngineSigner, to be used for consensus tx signing.

Create a factory for building snapshot chunks and restoring from them. Returning None indicates that this engine doesn’t support snapshot creation. Read more

Whether this engine supports warp sync.

the ancestry exists.

Returns a list of transactions for a new block if we are the author. Read more

Overrides the block gas limit. Whenever this returns Some for a header, the next block’s gas limit must be exactly that value. used by AuRa engine. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Get the general parameters of the chain.

Get the EVM schedule for the given block number.

Builtin-contracts for the chain..

Attempt to get a handle to a built-in contract. Only returns references to activated built-ins. Read more

Some intrinsic operation parameters; by default they take their value from the spec()’s engine_params.

The nonce with which accounts begin at given block.

The network ID that transactions should be signed with.

Returns new contract address generation scheme at given block number.

Unordered verification doesn’t rely on the transaction execution order, i.e. it should only verify stuff that doesn’t assume any previous transactions has already been verified and executed. Read more

Perform basic/cheap transaction verification. Read more

Additional information.

Performs pre-validation of RLP decoded transaction before other processing

Calculates base fee for the block that should be mined next. This base fee is calculated based on the parent header (last block in blockchain / best block). Read more

The configured minimum gas limit. Used by AuRa Engine.

Returns whether transactions from non externally owned accounts (EOA) are allowed in the given block number (see EIP-3607). Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.