From 783f3df236d9d242611f9b29e83f5869b5a9d527 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Wed, 2 Mar 2022 15:41:09 +0100 Subject: [PATCH 1/9] chore: remove unused `Inspector::initialize` --- crates/revm/src/inspector.rs | 37 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/crates/revm/src/inspector.rs b/crates/revm/src/inspector.rs index 71c05420c5..542365723e 100644 --- a/crates/revm/src/inspector.rs +++ b/crates/revm/src/inspector.rs @@ -6,10 +6,10 @@ use auto_impl::auto_impl; #[auto_impl(&mut, Box)] pub trait Inspector { - fn initialize(&mut self, _data: &mut EVMData<'_, DB>) {} - - /// before interp get initialized this function is called. If returning something other them Return::Continue - /// we are skipping execution of interp. + /// Called Before the interpreter is initialized. + /// + /// If anything other than [Return::Continue] is returned then execution of the interpreter is + /// skipped. fn initialize_interp( &mut self, _interp: &mut Interpreter, @@ -19,8 +19,14 @@ pub trait Inspector { Return::Continue } - /// get opcode by calling `interp.contract.opcode(interp.program_counter())`. - /// all other information can be obtained from interp. + /// Called on each step of the interpreter. + /// + /// Information about the current execution, including the memory, stack and more is available + /// on `interp` (see [Interpreter]). + /// + /// # Example + /// + /// To get the current opcode, use `interp.contract.code[interp.program_counter()]`. fn step( &mut self, _interp: &mut Interpreter, @@ -30,7 +36,7 @@ pub trait Inspector { Return::Continue } - /// Called after `step` when instruction is executed. + /// Called after `step` when the instruction has been executed. fn step_end( &mut self, _interp: &mut Interpreter, @@ -41,10 +47,9 @@ pub trait Inspector { Return::Continue } - // TODO introduce some struct - /// Called inside call_inner with `Return` you can dictate if you want to continue execution of - /// this call `Return::Continue` or you want to override that and return from call. - #[allow(clippy::too_many_arguments)] + /// Called whenever a call to a contract is about to start. + /// + /// Returning anything other than [Return::Continue] overrides the result of the call. fn call( &mut self, _data: &mut EVMData<'_, DB>, @@ -54,7 +59,7 @@ pub trait Inspector { (Return::Continue, Gas::new(0), Bytes::new()) } - #[allow(clippy::too_many_arguments)] + /// Called when a call to a contract has concluded. fn call_end( &mut self, _data: &mut EVMData<'_, DB>, @@ -66,6 +71,9 @@ pub trait Inspector { ) { } + /// Called when a contract is about to be created. + /// + /// Returning anything other than [Return::Continue] overrides the result of the creation. fn create( &mut self, _data: &mut EVMData<'_, DB>, @@ -74,7 +82,7 @@ pub trait Inspector { (Return::Continue, None, Gas::new(0), Bytes::default()) } - #[allow(clippy::too_many_arguments)] + /// Called when a contract has been created. fn create_end( &mut self, _data: &mut EVMData<'_, DB>, @@ -86,9 +94,10 @@ pub trait Inspector { ) { } + /// Called when a contract has been self-destructed. fn selfdestruct(&mut self) {} - /// If needed you can override some of the spec configurations when running with inspector + /// Override some of the spec. fn override_spec(&self) -> &OverrideSpec { &OVERRIDE_SPEC_DEFAULT } From 315ca237d89192547a7775856f7a7f421cf90783 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Wed, 2 Mar 2022 15:46:31 +0100 Subject: [PATCH 2/9] feat: allow `Inspector::call_end` to alter result --- crates/revm/src/evm_impl.rs | 5 +++-- crates/revm/src/inspector.rs | 14 ++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/crates/revm/src/evm_impl.rs b/crates/revm/src/evm_impl.rs index 24649861e0..eaf4811c0c 100644 --- a/crates/revm/src/evm_impl.rs +++ b/crates/revm/src/evm_impl.rs @@ -607,9 +607,10 @@ impl<'a, GSPEC: Spec, DB: Database + 'a, const INSPECT: bool> Host let (ret, gas, out) = self.call_inner::(inputs); if INSPECT { self.inspector - .call_end(&mut self.data, inputs, gas, ret, &out, SPEC::IS_STATIC_CALL); + .call_end(&mut self.data, inputs, gas, ret, out, SPEC::IS_STATIC_CALL) + } else { + (ret, gas, out) } - (ret, gas, out) } } diff --git a/crates/revm/src/inspector.rs b/crates/revm/src/inspector.rs index 542365723e..13499398ce 100644 --- a/crates/revm/src/inspector.rs +++ b/crates/revm/src/inspector.rs @@ -37,6 +37,8 @@ pub trait Inspector { } /// Called after `step` when the instruction has been executed. + /// + /// Returning anything other than [Return::Continue] alters the execution of the interpreter. fn step_end( &mut self, _interp: &mut Interpreter, @@ -60,15 +62,19 @@ pub trait Inspector { } /// Called when a call to a contract has concluded. + /// + /// Returning anything other than the values passed to this function (`(ret, remaining_gas, + /// out)`) will alter the result of the call. fn call_end( &mut self, _data: &mut EVMData<'_, DB>, _inputs: &CallInputs, - _remaining_gas: Gas, - _ret: Return, - _out: &Bytes, + remaining_gas: Gas, + ret: Return, + out: Bytes, _is_static: bool, - ) { + ) -> (Return, Gas, Bytes) { + (ret, remaining_gas, out) } /// Called when a contract is about to be created. From 69c8d13523d0f206d2ae50d5ab02c02f1c974173 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Wed, 2 Mar 2022 16:00:56 +0100 Subject: [PATCH 3/9] fix: call inspector before/after every call --- crates/revm/src/evm_impl.rs | 103 ++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/crates/revm/src/evm_impl.rs b/crates/revm/src/evm_impl.rs index eaf4811c0c..1ed6c132c1 100644 --- a/crates/revm/src/evm_impl.rs +++ b/crates/revm/src/evm_impl.rs @@ -293,21 +293,30 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, &mut self, inputs: &CreateInputs, ) -> (Return, Option, Gas, Bytes) { + // Call inspector + if INSPECT { + let (ret, address, gas, out) = self.inspector.create(&mut self.data, inputs); + if ret != Return::Continue { + return (ret, address, gas, out); + } + } + let gas = Gas::new(inputs.gas_limit); self.load_account(inputs.caller); - // check depth of calls + // Check depth of calls if self.data.subroutine.depth() > interpreter::CALL_STACK_LIMIT { return (Return::CallTooDeep, None, gas, Bytes::new()); } - // check balance of caller and value. Do this before increasing nonce + // Check balance of caller and value. Do this before increasing nonce if self.balance(inputs.caller).0 < inputs.value { return (Return::OutOfFund, None, gas, Bytes::new()); } - // inc nonce of caller + // Increase nonce of caller let old_nonce = self.data.subroutine.inc_nonce(inputs.caller); - // create address + + // Create address let code_hash = H256::from_slice(Keccak256::digest(&inputs.init_code).as_slice()); let created_address = match inputs.scheme { CreateScheme::Create => create_address(inputs.caller, old_nonce), @@ -315,13 +324,13 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, }; let ret = Some(created_address); - // load account so that it will be hot + // Load account so that it will be hot self.load_account(created_address); - // enter into subroutine + // Enter subroutine let checkpoint = self.data.subroutine.create_checkpoint(); - // create contract account and check for collision + // Create contract account and check for collision if !self.data.subroutine.new_contract_acc( created_address, self.precompiles.contains(&created_address), @@ -331,7 +340,7 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, return (Return::CreateCollision, ret, gas, Bytes::new()); } - // transfer value to contract address + // Transfer value to contract address if let Err(e) = self.data.subroutine.transfer( inputs.caller, created_address, @@ -341,11 +350,13 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, self.data.subroutine.checkpoint_revert(checkpoint); return (e, ret, gas, Bytes::new()); } - // inc nonce of contract + + // Increase nonce of the contract if SPEC::enabled(ISTANBUL) { self.data.subroutine.inc_nonce(created_address); } - // create new interp and execute init function + + // Create new interpreter and execute initcode let contract = Contract::new::( Bytes::new(), inputs.init_code.clone(), @@ -360,8 +371,9 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, .initialize_interp(&mut interp, &mut self.data, false); // TODO fix is_static } let exit_reason = interp.run::(self); + // Host error if present on execution\ - let ret = match exit_reason { + let (ret, address, gas, out) = match exit_reason { return_ok!() => { let b = Bytes::new(); // if ok, check contract creation limit and calculate gas deduction on output len. @@ -407,31 +419,46 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, (exit_reason, ret, interp.gas, interp.return_value()) } }; - ret + + if INSPECT { + self.inspector + .create_end(&mut self.data, inputs, ret, address, gas, &out); + } + (ret, address, gas, out) } - #[allow(clippy::too_many_arguments)] fn call_inner(&mut self, inputs: &CallInputs) -> (Return, Gas, Bytes) { + // Call the inspector + if INSPECT { + let (ret, gas, out) = self + .inspector + .call(&mut self.data, inputs, SPEC::IS_STATIC_CALL); + if ret != Return::Continue { + return (ret, gas, out); + } + } + let mut gas = Gas::new(inputs.gas_limit); // Load account and get code. Account is now hot. let (code, _) = self.code(inputs.contract); - // check depth + // Check depth if self.data.subroutine.depth() > interpreter::CALL_STACK_LIMIT { return (Return::CallTooDeep, gas, Bytes::new()); } // Create subroutine checkpoint let checkpoint = self.data.subroutine.create_checkpoint(); - // touch address. For "EIP-158 State Clear" this will erase empty accounts. + + // Touch address. For "EIP-158 State Clear", this will erase empty accounts. if inputs.transfer.value.is_zero() { self.load_account(inputs.context.address); self.data .subroutine - .balance_add(inputs.context.address, U256::zero()); // touch the acc + .balance_add(inputs.context.address, U256::zero()); } - // transfer value from caller to called account; + // Transfer value from caller to called account match self.data.subroutine.transfer( inputs.transfer.source, inputs.transfer.target, @@ -445,8 +472,8 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, Ok((_source_is_cold, _target_is_cold)) => {} } - // call precompiles - if let Some(precompile) = self.precompiles.get(&inputs.contract) { + // Call precompiles + let (ret, gas, out) = if let Some(precompile) = self.precompiles.get(&inputs.contract) { let out = match precompile { Precompile::Standard(fun) => fun(inputs.input.as_ref(), inputs.gas_limit), Precompile::Custom(fun) => fun(inputs.input.as_ref(), inputs.gas_limit), @@ -474,7 +501,7 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, } } } else { - // create interp and execute subcall + // Create interpreter and execute subcall let contract = Contract::new_with_context::(inputs.input.clone(), code, &inputs.context); let mut interp = @@ -491,6 +518,13 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, } (exit_reason, interp.gas, interp.return_value()) + }; + + if INSPECT { + self.inspector + .call_end(&mut self.data, inputs, gas, ret, out, SPEC::IS_STATIC_CALL) + } else { + (ret, gas, out) } } } @@ -581,36 +615,11 @@ impl<'a, GSPEC: Spec, DB: Database + 'a, const INSPECT: bool> Host } fn create(&mut self, inputs: &CreateInputs) -> (Return, Option, Gas, Bytes) { - if INSPECT { - let (ret, address, gas, out) = self.inspector.create(&mut self.data, inputs); - if ret != Return::Continue { - return (ret, address, gas, out); - } - } - let (ret, address, gas, out) = self.create_inner::(inputs); - if INSPECT { - self.inspector - .create_end(&mut self.data, inputs, ret, address, gas, &out); - } - (ret, address, gas, out) + self.create_inner::(inputs) } fn call(&mut self, inputs: &CallInputs) -> (Return, Gas, Bytes) { - if INSPECT { - let (ret, gas, out) = self - .inspector - .call(&mut self.data, inputs, SPEC::IS_STATIC_CALL); - if ret != Return::Continue { - return (ret, gas, out); - } - } - let (ret, gas, out) = self.call_inner::(inputs); - if INSPECT { - self.inspector - .call_end(&mut self.data, inputs, gas, ret, out, SPEC::IS_STATIC_CALL) - } else { - (ret, gas, out) - } + self.call_inner::(inputs) } } From 7999f6e4666686753b9ca4f2fd7f118d7a318ca9 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Wed, 2 Mar 2022 16:02:38 +0100 Subject: [PATCH 4/9] chore: fmt --- crates/revm/src/instructions/host.rs | 6 ++---- crates/revm/src/instructions/system.rs | 3 +-- crates/revm/src/interpreter.rs | 3 +-- crates/revm/src/specification.rs | 11 +++++------ 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/crates/revm/src/instructions/host.rs b/crates/revm/src/instructions/host.rs index 70b517b25c..ab37357613 100644 --- a/crates/revm/src/instructions/host.rs +++ b/crates/revm/src/instructions/host.rs @@ -1,9 +1,7 @@ -use crate::{alloc::vec::Vec, SpecId::*}; use crate::{ - gas, interpreter::Interpreter, return_ok, return_revert, CallContext, CallScheme, CreateScheme, - Host, Return, Spec, Transfer, + alloc::vec::Vec, gas, interpreter::Interpreter, return_ok, return_revert, CallContext, + CallInputs, CallScheme, CreateInputs, CreateScheme, Host, Return, Spec, SpecId::*, Transfer, }; -use crate::{CallInputs, CreateInputs}; use bytes::Bytes; use core::cmp::min; use primitive_types::{H160, H256, U256}; diff --git a/crates/revm/src/instructions/system.rs b/crates/revm/src/instructions/system.rs index 9d1f0795e6..eac9a6c15a 100644 --- a/crates/revm/src/instructions/system.rs +++ b/crates/revm/src/instructions/system.rs @@ -1,5 +1,4 @@ -use crate::{gas, interpreter::Interpreter, Return}; -use crate::{Spec, SpecId::*}; +use crate::{gas, interpreter::Interpreter, Return, Spec, SpecId::*}; use bytes::Bytes; use primitive_types::{H256, U256}; diff --git a/crates/revm/src/interpreter.rs b/crates/revm/src/interpreter.rs index 2211c7fa74..d905b9478b 100644 --- a/crates/revm/src/interpreter.rs +++ b/crates/revm/src/interpreter.rs @@ -8,9 +8,8 @@ pub use stack::Stack; use crate::{ instructions::{eval, Return}, - Gas, USE_GAS, + Gas, Host, Spec, USE_GAS, }; -use crate::{Host, Spec}; use bytes::Bytes; use core::ops::Range; diff --git a/crates/revm/src/specification.rs b/crates/revm/src/specification.rs index da634e2caa..69226a74b8 100644 --- a/crates/revm/src/specification.rs +++ b/crates/revm/src/specification.rs @@ -124,9 +124,8 @@ mod spec_impl { spec!(FRONTIER); } -pub use spec_impl::BERLIN::SpecImpl as BerlinSpec; -pub use spec_impl::BYZANTINE::SpecImpl as ByzantineSpec; -pub use spec_impl::FRONTIER::SpecImpl as FrontierSpec; -pub use spec_impl::ISTANBUL::SpecImpl as IstanbulSpec; -pub use spec_impl::LATEST::SpecImpl as LatestSpec; -pub use spec_impl::LONDON::SpecImpl as LondonSpec; +pub use spec_impl::{ + BERLIN::SpecImpl as BerlinSpec, BYZANTINE::SpecImpl as ByzantineSpec, + FRONTIER::SpecImpl as FrontierSpec, ISTANBUL::SpecImpl as IstanbulSpec, + LATEST::SpecImpl as LatestSpec, LONDON::SpecImpl as LondonSpec, +}; From 07df5578638512111a056f20f673114c2e08924d Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Wed, 2 Mar 2022 16:03:08 +0100 Subject: [PATCH 5/9] ci: fix lint check --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f94f6067d..bfba6d7b19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: nightly profile: minimal components: rustfmt, clippy override: true From 05fdfe6ae8e2fbb9672a92a25610db338a30310e Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Wed, 2 Mar 2022 16:07:33 +0100 Subject: [PATCH 6/9] fix: adjust binaries to new `call_end` --- bins/revme/src/debugger/ctrl/ctrl.rs | 10 ++++++---- bins/revme/src/statetest/trace.rs | 11 ----------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/bins/revme/src/debugger/ctrl/ctrl.rs b/bins/revme/src/debugger/ctrl/ctrl.rs index b46460e167..c8093a3851 100644 --- a/bins/revme/src/debugger/ctrl/ctrl.rs +++ b/bins/revme/src/debugger/ctrl/ctrl.rs @@ -221,14 +221,16 @@ impl Inspector for Controller { &mut self, _data: &mut EVMData<'_, DB>, _inputs: &CallInputs, - _remaining_gas: Gas, - _ret: Return, - _out: &Bytes, + remaining_gas: Gas, + ret: Return, + out: Bytes, _is_static: bool, - ) { + ) -> (Return, Gas, Bytes) { if let StateMachine::StepOut = self.state_interp { self.state_interp = StateMachine::TriggerStep } + + (ret, remaining_gas, out) } fn create( diff --git a/bins/revme/src/statetest/trace.rs b/bins/revme/src/statetest/trace.rs index b5611da755..5b8d78d2c0 100644 --- a/bins/revme/src/statetest/trace.rs +++ b/bins/revme/src/statetest/trace.rs @@ -99,17 +99,6 @@ impl Inspector for CustomPrintTracer { (Return::Continue, Gas::new(0), Bytes::new()) } - fn call_end( - &mut self, - _data: &mut EVMData<'_, DB>, - _inputs: &CallInputs, - _remaining_gas: Gas, - _ret: Return, - _out: &Bytes, - _is_static: bool, - ) { - } - fn create( &mut self, _data: &mut EVMData<'_, DB>, From d5b9bb1ec053ebc1467bd8d87c28421b6654b36b Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Fri, 4 Mar 2022 04:54:05 +0100 Subject: [PATCH 7/9] feat: allow `Inspector::create_end` to alter res --- bins/revme/src/debugger/ctrl/ctrl.rs | 12 +++++++----- bins/revme/src/statetest/trace.rs | 11 ----------- crates/revm/src/evm_impl.rs | 5 +++-- crates/revm/src/inspector.rs | 14 +++++++++----- 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/bins/revme/src/debugger/ctrl/ctrl.rs b/bins/revme/src/debugger/ctrl/ctrl.rs index c8093a3851..ea23722c15 100644 --- a/bins/revme/src/debugger/ctrl/ctrl.rs +++ b/bins/revme/src/debugger/ctrl/ctrl.rs @@ -245,14 +245,16 @@ impl Inspector for Controller { &mut self, _data: &mut EVMData<'_, DB>, _inputs: &CreateInputs, - _ret: Return, - _address: Option, - _remaining_gas: Gas, - _out: &Bytes, - ) { + ret: Return, + address: Option, + remaining_gas: Gas, + out: Bytes, + ) -> (Return, Option, Gas, Bytes) { if let StateMachine::StepOut = self.state_interp { self.state_interp = StateMachine::TriggerStep } + + (ret, address, remaining_gas, out) } fn selfdestruct(&mut self) {} diff --git a/bins/revme/src/statetest/trace.rs b/bins/revme/src/statetest/trace.rs index 5b8d78d2c0..0eeb9232ec 100644 --- a/bins/revme/src/statetest/trace.rs +++ b/bins/revme/src/statetest/trace.rs @@ -115,17 +115,6 @@ impl Inspector for CustomPrintTracer { (Return::Continue, None, Gas::new(0), Bytes::new()) } - fn create_end( - &mut self, - _data: &mut EVMData<'_, DB>, - _inputs: &CreateInputs, - _ret: Return, - _address: Option, - _remaining_gas: Gas, - _out: &Bytes, - ) { - } - fn selfdestruct(&mut self) { //, address: H160, target: H160) { println!("SELFDESTRUCT on "); //{:?} target: {:?}", address, target); diff --git a/crates/revm/src/evm_impl.rs b/crates/revm/src/evm_impl.rs index 1ed6c132c1..811802e61e 100644 --- a/crates/revm/src/evm_impl.rs +++ b/crates/revm/src/evm_impl.rs @@ -422,9 +422,10 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB, if INSPECT { self.inspector - .create_end(&mut self.data, inputs, ret, address, gas, &out); + .create_end(&mut self.data, inputs, ret, address, gas, out) + } else { + (ret, address, gas, out) } - (ret, address, gas, out) } fn call_inner(&mut self, inputs: &CallInputs) -> (Return, Gas, Bytes) { diff --git a/crates/revm/src/inspector.rs b/crates/revm/src/inspector.rs index 13499398ce..6e117cd174 100644 --- a/crates/revm/src/inspector.rs +++ b/crates/revm/src/inspector.rs @@ -89,15 +89,19 @@ pub trait Inspector { } /// Called when a contract has been created. + /// + /// Returning anything other than the values passed to this function (`(ret, remaining_gas, + /// address, out)`) will alter the result of the create. fn create_end( &mut self, _data: &mut EVMData<'_, DB>, _inputs: &CreateInputs, - _ret: Return, - _address: Option, - _remaining_gas: Gas, - _out: &Bytes, - ) { + ret: Return, + address: Option, + remaining_gas: Gas, + out: Bytes, + ) -> (Return, Option, Gas, Bytes) { + (ret, address, remaining_gas, out) } /// Called when a contract has been self-destructed. From e6dbf6955f990b3cab79d63bd275c0980afe145c Mon Sep 17 00:00:00 2001 From: rakita Date: Mon, 7 Mar 2022 08:36:54 +0100 Subject: [PATCH 8/9] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfba6d7b19..4f94f6067d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: nightly + toolchain: stable profile: minimal components: rustfmt, clippy override: true From 8b286a6af47575b449c1cbfca0b2b5f893b028c7 Mon Sep 17 00:00:00 2001 From: rakita Date: Mon, 7 Mar 2022 14:46:11 +0100 Subject: [PATCH 9/9] Update crates/revm/src/specification.rs --- crates/revm/src/specification.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/revm/src/specification.rs b/crates/revm/src/specification.rs index 69226a74b8..da634e2caa 100644 --- a/crates/revm/src/specification.rs +++ b/crates/revm/src/specification.rs @@ -124,8 +124,9 @@ mod spec_impl { spec!(FRONTIER); } -pub use spec_impl::{ - BERLIN::SpecImpl as BerlinSpec, BYZANTINE::SpecImpl as ByzantineSpec, - FRONTIER::SpecImpl as FrontierSpec, ISTANBUL::SpecImpl as IstanbulSpec, - LATEST::SpecImpl as LatestSpec, LONDON::SpecImpl as LondonSpec, -}; +pub use spec_impl::BERLIN::SpecImpl as BerlinSpec; +pub use spec_impl::BYZANTINE::SpecImpl as ByzantineSpec; +pub use spec_impl::FRONTIER::SpecImpl as FrontierSpec; +pub use spec_impl::ISTANBUL::SpecImpl as IstanbulSpec; +pub use spec_impl::LATEST::SpecImpl as LatestSpec; +pub use spec_impl::LONDON::SpecImpl as LondonSpec;