From c85cabb598087ae0f69ef681ae590f0f1faea3a4 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 23 Dec 2015 11:56:38 +0000 Subject: [PATCH] Additional notes. --- src/engine.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine.rs b/src/engine.rs index b89b86f9e..d920f4bef 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -29,7 +29,7 @@ pub trait Engine { /// Get the general parameters of the chain. fn spec(&self) -> &Spec; - /// Get the EVM schedule for + /// Get the EVM schedule for the given `env_info`. fn evm_schedule(&self, env_info: &EnvInfo) -> EvmSchedule; /// Some intrinsic operation parameters; by default they take their value from the `spec()`'s `engine_params`. @@ -45,13 +45,16 @@ pub trait Engine { /// Verify that `header` is valid. /// `parent` (the parent header) and `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. + // TODO: consider including State in the params. fn verify(&self, _header: &Header, _parent: Option<&Header>, _block: Option<&[u8]>) -> Result<(), EthcoreError> { Ok(()) } /// Additional verification for transactions in blocks. // TODO: Add flags for which bits of the transaction to check. + // TODO: consider including State in the params. fn verify_transaction(&self, _t: &Transaction, _header: &Header) -> Result<(), EthcoreError> { Ok(()) } /// Don't forget to call Super::populateFromParent when subclassing & overriding. + // TODO: consider including State in the params. fn populate_from_parent(&self, _header: &mut Header, _parent: &Header) -> Result<(), EthcoreError> { Ok(()) } // TODO: buildin contract routing - to do this properly, it will require removing the built-in configuration-reading logic @@ -60,4 +63,6 @@ pub trait Engine { fn cost_of_builtin(&self, a: Address, in: &[u8]) -> bignum; fn execute_builtin(&self, a: Address, in: &[u8], out: &mut [u8]); */ + + // TODO: sealing stuff - though might want to leave this for later. }