Crate vapcore_clique[][src]

Implementation of the Clique PoA Engine.

File structure:

  • mod.rs -> Provides the engine API implementation, with additional block state tracking
  • block_state.rs -> Records the Clique state for given block.
  • params.rs -> Contains the parameters for the Clique engine.
  • step_service.rs -> An event loop to trigger sealing.
  • util.rs -> Various standalone utility functions.
  • tests.rs -> Consensus tests as defined in EIP-225.

Structs

Clique

Clique Engine implementation

Enums

VoteType

Vote to add or remove the beneficiary

Constants

ADDRESS_LENGTH

Address length of signer

DIFF_INTURN

Difficulty for INTURN block

DIFF_NOTURN

Difficulty for NOTURN block

NONCE_AUTH_VOTE

Nonce value for AUTH vote

NONCE_DROP_VOTE

Nonce value for DROP vote

NULL_AUTHOR

Default empty author field value

NULL_MIXHASH

Default value for mixhash

NULL_NONCE

Default empty nonce value

NULL_UNCLES_HASH

Default value for uncles hash

SIGNATURE_LENGTH

Fixed number of extra-data suffix bytes reserved for signer signature

SIGNING_DELAY_NOTURN_MS

Default noturn block wiggle factor defined in spec.

STATE_CACHE_NUM

How many CliqueBlockState to cache in the memory.

VANITY_LENGTH

Fixed number of extra-data prefix bytes reserved for signer vanity