This repository was archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Merged
evm #52
Changes from 10 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
353d4fb
evm adapter init
debris c695e09
docs
debris 000d8fe
runtime_data, tests in progress
debris 142bba0
"importing" evmjit callbacks abi
debris 4ce53e8
updated import_evmjit_abi docs
debris f2ae870
fixed env address
debris 4e31fe5
fixed signal 11 error
debris 3dd2658
env implementation in progress
debris e3f59d8
vm factory
debris 2e7f0e2
tests for sload, sstore, sha3
debris 156fcad
docs
debris 7f7dcef
evmjit is dynamically linked
debris 359ba8d
extcode working
debris cdcabc2
Merge branch 'master' of https://github.com/gavofyork/ethcore into evm
debris 8bc2e65
distinguish between i256 and h256 on evmjit wrapper layer
debris ad43079
test balance
debris 293bca3
evm logs
debris b447de9
additional asserts in jit log test
debris a0bb106
evm env uses EnvInfo. blockhash function implementation
debris 8c6d695
evm call and create in progress
debris 146999c
executive init
debris ec720ae
env -> ext
debris d27a16c
executive in progress
debris 8335d40
contract_address && ExtFace
debris d0180df
little improvements in evm ext
debris bed4bfc
executive in progress...
debris 4932720
evm params
debris 43c612f
moved runtime data to jit
debris 68beb00
executive tests in progress
debris bcd026a
Merge branch 'master' of https://github.com/gavofyork/ethcore into evm
debris 5ae0f71
executive create fixes
debris 50af19a
contract creating contract
debris 130b2fc
separated executive and externalities
debris 300a950
evmjit output data
debris 9cc88e2
Merge branch 'master' of https://github.com/gavofyork/ethcore into evm
debris f7e9816
substate in progress
debris 3e90859
executive call
debris 55a0235
Merge branch 'master' of https://github.com/gavofyork/ethcore into evm
debris efa6c42
fixed jit tests
debris 9f06c2f
errors, fees, and refunds
debris b72da41
proper calculatng of executive gas in progress
debris b273792
big refactor of executive in progress
debris 7f8f0c5
minor fixes
debris 6d3097a
updated output policy docs
debris 88409e7
refactor in progress... evmjit compiling
debris d1aadf4
shorter constructor for externalities
debris dea9ec2
removed unused stuff
debris bbb25fb
propagate evmjit errors upstream
debris 22859a0
changes in executive return
debris f611b6c
state clone
debris 65bce78
Merge branch 'master' into evm
debris 3f725ce
reverting the execution state when out of gas
debris f19a6e5
removed warnings
debris 85ac9af
Move EvmSchedule -> evm::Schedule
gavofyork b0ccedd
Move evm::EvmParams -> ActionParams.
gavofyork 0cc5748
Move Executive down, remove unneeded Evm prefixes.
gavofyork 7650dea
Bring in Executive.
gavofyork 0004ed8
Integrate Executive into State.
gavofyork 1d81b4f
EVMJIT build fixes.
gavofyork File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| use util::hash::*; | ||
| use util::uint::*; | ||
| use state::*; | ||
|
|
||
| pub struct Env { | ||
| state: State, | ||
| address: Address | ||
| } | ||
|
|
||
| impl Env { | ||
| pub fn new(state: State, address: Address) -> Env { | ||
| Env { | ||
| state: state, | ||
| address: address | ||
| } | ||
| } | ||
|
|
||
| pub fn sload(&self, index: &H256) -> H256 { | ||
| self.state.storage_at(&self.address, index) | ||
| } | ||
|
|
||
| pub fn sstore(&mut self, index: H256, value: H256) { | ||
| println!("index: {:?}, value: {:?}", index, value); | ||
| self.state.set_storage(&self.address, index, value) | ||
| } | ||
|
|
||
| pub fn balance(&self, _address: &Address) -> U256 { | ||
| unimplemented!(); | ||
| } | ||
|
|
||
| pub fn blockhash(&self, _number: &U256) -> H256 { | ||
| unimplemented!(); | ||
| } | ||
|
|
||
| /// Creates new contract | ||
| /// Returns new contract address gas used | ||
| pub fn create(&self, _gas: u64, _endowment: &U256, _code: &[u8]) -> (Address, u64) { | ||
| unimplemented!(); | ||
| } | ||
|
|
||
| /// Calls existing contract | ||
| /// Returns call output and gas used | ||
| pub fn call(&self, _gas: u64, _call_gas: u64, _receive_address: &H256, _value: &U256, _data: &[u8], _code_address: &Address) -> Option<(Vec<u8>, u64)>{ | ||
| unimplemented!(); | ||
| } | ||
|
|
||
| /// Returns code at given address | ||
| pub fn extcode(&self, _address: &Address) -> Vec<u8> { | ||
| unimplemented!(); | ||
| } | ||
|
|
||
| pub fn log(&self, _topics: &[H256], _data: &[u8]) { | ||
| unimplemented!(); | ||
| } | ||
|
|
||
| /// Drain state | ||
| // not sure if this is the best solution, but seems to be the easiest one, mk | ||
| pub fn state(self) -> State { | ||
| self.state | ||
| } | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| //! EVM interface | ||
|
|
||
| use evm::{RuntimeData, Env}; | ||
|
|
||
| #[derive(Debug, Eq, PartialEq)] | ||
| pub enum ReturnCode { | ||
| Stop, | ||
| Return, | ||
| Suicide, | ||
| OutOfGas, | ||
| InternalError | ||
| } | ||
|
|
||
| pub trait Evm { | ||
| fn exec(&self, data: RuntimeData, env: &mut Env) -> ReturnCode; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing docs.