Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | common/math, core/vm: implement fast EXP (#3214) | Jeffrey Wilcke | 2016-11-02 | 1 | -2/+3 |
| | | | | | | | * common/math, core/vm: implement fast EXP. Courtesy @chfast & @karalabe * common/math: fix go vet issues on exp calculation | ||||
* | Merge pull request #3064 from pirapira/limit_struct_logs | Jeffrey Wilcke | 2016-10-31 | 3 | -3/+14 |
|\ | | | | | core/vm: add limit option to LogConfig | ||||
| * | vm, ethapi: add `limit` option to traceTransaction | Yoichi Hirai | 2016-09-30 | 3 | -3/+14 |
| | | | | | | | | | | | | | | | | | | | | | | | | that specifies the maximum number of elements in the `structLogs` output. This option is useful for debugging a transaction that involves a large number of repetition. For example, ``` debug.traceTransaction(tx, {disableStorage: true, limit: 2}) ``` shows at most the first two steps in the `structLogs`. | ||||
* | | core/vm: Ignore EnableJit ChainConfig setting (#3166) | Hao Bryan Cheng | 2016-10-21 | 1 | -1/+3 |
| | | |||||
* | | core/vm: fix GASPRICE string (resolves #2553) | Benjamin Brent | 2016-10-19 | 1 | -1/+1 |
| | | |||||
* | | core, core/vm: added gas price variance table | Jeffrey Wilcke | 2016-10-15 | 6 | -20/+115 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: rename Delete/IsDeleted to Suicide/HasSuicided | Felix Lange | 2016-10-06 | 4 | -5/+8 |
| | | | | | | | | The delete/remove naming has caused endless confusion in the past. | ||||
* | | core/state: implement reverts by journaling all changes | Felix Lange | 2016-10-06 | 3 | -8/+8 |
| | | | | | | | | | | | | | | | | | | | | 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 VM | Péter Szilágyi | 2016-10-01 | 6 | -12/+17 |
|/ | |||||
* | core/state: track all accounts in canon state | Felix Lange | 2016-09-26 | 2 | -1/+2 |
| | | | | | This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes. | ||||
* | core/types, core/vm: improve docs, add JSON marshaling methods | Felix Lange | 2016-08-04 | 2 | -21/+127 |
| | | | | | | | | In this commit, core/types's types learn how to encode and decode themselves as JSON. The encoding is very similar to what the RPC API uses. The RPC API is missing some output fields (e.g. transaction signature values) which will be added to the API in a later commit. Some fields that the API generates are ignored by the decoder methods here. | ||||
* | core/vm, eth: Add support for javascript trace functions | Nick Johnson | 2016-08-23 | 2 | -9/+6 |
| | |||||
* | core/vm: Refactor tracing to make Tracer the main interface | Nick Johnson | 2016-08-22 | 11 | -162/+136 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | core/vm: hide ecrecover error message | Felix Lange | 2016-08-06 | 1 | -2/+2 |
| | | | | Fixes #2825 | ||||
* | Merge pull request #2724 from pirapira/fix_reset_fees | Péter Szilágyi | 2016-07-15 | 2 | -2/+2 |
|\ | | | | | vm: Replace some SstoreClearGas with SstoreResetGas | ||||
| * | vm: Replace some SstoreClearGas with SstoreResetGas | Yoichi Hirai | 2016-06-22 | 2 | -2/+2 |
| | | |||||
* | | eth: separate common and full node-specific API and backend service | zsfelfoldi | 2016-06-16 | 1 | -0/+2 |
|/ | |||||
* | all: fix go vet warnings | Felix Lange | 2016-04-15 | 2 | -3/+1 |
| | |||||
* | all: update license information | Felix Lange | 2016-04-15 | 14 | -9/+90 |
| | |||||
* | core: added basic chain configuration | Jeffrey Wilcke | 2016-04-01 | 13 | -56/+72 |
| | | | | | | | | | 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 options | Jeffrey Wilcke | 2016-03-24 | 12 | -145/+336 |
| | | | | | 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 EVM | Jeffrey Wilcke | 2016-03-23 | 9 | -39/+27 |
| | | | | | | | 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 typos | Leif Jurvetson | 2016-03-16 | 9 | -18/+18 |
| | |||||
* | all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}() | Ricardo Catalinas Jiménez | 2016-02-22 | 7 | -8/+8 |
| | | | | As we aren't really using the standarized SHA-3 | ||||
* | core, core/vm, crypto: fixes for homestead | Jeffrey Wilcke | 2016-02-18 | 9 | -74/+123 |
| | | | | | | * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests | ||||
* | parmas, crypto, core, core/vm: homestead consensus protocol changes | Gustav Simonsson | 2016-02-18 | 10 | -37/+94 |
| | | | | | | | | * 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 mechanism | Jeffrey Wilcke | 2016-02-11 | 2 | -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, rpc/api: renamed to debug.replayTransaction, migrated to new RPC, ↵ | Peter Pratscher | 2016-02-02 | 2 | -1/+3 |
| | | | | | | | | integrated feedback Integrated code review suggestions Integrated last review comments | ||||
* | core/vm: resolve circular dependency to debug vm storage | Péter Szilágyi | 2016-01-12 | 4 | -14/+20 |
| | |||||
* | rpc: new RPC implementation with pub/sub support | Bas van Kervel | 2015-12-14 | 1 | -0/+16 |
| | |||||
* | core/vm/runtime: added simple execution runtime | Jeffrey Wilcke | 2015-11-18 | 5 | -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. | ||||
* | Merge pull request #1883 from obscuren/jit-vm-optimisations | Jeffrey Wilcke | 2015-10-22 | 10 | -83/+469 |
|\ | | | | | core/vm: JIT segmentation | ||||
| * | core/vm: added parsing utilities | Jeffrey Wilcke | 2015-10-17 | 4 | -3/+180 |
| | | |||||
| * | core/vm: added JIT segmenting / optimisations | Jeffrey Wilcke | 2015-10-17 | 8 | -5/+202 |
| | | | | | | | | | | * multi-push segments * static jumps segments | ||||
| * | core/vm: abstracted instruction execution away from JIT | Jeffrey Wilcke | 2015-10-17 | 2 | -76/+88 |
| | | | | | | | | | | | | Moved the execution of instructions to the instruction it self. This will allow for specialised instructions (e.g. segments) to be execution in the same manner as regular instructions. | ||||
* | | Merge pull request #1889 from karalabe/fast-sync-rebase | Jeffrey Wilcke | 2015-10-22 | 1 | -23/+28 |
|\ \ | | | | | | | eth/63 fast synchronization algorithm | ||||
| * | | core, eth, trie: fix data races and merge/review issues | Péter Szilágyi | 2015-10-21 | 1 | -1/+1 |
| | | | |||||
| * | | core, eth: receipt chain reconstruction | Péter Szilágyi | 2015-10-19 | 1 | -6/+8 |
| | | | |||||
| * | | core: differentiate receipt concensus and storage decoding | Péter Szilágyi | 2015-10-19 | 1 | -17/+20 |
| |/ | |||||
* / | core, tests: get_hash fix | Jeffrey Wilcke | 2015-10-21 | 1 | -1/+1 |
|/ | | | | | Make sure that we're fetching the hash from the current chain and not the canonical chain. | ||||
* | core/vm: copy stack element to prevent overwrites | Péter Szilágyi | 2015-10-12 | 1 | -3/+4 |
| | |||||
* | core, core/vm, cmd/evm: remove redundant balance check | Gustav Simonsson | 2015-10-06 | 2 | -4/+2 |
| | |||||
* | cmd/geth, cmd/utils, core, rpc: renamed to blockchain | Jeffrey Wilcke | 2015-10-04 | 5 | -11/+11 |
| | | | | | | * 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 core | Jeffrey Wilcke | 2015-10-04 | 18 | -829/+764 |
| | | | | | | | | | | | | | | | | | * 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`. | ||||
* | core, core/vm, core/state: remove unused functions | Gustav Simonsson | 2015-09-11 | 1 | -17/+0 |
| | |||||
* | Add tests for uncle timestamps and refactor timestamp type | Gustav Simonsson | 2015-08-25 | 4 | -4/+4 |
| | |||||
* | cmd/evm, core/vm, tests: changed DisableVm to EnableVm | Jeffrey Wilcke | 2015-08-12 | 3 | -5/+5 |
| | |||||
* | core/vm: fixed jit error & added inline docs | Jeffrey Wilcke | 2015-08-11 | 2 | -11/+14 |
| | | | | | opNumber did not create a new big int which could lead to the block's number being modified. | ||||
* | cmd/geth, core/vm: setup vm settings and defaulted JIT disabled | Jeffrey Wilcke | 2015-08-09 | 1 | -3/+3 |
| | |||||
* | core/vm: reduced big int allocations | Jeffrey Wilcke | 2015-08-07 | 3 | -122/+77 |
| | | | | | | | Reduced big int allocation by making stack items modifiable. Instead of adding items such as `common.Big0` to the stack, `new(big.Int)` is added instead. One must expect that any item that is added to the stack might change. | ||||
* | core, tests: reduced state copy by N calls | Jeffrey Wilcke | 2015-08-07 | 5 | -1/+8 |
| | | | | | 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 vm | Jeffrey Wilcke | 2015-08-07 | 9 | -64/+1356 |
| | | | | * changed stack and removed stack ptr. Let go decide on slice reuse. | ||||
* | all: fix license headers one more time | Felix Lange | 2015-07-24 | 17 | -17/+17 |
| | | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a. | ||||
* | all: update license headers to distiguish GPL/LGPL | Felix Lange | 2015-07-23 | 17 | -68/+68 |
| | | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library". | ||||
* | core/vm: added str to op | Jeffrey Wilcke | 2015-07-09 | 1 | -0/+136 |
| | |||||
* | all: goimports -w | Felix Lange | 2015-07-07 | 1 | -2/+4 |
| | |||||
* | all: add some godoc synopsis comments | Felix Lange | 2015-07-07 | 1 | -0/+1 |
| | |||||
* | all: update license information | Felix Lange | 2015-07-07 | 17 | -0/+272 |
| | |||||
* | core, miner: removed vm errors from consensus err checking | Jeffrey Wilcke | 2015-07-06 | 1 | -1/+1 |
| | | | | | Removed VM errors from the consensus errors. They now used for output only. | ||||
* | Fix core error forwarding, unify OOG VM err | Gustav Simonsson | 2015-07-04 | 2 | -23/+5 |
| | |||||
* | Use uint64 for block header timestamp | Gustav Simonsson | 2015-06-30 | 2 | -2/+2 |
| | |||||
* | core/vm: clarified SSTORE | obscuren | 2015-06-18 | 1 | -7/+5 |
| | |||||
* | core, core/vm: state improvements and tx pool speed up | obscuren | 2015-06-17 | 1 | -15/+6 |
| | | | | Removed full tx validation during state transitions | ||||
* | core: TMP testing code | obscuren | 2015-06-17 | 1 | -6/+15 |
| | |||||
* | core/state, core/vm: reworked storage get / set to use common.Hash | obscuren | 2015-06-17 | 1 | -4/+11 |
| | |||||
* | core/state, core/vm: cleanup refunds | obscuren | 2015-06-17 | 1 | -2/+2 |
| | |||||
* | core/vm: Improved error reporting for trace logging | obscuren | 2015-06-12 | 4 | -46/+45 |
| | |||||
* | core/vm: fixed printable characters using unicode instead | obscuren | 2015-06-12 | 1 | -2/+2 |
| | |||||
* | core/vm: added a comment regarding the uint64 vs *big.Int | obscuren | 2015-06-11 | 1 | -1/+3 |
| | |||||
* | core/vm: reverse loop stack | obscuren | 2015-06-11 | 1 | -2/+3 |
| | |||||
* | core/vm: fixed a bug where `Data` ignored the stack ptr | obscuren | 2015-06-11 | 1 | -1/+1 |
| | |||||
* | core, core/vm: moved logger and added gas cost to struct logging | obscuren | 2015-06-11 | 3 | -4/+50 |
| | |||||
* | core/vm: unexported stack again. No longer required | obscuren | 2015-06-10 | 3 | -16/+16 |
| | |||||
* | core/vm: documentation and name changes | obscuren | 2015-06-10 | 2 | -18/+34 |
| | |||||
* | core/vm, core/state: added storage to structured vm logging | obscuren | 2015-06-10 | 2 | -8/+16 |
| | |||||
* | core, core/vm: added structure logging | obscuren | 2015-06-10 | 5 | -147/+40 |
| | | | | This also reduces the time required spend in the VM | ||||
* | core/vm: added structured logging | obscuren | 2015-06-10 | 1 | -4/+22 |
| | |||||
* | core/vm: changed program counter to uint64 | obscuren | 2015-06-10 | 2 | -13/+13 |
| | |||||
* | Remove unneeded if check on EC recover padding | Gustav Simonsson | 2015-06-09 | 1 | -3/+1 |
| | |||||
* | Pad precompiled EC recover input and add validations | Gustav Simonsson | 2015-06-09 | 1 | -8/+14 |
| | |||||
* | core/vm: cleanup and renames | obscuren | 2015-06-04 | 5 | -52/+0 |
| | |||||
* | core/vm: check for 'no code' before doing any work | Felix Lange | 2015-06-03 | 1 | -5/+5 |
| | |||||
* | core/vm: improve JUMPDEST analysis | Felix Lange | 2015-06-03 | 3 | -25/+44 |
| | | | | | | | | | * JUMPDEST analysis is faster because less type conversions are performed. * The map of JUMPDEST locations is now created lazily at the first JUMP. * The result of the analysis is kept around for recursive invocations through CALL/CALLCODE. Fixes #1147 | ||||
* | core/vm: Fork fix. Removal of appending 0 bytes in memset | obscuren | 2015-05-26 | 1 | -6/+2 |
| | |||||
* | Merge pull request #1101 from obscuren/issue-1096 | Jeffrey Wilcke | 2015-05-26 | 1 | -15/+3 |
|\ | | | | | core/vm: Cleanups & SUB output fix. Closes #1096 | ||||
| * | core/vm: Cleanups & SUB output fix. Closes #1096 | obscuren | 2015-05-26 | 1 | -15/+3 |
| | | |||||
* | | core/vm, rpc: added disasm to `ext_` RPC | obscuren | 2015-05-22 | 1 | -0/+21 |
|/ | |||||
* | core/vm: RETURN op code returns pointer to memory rather than copy | obscuren | 2015-05-20 | 2 | -1/+13 |
| | |||||
* | Changed how logs are being recorded | obscuren | 2015-04-08 | 2 | -2/+3 |
| | | | | | | | 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. | ||||
* | Use logger.Error instead of 0 with glog | Gustav Simonsson | 2015-04-07 | 1 | -1/+2 |
| | |||||
* | Forward and log EC recover err and remove dup pubkey len check | Gustav Simonsson | 2015-04-07 | 1 | -2/+4 |
| | |||||
* | basic glog | obscuren | 2015-04-04 | 2 | -11/+6 |
| | |||||
* | bool => int | obscuren | 2015-04-03 | 1 | -63/+63 |
| | |||||
* | fixed stack level | obscuren | 2015-04-03 | 1 | -3/+4 |
| | |||||
* | Read most protocol params from common/params.json | Gustav Simonsson | 2015-04-02 | 7 | -81/+46 |
| | | | | | | | | | * Add params package with exported variables generated from github.com/ethereum/common/blob/master/params.json * Use params package variables in applicable places * Add check for minimum gas limit in validation of block's gas limit * Remove common/params.json from go-ethereum to avoid outdated version of it | ||||
* | sha3 stack check | obscuren | 2015-04-01 | 1 | -1/+1 |
| | |||||
* | Check stack for BALANCE. Closes #622 | obscuren | 2015-04-01 | 1 | -1/+1 |
| | |||||
* | Blocktest fixed, Execution fixed | obscuren | 2015-04-01 | 1 | -1/+2 |
| | | | | | | * Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success) | ||||
* | Cleanup. | obscuren | 2015-03-29 | 1 | -10/+13 |
| | |||||
* | Merge branch 'fix_ecrecover' of https://github.com/ebuchman/go-ethereum into ↵ | obscuren | 2015-03-29 | 1 | -7/+21 |
| | | | | ebuchman-fix_ecrecover | ||||
* | Cleanup VM. | obscuren | 2015-03-29 | 4 | -56/+45 |
| | | | | | | | * CALLDATA use getData * removed old context get range value * removed casting big => int for some cases * pc now big int #457 | ||||
* | Cleanup VM | obscuren | 2015-03-29 | 3 | -10/+22 |
| | |||||
* | PUSH gas fix | obscuren | 2015-03-27 | 2 | -21/+5 |
| | |||||
* | Removed comments | obscuren | 2015-03-27 | 1 | -15/+0 |
| | |||||
* | Removed defer/panic. #503 | obscuren | 2015-03-27 | 4 | -120/+180 |
| | |||||
* | Explicitly check memory's data store. #515 | obscuren | 2015-03-27 | 1 | -1/+8 |
| | |||||
* | Stack limit | obscuren | 2015-03-27 | 1 | -0/+6 |
| | |||||
* | Cleaned up changes | obscuren | 2015-03-24 | 2 | -3/+2 |
| | |||||
* | Modified according to poc 9 changes | obscuren | 2015-03-24 | 1 | -1/+1 |
| | | | | * Refund of value | ||||
* | Decrement depth | obscuren | 2015-03-24 | 1 | -1/+3 |
| | |||||
* | moved state and vm to core | obscuren | 2015-03-23 | 17 | -0/+2384 |