aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/evm.go
Commit message (Collapse)AuthorAgeFilesLines
* tests, core: update tests and make STATICCALL cause touch-delete (#18187)Martin Holst Swende2018-11-291-0/+6
|
* core/vm: faster create/create2 (#17806)Martin Holst Swende2018-10-041-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | * core/vm/runtim: benchmark create/create2 * core/vm: do less hashing in CREATE2 * core/vm: avoid storing jumpdest analysis for initcode * core/vm: avoid unneccesary lookups, remove unused fields * core/vm: go formatting tests * core/vm: save jumpdest analysis locally * core/vm: use common.Hash instead of nil, fix review comments * core/vm: removed type destinations * core/vm: correct check for empty hash * eth: more elegant api_tracer * core/vm: address review concerns
* core/vm: add switches to select evm+ewasm interpreters (#17687)Guillaume Ballet2018-09-201-2/+20
| | | | | Interpreter initialization is left to the PRs implementing them. Options for external interpreters are passed after a colon in the `--vm.ewasm` and `--vm.evm` switches.
* core/vm: Hide read only flag from Interpreter interface (#17461)Paweł Bylica2018-09-081-14/+7
| | | | | Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
* crypto: change formula for create2 (#17393)gary rong2018-08-141-1/+1
|
* core/vm: fix comment typo (#17319)stormpang2018-08-061-1/+1
| | | | antything --> anything :P
* core/vm: support for multiple interpreters (#17093)Guillaume Ballet2018-07-251-14/+33
| | | | | | - Define an Interpreter interface - One contract can call contracts from other interpreter types. - Pass the interpreter to the operands instead of the evm. This is meant to prevent type assertions in operands.
* core, crypto, params: implement CREATE2 evm instrction (#17196)gary rong2018-07-241-17/+31
| | | | | | | | | | * core, crypto, params: implement CREATE2 evm instrction * core/vm: add opcode to string mapping * core: remove past fork checking * core, crypto: use option2 to generate new address
* core/vm: clear linter warnings (#17057)Guillaume Ballet2018-06-261-1/+3
| | | | | | | | * core/vm: clear linter warnings * core/vm: review input * core/vm.go: revert lint in noop as per request
* core, eth: fix tracer dirty finalizationPéter Szilágyi2018-04-271-0/+5
|
* core/vm: Fixed typo in core/vm/evm.gohydai2018-03-261-3/+3
|
* core/vm: Fix comment typoGeorge Ornbo2018-01-161-1/+1
|
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-1/+1
|
* cmd, core, eth/tracers: support fancier js tracing (#15516)Péter Szilágyi2017-12-211-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd, core, eth/tracers: support fancier js tracing * eth, internal/web3ext: rework trace API, concurrency, chain tracing * eth/tracers: add three more JavaScript tracers * eth/tracers, vendor: swap ottovm to duktape for tracing * core, eth, internal: finalize call tracer and needed extras * eth, tests: prestate tracer, call test suite, rewinding * vendor: fix windows builds for tracer js engine * vendor: temporary duktape fix * eth/tracers: fix up 4byte and evmdis tracer * vendor: pull in latest duktape with my upstream fixes * eth: fix some review comments * eth: rename rewind to reexec to make it more obvious * core/vm: terminate tracing using defers
* core/vm: Remove snapshot param from Interpreter.Run()Paweł Bylica2017-12-151-7/+7
|
* core/vm: track 63/64 call gas off stack (#15563)Felix Lange2017-11-291-0/+4
| | | | | | | | | | | | | | | | | * core/vm: track 63/64 call gas off stack Gas calculations in gasCall* relayed the available gas for calls by replacing it on the stack. This lead to inconsistent traces, which we papered over by copying the pre-execution stack in trace mode. This change relays available gas using a temporary variable, off the stack, and allows removing the weird copy. * core/vm: remove stackCopy * core/vm: pop call gas into pool * core/vm: to -> addr
* 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-141-4/+4
|
* 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, tests: implement Metropolis EIP 684Péter Szilágyi2017-08-251-3/+11
|
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-1/+5
|
* core/vm: rework reversion to work on a higher levelPéter Szilágyi2017-08-171-16/+16
|
* core/vm: polish RETURNDATA, add missing returns to CALL*Péter Szilágyi2017-08-161-3/+3
|
* core/vm: minor polishes, fix STATICCALL for precompilesPéter Szilágyi2017-08-151-33/+30
| | | | | | * 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-151-0/+45
|
* core/vm: polish precompile contract code, add tests and benchesPéter Szilágyi2017-08-141-7/+8
| | | | | * 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-111-2/+6
|
* consensus, core/*, params: metropolis preparation refactorJeffrey Wilcke2017-05-181-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/state, core/vm: remove exported account getters (#3618)Jeffrey Wilcke2017-02-231-10/+8
| | | | Removed exported statedb object accessors, reducing the chance for nasty bugs to creep in. It's also ugly and unnecessary to have these methods.
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-141-0/+299
| | | | | | | | | | | | | | | | | 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-131-299/+0
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-021-0/+299
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