aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm_env.go
Commit message (Collapse)AuthorAgeFilesLines
* 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-291-6/+0
| | | | This reverts commit 7a5b571c671e70e0e4807cf971c15e2d1e09d33d.
* Revert "core: add voting and result tracking for the dao soft-fork"Péter Szilágyi2016-06-291-7/+3
| | | | This reverts commit c4de28938ff8c688c4444c8b3e8e28a52cbc62ff.
* Revert "core: update DAO soft-fork number, clean up the code"Péter Szilágyi2016-06-291-0/+4
| | | | This reverts commit ba784bdf36f2daf7827ec1ec864f3393ba8d86a0.
* core: update DAO soft-fork number, clean up the codePéter Szilágyi2016-06-231-4/+0
|
* core: add voting and result tracking for the dao soft-forkPéter Szilágyi2016-06-231-3/+7
|
* test, cmd/evm, core, core/vm: illegal code hash implementationJeffrey Wilcke2016-06-221-0/+6
| | | | | | | | 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.
* core: improved chainDb using sequential keyszsfelfoldi2016-06-071-1/+1
|
* core: added basic chain configurationJeffrey Wilcke2016-04-011-16/+13
| | | | | | | | | 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-17/+24
| | | | | 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/+5
| | | | | | | 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
|
* 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-111-12/+24
| | | | | | 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, tests: get_hash fixJeffrey Wilcke2015-10-211-2/+4
| | | | | Make sure that we're fetching the hash from the current chain and not the canonical chain.
* core, core/vm, cmd/evm: remove redundant balance checkGustav Simonsson2015-10-061-2/+2
|
* cmd/geth, cmd/utils, core, rpc: renamed to blockchainJeffrey Wilcke2015-10-041-2/+2
| | | | | | * Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted.
* cmd/evm, core/vm, test: refactored VM and coreJeffrey Wilcke2015-10-041-15/+19
| | | | | | | | | | | | | | | | | * 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-1/+1
|
* core, tests: reduced state copy by N callsJeffrey Wilcke2015-08-071-0/+4
| | | | | Reduced the amount of state copied that are required by N calls by doing a balance check prior to any state modifications.
* all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-4/+4
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: update license informationFelix Lange2015-07-071-0/+16
|
* Use uint64 for block header timestampGustav Simonsson2015-06-301-1/+1
|
* core/types: make blocks immutableFelix Lange2015-06-301-17/+17
|
* core, core/vm: added structure loggingobscuren2015-06-101-0/+11
| | | | This also reduces the time required spend in the VM
* Changed how logs are being recordedobscuren2015-04-081-1/+1
| | | | | | | Logs are now recorded per transactions instead of tossing them out after each transaction. This should also fix an issue with `eth_getFilterLogs` (#629) Also now implemented are the `transactionHash, blockHash, transactionIndex, logIndex` on logs. Closes #654.
* Cleanup VMobscuren2015-03-291-7/+3
|
* Cleaned up changesobscuren2015-03-241-3/+3
|
* moved state and vm to coreobscuren2015-03-231-2/+2
|
* Fixed VM & Tests w/ conversionobscuren2015-03-171-2/+2
|
* core: actually convert transaction poolFelix Lange2015-03-171-1/+1
|
* converted vmobscuren2015-03-171-18/+19
|
* updated vm envobscuren2015-03-171-16/+17
|
* Added (disabled) Jit validationobscuren2015-02-011-0/+4
|
* Changed prev_hash to block_hash, state transition now uses vm envobscuren2015-01-041-3/+10
| | | | | | | * PREVHASH => BLOCKHASH( N ) * State transition object uses VMEnv as it's query interface * Updated vm.Enviroment has GetHash( n ) for BLOCKHASH instruction * Added GetHash to xeth, core, utils & test environments
* Closure => Contextobscuren2015-01-021-3/+3
|
* Refactored block & Transactionobscuren2014-12-231-6/+6
| | | | * Includes new rlp decoder
* Cleaned up objectsobscuren2014-12-191-3/+1
|
* Created generic message (easy for testing)obscuren2014-12-181-5/+5
|
* Log is now interfaceobscuren2014-12-041-1/+1
|
* Renamed State => StateDBobscuren2014-12-041-3/+3
|
* Renamed `chain` => `core`obscuren2014-12-041-0/+63