aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/evm
Commit message (Collapse)AuthorAgeFilesLines
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-18/+18
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* all: remove weird filesFelix Lange2016-10-302-2/+0
|
* cmd/evm: Allow stdin and files as sources of bytecode (#3172)Nick Johnson2016-10-291-4/+32
| | | | | | | | * cmd/evm: Allow stdin and files as sources of bytecode * cmd/evm: Print and exit instead of panicing * cmd/evm: fix compile and vet errors
* core, core/vm: added gas price variance tableJeffrey Wilcke2016-10-151-0/+4
| | | | | | | | | | | | | This implements 1b & 1c of EIP150 by adding a new GasTable which must be returned from the RuleSet config method. This table is used to determine the gas prices for the current epoch. Please note that when the CreateBySuicide gas price is set it is assumed that we're in the new epoch phase. In addition this PR will serve as temporary basis while refactorisation in being done in the EVM64 PR, which will substentially overhaul the gas price code.
* core/state: implement reverts by journaling all changesFelix Lange2016-10-061-16/+16
| | | | | | | | | | This commit replaces the deep-copy based state revert mechanism with a linear complexity journal. This commit also hides several internal StateDB methods to limit the number of ways in which calling code can use the journal incorrectly. As usual consultation and bug fixes to the initial implementation were provided by @karalabe, @obscuren and @Arachnid. Thank you!
* cmd, core, internal, light, tests: avoid hashing the code in the VMPéter Szilágyi2016-10-011-1/+4
|
* cmd/evm, cmd/geth, cmd/utils: move version handling to cmd/utilsFelix Lange2016-09-051-2/+4
|
* core/vm: Refactor tracing to make Tracer the main interfaceNick Johnson2016-08-221-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL makes several refactors: - Define a Tracer interface, implementing the `CaptureState` method - Add the VM environment as the first argument of `Tracer.CaptureState` - Rename existing functionality `StructLogger` an make it an implementation of `Tracer` - Delete `StructLogCollector` and make `StructLogger` collect the logs directly - Change all callers to use the new `StructLogger` where necessary and extract logs from that. - Deletes the apparently obsolete and likely nonfunctional 'TraceCall' from the eth API. Callers that only wish accumulated logs can use the `StructLogger` implementation straightforwardly. Callers that wish to efficiently capture VM traces and operate on them without excessive copying can now implement the `Tracer` interface to receive VM state at each step and do with it as they wish. This CL also removes the accumulation of logs from the vm.Environment; this was necessary as part of the refactor, but also simplifies it by removing a responsibility that doesn't directly belong to the Environment.
* Revert "test, cmd/evm, core, core/vm: illegal code hash implementation"Péter Szilágyi2016-06-291-1/+0
| | | | This reverts commit 7a5b571c671e70e0e4807cf971c15e2d1e09d33d.
* test, cmd/evm, core, core/vm: illegal code hash implementationJeffrey Wilcke2016-06-221-0/+1
| | | | | | | | This implements a generic approach to enabling soft forks by allowing anyone to put in hashes of contracts that should not be interacted from. This will help "The DAO" in their endevour to stop any whithdrawals from any DAO contract by convincing the mining community to accept their code hash.
* cmd/evm: added --create flag indicating the exec code is to be createdJeffrey Wilcke2016-06-141-11/+34
| | | | | | | | | | This fixes an issue if you wanted to test out code deployment rather than running a piece of code with an argument. This solves it by adding a --create flag that indicates the Create function should be used rather than the Call function. This also adds a statedb.commit call so that the proper state can be dumped when requested using the --dump flag.
* cmd: fix CLI package deprecation warningsPéter Szilágyi2016-06-101-1/+2
|
* cmd/geth: codegansta/cli package renamed to urfave/cliBas van Kervel2016-06-091-1/+1
|
* core: added basic chain configurationJeffrey Wilcke2016-04-011-8/+11
| | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* core: Added EVM configuration optionsJeffrey Wilcke2016-03-241-6/+9
| | | | | The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
* core, core/vm, tests: changed the initialisation behaviour of the EVMJeffrey Wilcke2016-03-231-1/+8
| | | | | | | The EVM was previously initialised and created for every CALL, CALLCODE, DELEGATECALL and CREATE. This PR changes this behaviour so that the same EVM can be used through the session and beyond as long as the Environment sticks around.
* parmas, crypto, core, core/vm: homestead consensus protocol changesGustav Simonsson2016-02-181-0/+5
| | | | | | | | * change gas cost for contract creating txs * invalidate signature with s value greater than secp256k1 N / 2 * OOG contract creation if not enough gas to store code * new difficulty adjustment algorithm * new DELEGATECALL op code
* core/state, core, miner: handle missing root error from state.NewGustav Simonsson2015-10-161-1/+1
|
* core, core/vm, cmd/evm: remove redundant balance checkGustav Simonsson2015-10-061-2/+2
|
* cmd/evm, core/vm, test: refactored VM and coreJeffrey Wilcke2015-10-041-33/+31
| | | | | | | | | | | | | | | | | * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * core/vm: byte code VM moved to jump table instead of switch * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * Byte code VM now shares the same code as the JITVM * Renamed Context to Contract * Changed initialiser of state transition & unexported methods * Removed the Execution object and refactor `Call`, `CallCode` & `Create` in to their own functions instead of being methods. * Removed the hard dep on the state for the VM. The VM now depends on a Database interface returned by the environment. In the process the core now depends less on the statedb by usage of the env * Moved `Log` from package `core/state` to package `core/vm`.
* Add tests for uncle timestamps and refactor timestamp typeGustav Simonsson2015-08-251-3/+3
|
* cmd/evm, core/vm, tests: changed DisableVm to EnableVmJeffrey Wilcke2015-08-121-1/+1
|
* core, tests: reduced state copy by N callsJeffrey Wilcke2015-08-071-0/+3
| | | | | Reduced the amount of state copied that are required by N calls by doing a balance check prior to any state modifications.
* core/vm, tests: implemented semi-jit vmJeffrey Wilcke2015-08-071-6/+20
| | | | * changed stack and removed stack ptr. Let go decide on slice reuse.
* cmd/core,xeth: removed unneeded states & added batch writesJeffrey Wilcke2015-07-231-31/+81
|
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-2/+2
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: add some godoc synopsis commentsFelix Lange2015-07-071-0/+1
|
* all: remove @author commentsFelix Lange2015-07-071-5/+0
|
* all: update license informationFelix Lange2015-07-071-16/+16
|
* Use uint64 for block header timestampGustav Simonsson2015-06-301-3/+3
|
* cmd/evm: print trace when running programsobscuren2015-06-111-0/+3
|
* cmd/evm: implements vm.Environmentobscuren2015-06-101-0/+7
|
* Fixed tests to reflect log changesobscuren2015-04-091-1/+1
|
* fixed testsobscuren2015-04-011-2/+2
|
* fixed testsobscuren2015-03-241-4/+4
|
* moved state and vm to coreobscuren2015-03-231-2/+2
|
* converted to proper typesobscuren2015-03-221-29/+29
|
* Moved ethutil => commonobscuren2015-03-161-6/+6
|
* cmd/evm, core, ethdb, state, tests/helper: remove ReadConfig callsFelix Lange2015-03-101-2/+0
|
* Secure trieobscuren2015-03-011-1/+0
|
* fixed testobscuren2015-02-051-0/+1
|
* Refactored ethutil.Config.Db outobscuren2015-01-071-2/+1
|
* cmd/evm: add dummy implementation for GetHashFelix Lange2015-01-061-0/+6
| | | | | Fixes the build. AFAIK evm does not bother keeping a chain and cannot provide a real implementation.
* Added license headersobscuren2015-01-061-2/+0
|
* Closure => Contextobscuren2015-01-021-3/+3
|
* fixed trieobscuren2014-12-301-2/+2
|
* Fixed EVM environment. Closes #215v0.7.10obscuren2014-12-211-3/+1
|
* Fixed testsobscuren2014-12-101-1/+1
|
* Log is now interfaceobscuren2014-12-041-1/+1
|
* sort tests for evmobscuren2014-12-043-6/+9
|
* Updated testing toolsobscuren2014-12-041-22/+68
|
* Removed all implicit logging. Fixed gas issues and jump errorsobscuren2014-11-121-2/+3
|
* Moved messages eventing to chain managerobscuren2014-11-101-1/+1
|
* Added dumpsobscuren2014-11-101-2/+9
|
* Added VM testing toolobscuren2014-11-101-0/+109