Trait ethcore::engines::EthEngine[][src]

pub trait EthEngine: Engine<EthereumMachine> {
    fn params(&self) -> &CommonParams { ... }
fn schedule(&self, block_number: BlockNumber) -> Schedule { ... }
fn builtins(&self) -> &BTreeMap<Address, Builtin> { ... }
fn builtin(
        &self,
        a: &Address,
        block_number: BlockNumber
    ) -> Option<&Builtin> { ... }
fn maximum_extra_data_size(&self) -> usize { ... }
fn account_start_nonce(&self, block: BlockNumber) -> U256 { ... }
fn signing_chain_id(&self, env_info: &EnvInfo) -> Option<u64> { ... }
fn create_address_scheme(
        &self,
        number: BlockNumber
    ) -> CreateContractAddress { ... }
fn verify_transaction_unordered(
        &self,
        t: UnverifiedTransaction,
        header: &Header
    ) -> Result<SignedTransaction, Error> { ... }
fn verify_transaction_basic(
        &self,
        t: &UnverifiedTransaction,
        header: &Header
    ) -> Result<(), Error> { ... }
fn additional_params(&self) -> HashMap<String, String> { ... }
fn decode_transaction(
        &self,
        transaction: &[u8]
    ) -> Result<UnverifiedTransaction, Error> { ... } }

Common type alias for an engine coupled with an Ethereum-like state machine.

Provided Methods

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.

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.

Verify a particular transaction is valid.

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.

NOTE This function consumes an UnverifiedTransaction and produces SignedTransaction which implies that a heavy check of the signature is performed here.

Perform basic/cheap transaction verification.

This should include all cheap checks that can be done before actually checking the signature, like chain-replay protection.

NOTE This is done before the signature is recovered so avoid doing any state-touching checks that might be expensive.

TODO: Add flags for which bits of the transaction to check. TODO: consider including State in the params.

Additional information.

Performs pre-validation of RLP decoded transaction before other processing

Implementors