Struct ethcore::ethereum::ethash::Ethash [] [src]

pub struct Ethash { /* fields omitted */ }

Engine using Ethash proof-of-work consensus algorithm, suitable for Ethereum mainnet chains in the Olympic, Frontier and Homestead eras.

Methods

impl Ethash
[src]

Create a new instance of Ethash engine

impl Ethash
[src]

Convert an Ethash boundary to its original difficulty. Basically just f(x) = 2^256 / x.

Convert an Ethash difficulty to the target boundary. Basically just f(x) = 2^256 / x.

Trait Implementations

impl Engine for Ethash
[src]

The name of this engine.

The version of this engine. Should be of the form

The number of additional header fields required for this engine.

Get the general parameters of the chain.

Additional information.

Builtin-contracts we would like to see in the chain. (In principle these are just hints for the engine since that has the last word on them.) Read more

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

Get the EVM schedule for the given env_info.

The network ID that transactions should be signed with.

Populate a header's fields based on its parent's header. Usually implements the chain scoring rule based on weight. The gas floor target must not be lower than the engine's minimum gas limit. Read more

Block transformation functions, before the transactions.

Apply the block reward on finalisation of the block. This assumes that all uncles are valid uncles (i.e. of at least one generation before the current).

Phase 1 quick block verification. Only does checks that are cheap. block (the header's full block) may be provided for additional checks. Returns either a null Ok or a general error detailing the problem with import. Read more

Phase 2 verification. Perform costly checks such as transaction signatures. block (the header's full block) may be provided for additional checks. Returns either a null Ok or a general error detailing the problem with import. Read more

Phase 3 verification. Check block information against parent and uncles. block (the header's full block) may be provided for additional checks. Returns either a null Ok or a general error detailing the problem with import. Read more

Additional verification for transactions in blocks.

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

Maximum number of uncles a block is allowed to declare.

The number of generations back that uncles can be.

The nonce with which accounts begin.

If Some(true) this author is able to generate seals, generate_seal has to be implemented. None indicates that this Engine never seals internally regardless of author (e.g. PoW). Read more

Checks if default address is able to seal.

Attempt to seal the block internally. Read more

Verify a particular transaction is valid.

Verify the seal of a block. This is an auxilliary method that actually just calls other verify_ methods to get the job done. By default it must pass verify_basic and verify_block_unordered. If more or fewer methods are needed for an Engine, this may be overridden. Read more

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

Determine whether a particular address is a builtin contract.

Determine the code execution cost of the builtin contract with address a. Panics if is_builtin(a) is not true. Read more

Execution the builtin contract a on input and return output. Panics if is_builtin(a) is not true. Read more

Find 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

Register an account which signs consensus messages.

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

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

Trigger next step of the consensus engine.

Stops any services that the may hold the Engine and makes it safe to drop.