aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/jump_table.go
Commit message (Collapse)AuthorAgeFilesLines
* core: vm: remove opRand and use oracle contract to get random numberJhih-Ming Huang2019-09-171-6/+0
|
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-171-1/+1
|
* core: vm: implement RAND opcode supportWei-Ning Huang2019-06-121-0/+6
| | | | | | DEXON has a built-in on chain random oracle that allow one to retrieve a random variable. Add a new opcode `RAND` to load the random variable onto the stack.
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-1/+1
|
* core/vm: support for multiple interpreters (#17093)Guillaume Ballet2018-07-251-1/+1
| | | | | | - 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/vm, params: implement EXTCODEHASH opcode (#17202)gary rong2018-07-241-0/+6
| | | | | | | | * core/vm, params: implement EXTCODEHASH opcode * core, params: tiny fixes and polish * core: add function description
* core, crypto, params: implement CREATE2 evm instrction (#17196)gary rong2018-07-241-0/+9
| | | | | | | | | | * 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-11/+11
| | | | | | | | * core/vm: clear linter warnings * core/vm: review input * core/vm.go: revert lint in noop as per request
* core/vm: fix typo in commentAbel Nieto2018-05-291-1/+1
|
* core, vm, common: define constantinople fork + shift (#16045)Martin Holst Swende2018-02-231-3/+30
| | | | | | | | | | | | * core, vm, common: define constantinople fork, start implementation of shift instructions * vm: more testcases * vm: add tests for intpool erroneous intpool handling * core, vm, common: fix constantinople review concerns * vm: add string<->op definitions for new opcodes
* core/vm: fix typos in jump_table.goJay Guo2017-11-141-2/+2
|
* consensus, core, params: rebrand Metro to ByzantiumPéter Szilágyi2017-09-141-6/+6
|
* core/vm: rework reversion to work on a higher levelPéter Szilágyi2017-08-171-15/+10
|
* core/vm: implement REVERT metropolis opcodeJeffrey Wilcke2017-08-161-0/+7
|
* core/vm: polish RETURNDATA, add missing returns to CALL*Péter Szilágyi2017-08-161-26/+28
|
* core/vm: implement RETURNDATA metropolis opcodesJeffrey Wilcke2017-08-161-16/+34
|
* core/vm: implement metropolis static call opcodeJeffrey Wilcke2017-08-151-2/+23
|
* core/vm: improved push instructionsJeffrey Wilcke2017-05-231-32/+32
| | | | | Improved push instructions by removing unnecessary big int allocations and by making it int instead of big.Int
* consensus, core, core/vm, parems: review fixesJeffrey Wilcke2017-05-181-3/+7
|
* consensus, core/*, params: metropolis preparation refactorJeffrey Wilcke2017-05-181-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-141-51/+54
| | | | | | | | | | | | | | | | | 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-285/+282
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-021-2/+5
| | | | | | | | | | | | | | | | 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
* all: gofmt -w -sFelix Lange2017-01-061-130/+130
|
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-142/+828
| | | | | | | | | | | | | | | 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.
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-2/+6
| | | | | | | | | | | | | | | 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>
* all: update license informationFelix Lange2016-04-151-0/+16
|
* core: added basic chain configurationJeffrey Wilcke2016-04-011-7/+3
| | | | | | | | | 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, core/vm, tests: changed the initialisation behaviour of the EVMJeffrey Wilcke2016-03-231-7/+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, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-4/+19
| | | | | | * 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-181-1/+2
| | | | | | | | * 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
* cmd/evm, core/vm, test: refactored VM and coreJeffrey Wilcke2015-10-041-0/+143
* 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`.