aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/runtime
Commit message (Collapse)AuthorAgeFilesLines
* 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-4/+4
| | | | | | | | | | 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/+1
|
* core/vm: Refactor tracing to make Tracer the main interfaceNick Johnson2016-08-221-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-292-27/+22
| | | | This reverts commit 7a5b571c671e70e0e4807cf971c15e2d1e09d33d.
* Revert "core: update DAO soft-fork number, clean up the code"Péter Szilágyi2016-06-292-22/+25
| | | | This reverts commit ba784bdf36f2daf7827ec1ec864f3393ba8d86a0.
* core: update DAO soft-fork number, clean up the codePéter Szilágyi2016-06-232-25/+22
|
* test, cmd/evm, core, core/vm: illegal code hash implementationJeffrey Wilcke2016-06-222-22/+27
| | | | | | | | 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.
* all: update license informationFelix Lange2016-04-152-2/+2
|
* core: added basic chain configurationJeffrey Wilcke2016-04-012-3/+17
| | | | | | | | | 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-243-47/+11
| | | | | 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/+7
| | | | | | | 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.
* core: various typosLeif Jurvetson2016-03-161-1/+1
|
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-221-1/+1
| | | | As we aren't really using the standarized SHA-3
* parmas, crypto, core, core/vm: homestead consensus protocol changesGustav Simonsson2016-02-181-0/+4
| | | | | | | | * 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/vm/runtime: simplified runtime calling mechanismJeffrey Wilcke2016-02-112-6/+93
| | | | | | Implemented `runtime.Call` which uses - unlike Execute - the given state for the execution and the address of the contract you wish to execute. Unlike `Execute`, `Call` requires a config.
* core/vm/runtime: added simple execution runtimeJeffrey Wilcke2015-11-185-0/+399
The runtime environment can be used for simple basic execution of contract code without the requirement of setting up a full stack and operates fully in memory.