Allow single opcode stepping for EVM (#9051)

* Feed in ActionParams on VM creation

* Fix ethcore after Vm interface change

* Move informant inside Interpreter struct

* Move do_trace to Interpreter struct

* Move all remaining exec variables to Interpreter struct

* Refactor VM to allow single opcode step

* Fix all EVM tests

* Fix all wasm tests

* Fix wasm runner tests

* Fix a check case where code length is zero

* Fix jsontests compile

* Fix cargo lock

* Use match instead of expect

* Use cheaper check reader.len() == 0 for the initial special case

* Get rid of try_and_done! macro by using Result<(), ReturnType>

* Use Never instead of ()

* Fix parity-bytes path

* Bypass gasometer lifetime problem by borrow only for a instance

* typo: missing {

* Fix ethcore test compile

* Fix evm tests
This commit is contained in:
Wei Tang
2018-08-14 04:06:15 +08:00
committed by GitHub
parent 98dbd1fdc7
commit 9c595aff95
14 changed files with 574 additions and 446 deletions

View File

@@ -48,5 +48,5 @@ pub trait Vm {
/// This function should be used to execute transaction.
/// It returns either an error, a known amount of gas left, or parameters to be used
/// to compute the final gas left.
fn exec(&mut self, params: ActionParams, ext: &mut Ext) -> Result<GasLeft>;
fn exec(&mut self, ext: &mut Ext) -> Result<GasLeft>;
}