aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
Commit message (Collapse)AuthorAgeFilesLines
* core/vm: standard vm traces (#15035)cdetrio2017-09-221-3/+19
|
* params: Updated finalized gascosts for ECMUL/MODEXP (#15135)Martin Holst Swende2017-09-141-3/+3
| | | | | | | | | | | | * params: Updated finalized gascosts for ECMUL/MODEXP * core,tests: Updates pending new tests * tests: Updated with new tests * core: revert state transition bugfix * tests: Add expected failures due to #15119
* consensus, core, params: rebrand Metro to ByzantiumPéter Szilágyi2017-09-146-19/+19
|
* core/vm: Make MaxCodesize non-retroactive (#15072)Martin Holst Swende2017-09-041-1/+1
| | | | | | * core/vm: Make max_codesize only applicable post Spurious Dragon/158/155/161/170 * tests: Remove expected failure
* core/vm: avoid state lookup during gas calc for call (#15061)Martin Holst Swende2017-09-041-1/+1
|
* core/vm: renamed struct member + go fmtMartin Holst Swende2017-08-281-71/+71
|
* core/vm: Fix testcase input for ecmulMartin Holst Swende2017-08-281-2/+2
|
* core/vm: more benchmarksMartin Holst Swende2017-08-271-0/+76
|
* core, tests: implement Metropolis EIP 684Péter Szilágyi2017-08-252-8/+17
|
* consensus, core, tests: implement Metropolis EIP 649Péter Szilágyi2017-08-241-6/+2
|
* Merge pull request #15014 from rjl493456442/metropolis-eip658Péter Szilágyi2017-08-232-2/+6
|\ | | | | core: add status as a consensus field in receipt
| * core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-222-2/+6
| |
* | cmd/evm, core/vm, internal/ethapi: Show error when exiting (#14985)Martin Holst Swende2017-08-231-2/+5
|/ | | | | | * cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd * cmd/evm: fix nullpointer when there is no error
* core/vm: fix typo in method documentation (#15019)Ti Zhou2017-08-221-1/+1
| | | Signed-off-by: Ti Zhou <tizhou1986@gmail.com>
* Merge pull request #14983 from karalabe/metropolis-revertPéter Szilágyi2017-08-217-42/+70
|\ | | | | core/vm: implement REVERT metropolis opcode
| * core/vm: rework reversion to work on a higher levelPéter Szilágyi2017-08-176-45/+53
| |
| * core/vm: implement REVERT metropolis opcodeJeffrey Wilcke2017-08-164-1/+21
| |
* | core/vm, crypto/bn256: fix bn256 use and pairing corner casePéter Szilágyi2017-08-172-9/+69
|/
* core/vm: polish RETURNDATA, add missing returns to CALL*Péter Szilágyi2017-08-167-72/+75
|
* core/vm: implement RETURNDATA metropolis opcodesJeffrey Wilcke2017-08-166-171/+253
|
* core/vm: minor polishes, fix STATICCALL for precompilesPéter Szilágyi2017-08-152-37/+33
| | | | | | * Fix STATICCALL so it is able to call precompiles too * Fix write detection to use the correct value argument of CALL * Fix write protection to ignore the value in CALLCODE
* core/vm: implement metropolis static call opcodeJeffrey Wilcke2017-08-157-3/+153
|
* core/vm: optimize copy-less data retrievalsPéter Szilágyi2017-08-144-54/+75
|
* core/vm: benchmarking of metro precompilesMartin Holst Swende2017-08-142-206/+341
|
* core/vm: polish precompile contract code, add tests and benchesPéter Szilágyi2017-08-144-196/+355
| | | | | * Update modexp gas calculation to new version * Fix modexp modulo 0 special case to return zero
* core: add Metropolis pre-compiles (EIP 197, 198 and 213)Jeffrey Wilcke2017-08-113-2/+242
|
* core/vm/runtime: remove unused state parameter to NewEnv (#14953)Joel Burget2017-08-112-5/+4
| | | | | | | | * core: Remove unused `state` parameter to `NewEnv`. `cfg.State` is used instead. * core/vm/runtime: remove unused import
* core/vm: fix typo in comment (#14894)evgk2017-08-041-1/+1
|
* core/vm/runtime: fix evm command to use --gasprice flag valuecdetrio2017-07-261-1/+1
|
* core/vm: remove logging and add section labels to struct logs (#14782)Felix Lange2017-07-193-23/+16
|
* Merge pull request #14718 from holiman/gascalc_fixPéter Szilágyi2017-06-282-17/+17
|\ | | | | core/vm: fix overflow in gas calculation formula
| * core/vm : fix testcase for gas calculationMartin Holst Swende2017-06-281-11/+7
| |
| * core/vm: fix overflow in gas calculation formulaMartin Holst Swende2017-06-281-6/+10
| |
* | core/vm: add benchmarks for some ops and precompiles (#14641)Martin Holst Swende2017-06-281-0/+242
|/
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-272-3/+3
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* cmd/evm, core/vm: add --nomemory, --nostack to evm (#14617)Martin Holst Swende2017-06-212-31/+31
|
* Merge pull request #14581 from holiman/byte_optPéter Szilágyi2017-06-132-7/+48
|\ | | | | core/vm: improve opByte
| * core/vm, common/math: Add doc about Byte, fix formatMartin Holst Swende2017-06-091-1/+0
| |
| * common/math, core/vm: Un-expose bigEndianByteAt, use correct terms for ↵Martin Holst Swende2017-06-071-2/+2
| | | | | | | | endianness
| * core/vm, common/math: Add fast getByte for bigints, improve opByteMartin Holst Swende2017-06-052-7/+49
| |
* | cmd/evm: add --prestate, --sender, --json flags for fuzzing (#14476)Martin Holst Swende2017-06-074-19/+142
|/
* core/vm: Use a bitmap instead of a map for jumpdest analysisNick Johnson2017-06-021-14/+12
| | | | t push --force
* core: fix minor accidental typos and comment errorsPéter Szilágyi2017-05-251-1/+1
|
* core/vm: allocate stack to 1024Jeffrey Wilcke2017-05-251-1/+1
| | | | | Pre allocate the stack to 1024 optimising stack pushing, reducing calls to runtime.makeslice and runtime.mallocgc
* core/vm: expose intpool to stack dup methodJeffrey Wilcke2017-05-232-3/+3
| | | | | Improve the duplication method of the stack to reuse big ints by passing in an existing integer pool.
* core/vm: capped int poolJeffrey Wilcke2017-05-231-0/+6
|
* core/vm: improved push instructionsJeffrey Wilcke2017-05-232-35/+48
| | | | | Improved push instructions by removing unnecessary big int allocations and by making it int instead of big.Int
* core/vm: improve error message for invalid opcodesValentin Wüstholz2017-05-221-1/+1
|
* consensus, core, core/vm, parems: review fixesJeffrey Wilcke2017-05-182-9/+13
|
* consensus, core/*, params: metropolis preparation refactorJeffrey Wilcke2017-05-187-89/+141
| | | | | | | | | | | | | | | | | | | | | | | | This commit is a preparation for the upcoming metropolis hardfork. It prepares the state, core and vm packages such that integration with metropolis becomes less of a hassle. * Difficulty calculation requires header instead of individual parameters * statedb.StartRecord renamed to statedb.Prepare and added Finalise method required by metropolis, which removes unwanted accounts from the state (i.e. selfdestruct) * State keeps record of destructed objects (in addition to dirty objects) * core/vm pre-compiles may now return errors * core/vm pre-compiles gas check now take the full byte slice as argument instead of just the size * core/vm now keeps several hard-fork instruction tables instead of a single instruction table and removes the need for hard-fork checks in the instructions * core/vm contains a empty restruction function which is added in preparation of metropolis write-only mode operations * Adds the bn256 curve * Adds and sets the metropolis chain config block parameters (2^64-1)
* all: update license informationFelix Lange2017-04-148-1/+113
|
* core/vm: use uint64 instead of *big.Int in tracer (#3805)Yohann Leon2017-03-223-14/+10
|
* core/evm, core/vm: improved evm trace outputJeffrey Wilcke2017-03-011-15/+25
| | | | | | | | * Improved the standard evm tracer output and renamed it to WriteTrace which now takes an io.Writer to write the logs to. * Added WriteLogs which writes logs to the given writer in a readable format. * evm utility now also prints logs generated during the execution.
* cmd/evm, core/asm: add EVM assembler (#3686)Jeffrey Wilcke2017-03-011-18/+2
| | | | | The evm compile command implements a simple assembly language that compiles to EVM bytecode.
* Merge pull request #3723 from karalabe/logger-updates-2Péter Szilágyi2017-02-282-8/+3
|\ | | | | Logger updates
| * all: next batch of log polishes to contextual versionsPéter Szilágyi2017-02-282-8/+3
| |
* | all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-285-17/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math
* core, core/vm, cmd/disasm: unify procedures for disassembling evm code (#3530)Valentin Wüstholz2017-02-272-98/+0
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-275-48/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: remove CurrencyToString Move denomination values to params instead. * common: delete dead code * common: move big integer operations to common/math This commit consolidates all big integer operations into common/math and adds tests and documentation. There should be no change in semantics for BigPow, BigMin, BigMax, S256, U256, Exp and their behaviour is now locked in by tests. The BigD, BytesToBig and Bytes2Big functions don't provide additional value, all uses are replaced by new(big.Int).SetBytes(). BigToBytes is now called PaddedBigBytes, its minimum output size parameter is now specified as the number of bytes instead of bits. The single use of this function is in the EVM's MSTORE instruction. Big and String2Big are replaced by ParseBig, which is slightly stricter. It previously accepted leading zeros for hexadecimal inputs but treated decimal inputs as octal if a leading zero digit was present. ParseUint64 is used in places where String2Big was used to decode a uint64. The new functions MustParseBig and MustParseUint64 are now used in many places where parsing errors were previously ignored. * common: delete unused big integer variables * accounts/abi: replace uses of BytesToBig with use of encoding/binary * common: remove BytesToBig * common: remove Bytes2Big * common: remove BigTrue * cmd/utils: add BigFlag and use it for error-checked integer flags While here, remove environment variable processing for DirectoryFlag because we don't use it. * core: add missing error checks in genesis block parser * common: remove String2Big * cmd/evm: use utils.BigFlag * common/math: check for 256 bit overflow in ParseBig This is supposed to prevent silent overflow/truncation of values in the genesis block JSON. Without this check, a genesis block that set a balance larger than 256 bits would lead to weird behaviour in the VM. * cmd/utils: fixup import
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-232-13/+12
|
* core, core/state, core/vm: remove exported account getters (#3618)Jeffrey Wilcke2017-02-237-71/+60
| | | | Removed exported statedb object accessors, reducing the chance for nasty bugs to creep in. It's also ugly and unnecessary to have these methods.
* core/vm, crypto: support for go-fuzz (#3672)Jeffrey Wilcke2017-02-211-0/+20
|
* crypto: add btcec fallback for sign/recover without cgo (#3680)Felix Lange2017-02-181-10/+16
| | | | | | | | | | | * vendor: add github.com/btcsuite/btcd/btcec * crypto: add btcec fallback for sign/recover without cgo This commit adds a non-cgo fallback implementation of secp256k1 operations. * crypto, core/vm: remove wrappers for sha256, ripemd160
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-1419-628/+777
| | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-1320-1010/+869
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-0219-578/+727
| | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-174-1/+10
|
* all: fix spelling errorsPéter Szilágyi2017-01-071-4/+4
|
* all: gofmt -w -sFelix Lange2017-01-061-130/+130
|
* core/vm: move Log to core/typesFelix Lange2017-01-065-325/+13
| | | | | | | | This significantly reduces the dependency closure of ethclient, which no longer depends on core/vm as of this change. All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too, the constructor simply returned a literal.
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-0524-1912/+1591
| | | | | | | | | | | | | | | The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
* accounts, core, crypto, internal: use normalised V during signature handling ↵Péter Szilágyi2017-01-051-10/+4
| | | | | | | | | (#3455) To address increasing complexity in code that handles signatures, this PR discards all notion of "different" signature types at the library level. Both the crypto and accounts package is reduced to only be able to produce plain canonical secp256k1 signatures. This makes the crpyto APIs much cleaner, simpler and harder to abuse.
* core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-0616-444/+661
| | | | | | | | Environment is now a struct (not an interface). This reduces a lot of tech-debt throughout the codebase where a virtual machine environment had to be implemented in order to test or run it. The new environment is suitable to be used en the json tests, core consensus and light client.
* core, core/vm, eth/filters: move Removed field into vm.LogFelix Lange2016-12-052-41/+174
| | | | | | | | | | | | This field used to be assigned by the filter system and returned through the RPC API. Now that we have a Go client that uses the underlying type, the field needs to move. It is now assigned to true when the RemovedLogs event is generated so the filter system doesn't need to care about the field at all. While here, remove the log list from ChainSideEvent. There are no users of this field right now and any potential users could subscribe to RemovedLogsEvent instead.
* core/vm: use package hexutil for JSON handlingFelix Lange2016-11-282-28/+23
|
* core/vm/runtime: fixed go vetJeffrey Wilcke2016-11-141-1/+9
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-132-2/+2
|
* core/vm, params: EIP160: EXP repriceJeffrey Wilcke2016-11-131-1/+2
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-139-49/+72
| | | | | | | | | | | | | | | 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>
* common/math, core/vm: implement fast EXP (#3214)Jeffrey Wilcke2016-11-021-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_logsJeffrey Wilcke2016-10-313-3/+14
|\ | | | | core/vm: add limit option to LogConfig
| * vm, ethapi: add `limit` option to traceTransactionYoichi Hirai2016-09-303-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 Cheng2016-10-211-1/+3
| |
* | core/vm: fix GASPRICE string (resolves #2553)Benjamin Brent2016-10-191-1/+1
| |
* | core, core/vm: added gas price variance tableJeffrey Wilcke2016-10-156-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/HasSuicidedFelix Lange2016-10-064-5/+8
| | | | | | | | The delete/remove naming has caused endless confusion in the past.
* | core/state: implement reverts by journaling all changesFelix Lange2016-10-063-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 VMPéter Szilágyi2016-10-016-12/+17
|/
* core/state: track all accounts in canon stateFelix Lange2016-09-262-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 methodsFelix Lange2016-08-042-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 functionsNick Johnson2016-08-232-9/+6
|
* core/vm: Refactor tracing to make Tracer the main interfaceNick Johnson2016-08-2211-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 messageFelix Lange2016-08-061-2/+2
| | | | Fixes #2825
* Merge pull request #2724 from pirapira/fix_reset_feesPéter Szilágyi2016-07-152-2/+2
|\ | | | | vm: Replace some SstoreClearGas with SstoreResetGas
| * vm: Replace some SstoreClearGas with SstoreResetGasYoichi Hirai2016-06-222-2/+2
| |
* | eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-161-0/+2
|/
* all: fix go vet warningsFelix Lange2016-04-152-3/+1
|
* all: update license informationFelix Lange2016-04-1514-9/+90
|
* core: added basic chain configurationJeffrey Wilcke2016-04-0113-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 optionsJeffrey Wilcke2016-03-2412-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 EVMJeffrey Wilcke2016-03-239-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 typosLeif Jurvetson2016-03-169-18/+18
|
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-227-8/+8
| | | | As we aren't really using the standarized SHA-3
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-189-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 changesGustav Simonsson2016-02-1810-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 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, rpc/api: renamed to debug.replayTransaction, migrated to new RPC, ↵Peter Pratscher2016-02-022-1/+3
| | | | | | | | integrated feedback Integrated code review suggestions Integrated last review comments
* core/vm: resolve circular dependency to debug vm storagePéter Szilágyi2016-01-124-14/+20
|
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+16
|
* 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.
* Merge pull request #1883 from obscuren/jit-vm-optimisationsJeffrey Wilcke2015-10-2210-83/+469
|\ | | | | core/vm: JIT segmentation
| * core/vm: added parsing utilitiesJeffrey Wilcke2015-10-174-3/+180
| |
| * core/vm: added JIT segmenting / optimisationsJeffrey Wilcke2015-10-178-5/+202
| | | | | | | | | | * multi-push segments * static jumps segments
| * core/vm: abstracted instruction execution away from JITJeffrey Wilcke2015-10-172-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-rebaseJeffrey Wilcke2015-10-221-23/+28
|\ \ | | | | | | eth/63 fast synchronization algorithm
| * | core, eth, trie: fix data races and merge/review issuesPéter Szilágyi2015-10-211-1/+1
| | |
| * | core, eth: receipt chain reconstructionPéter Szilágyi2015-10-191-6/+8
| | |
| * | core: differentiate receipt concensus and storage decodingPéter Szilágyi2015-10-191-17/+20
| |/
* / core, tests: get_hash fixJeffrey Wilcke2015-10-211-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 overwritesPéter Szilágyi2015-10-121-3/+4
|
* core, core/vm, cmd/evm: remove redundant balance checkGustav Simonsson2015-10-062-4/+2
|
* cmd/geth, cmd/utils, core, rpc: renamed to blockchainJeffrey Wilcke2015-10-045-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 coreJeffrey Wilcke2015-10-0418-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 functionsGustav Simonsson2015-09-111-17/+0
|
* Add tests for uncle timestamps and refactor timestamp typeGustav Simonsson2015-08-254-4/+4
|
* cmd/evm, core/vm, tests: changed DisableVm to EnableVmJeffrey Wilcke2015-08-123-5/+5
|
* core/vm: fixed jit error & added inline docsJeffrey Wilcke2015-08-112-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 disabledJeffrey Wilcke2015-08-091-3/+3
|
* core/vm: reduced big int allocationsJeffrey Wilcke2015-08-073-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 callsJeffrey Wilcke2015-08-075-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 vmJeffrey Wilcke2015-08-079-64/+1356
| | | | * changed stack and removed stack ptr. Let go decide on slice reuse.
* all: fix license headers one more timeFelix Lange2015-07-2417-17/+17
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-2317-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 opJeffrey Wilcke2015-07-091-0/+136
|
* all: goimports -wFelix Lange2015-07-071-2/+4
|
* all: add some godoc synopsis commentsFelix Lange2015-07-071-0/+1
|
* all: update license informationFelix Lange2015-07-0717-0/+272
|
* core, miner: removed vm errors from consensus err checkingJeffrey Wilcke2015-07-061-1/+1
| | | | | Removed VM errors from the consensus errors. They now used for output only.
* Fix core error forwarding, unify OOG VM errGustav Simonsson2015-07-042-23/+5
|
* Use uint64 for block header timestampGustav Simonsson2015-06-302-2/+2
|
* core/vm: clarified SSTOREobscuren2015-06-181-7/+5
|
* core, core/vm: state improvements and tx pool speed upobscuren2015-06-171-15/+6
| | | | Removed full tx validation during state transitions
* core: TMP testing codeobscuren2015-06-171-6/+15
|
* core/state, core/vm: reworked storage get / set to use common.Hashobscuren2015-06-171-4/+11
|
* core/state, core/vm: cleanup refundsobscuren2015-06-171-2/+2
|
* core/vm: Improved error reporting for trace loggingobscuren2015-06-124-46/+45
|
* core/vm: fixed printable characters using unicode insteadobscuren2015-06-121-2/+2
|
* core/vm: added a comment regarding the uint64 vs *big.Intobscuren2015-06-111-1/+3
|
* core/vm: reverse loop stackobscuren2015-06-111-2/+3
|
* core/vm: fixed a bug where `Data` ignored the stack ptrobscuren2015-06-111-1/+1
|
* core, core/vm: moved logger and added gas cost to struct loggingobscuren2015-06-113-4/+50
|
* core/vm: unexported stack again. No longer requiredobscuren2015-06-103-16/+16
|
* core/vm: documentation and name changesobscuren2015-06-102-18/+34
|
* core/vm, core/state: added storage to structured vm loggingobscuren2015-06-102-8/+16
|
* core, core/vm: added structure loggingobscuren2015-06-105-147/+40
| | | | This also reduces the time required spend in the VM
* core/vm: added structured loggingobscuren2015-06-101-4/+22
|
* core/vm: changed program counter to uint64obscuren2015-06-102-13/+13
|
* Remove unneeded if check on EC recover paddingGustav Simonsson2015-06-091-3/+1
|
* Pad precompiled EC recover input and add validationsGustav Simonsson2015-06-091-8/+14
|
* core/vm: cleanup and renamesobscuren2015-06-045-52/+0
|
* core/vm: check for 'no code' before doing any workFelix Lange2015-06-031-5/+5
|
* core/vm: improve JUMPDEST analysisFelix Lange2015-06-033-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 memsetobscuren2015-05-261-6/+2
|
* Merge pull request #1101 from obscuren/issue-1096Jeffrey Wilcke2015-05-261-15/+3
|\ | | | | core/vm: Cleanups & SUB output fix. Closes #1096
| * core/vm: Cleanups & SUB output fix. Closes #1096obscuren2015-05-261-15/+3
| |
* | core/vm, rpc: added disasm to `ext_` RPCobscuren2015-05-221-0/+21
|/
* core/vm: RETURN op code returns pointer to memory rather than copyobscuren2015-05-202-1/+13
|
* Changed how logs are being recordedobscuren2015-04-082-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 glogGustav Simonsson2015-04-071-1/+2
|
* Forward and log EC recover err and remove dup pubkey len checkGustav Simonsson2015-04-071-2/+4
|
* basic glogobscuren2015-04-042-11/+6
|
* bool => intobscuren2015-04-031-63/+63
|
* fixed stack levelobscuren2015-04-031-3/+4
|
* Read most protocol params from common/params.jsonGustav Simonsson2015-04-027-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 checkobscuren2015-04-011-1/+1
|
* Check stack for BALANCE. Closes #622obscuren2015-04-011-1/+1
|
* Blocktest fixed, Execution fixedobscuren2015-04-011-1/+2
| | | | | | * Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success)
* Cleanup.obscuren2015-03-291-10/+13
|
* Merge branch 'fix_ecrecover' of https://github.com/ebuchman/go-ethereum into ↵obscuren2015-03-291-7/+21
| | | | ebuchman-fix_ecrecover
* Cleanup VM.obscuren2015-03-294-56/+45
| | | | | | | * CALLDATA use getData * removed old context get range value * removed casting big => int for some cases * pc now big int #457
* Cleanup VMobscuren2015-03-293-10/+22
|
* PUSH gas fixobscuren2015-03-272-21/+5
|
* Removed commentsobscuren2015-03-271-15/+0
|
* Removed defer/panic. #503obscuren2015-03-274-120/+180
|
* Explicitly check memory's data store. #515obscuren2015-03-271-1/+8
|
* Stack limitobscuren2015-03-271-0/+6
|
* Cleaned up changesobscuren2015-03-242-3/+2
|
* Modified according to poc 9 changesobscuren2015-03-241-1/+1
| | | | * Refund of value
* Decrement depthobscuren2015-03-241-1/+3
|
* moved state and vm to coreobscuren2015-03-2317-0/+2384