aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/gas_table.go
Commit message (Collapse)AuthorAgeFilesLines
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-171-3/+3
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-3/+3
|
* core, cmd/puppeth: implement constantinople fix, disable EIP-1283 (#18486)Martin Holst Swende2019-01-301-1/+3
| | | | | | | | | | | | | | | | | This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg, but the genesis/config field is ConstantinopleFix. The block numbers are: 7280000 for Constantinople on Mainnet 7280000 for ConstantinopleFix on Mainnet 4939394 for ConstantinopleFix on Ropsten 9999999 for ConstantinopleFix on Rinkeby (real number decided later) This PR also defaults to using the same ConstantinopleFix number as whatever Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix is not set.This means that for private networks which have already transitioned to Constantinople, this PR will break the network unless ConstantinopleFix is explicitly set!
* core/vm: SHA3 word cost for CREATE2 (#17812)Martin Holst Swende2018-10-051-0/+11
| | | | | | | | * core/vm: create2 address generation tests * core/vm: per byte cost of CREATE2 * core/vm: fix linter issue in test
* core, params: polish net gas metering PR a bitPéter Szilágyi2018-09-181-63/+54
|
* core,state: finish implementing Eip 1283Martin Holst Swende2018-09-181-16/+13
|
* core, state: initial implementation of Eip-1283Martin Holst Swende2018-09-181-1/+58
|
* core/vm, params: implement EXTCODEHASH opcode (#17202)gary rong2018-07-241-0/+4
| | | | | | | | * 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/+12
| | | | | | | | | | * 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
* common: improve documentation comments (#16701)kiel barry2018-05-291-3/+3
| | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly.
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-4/+2
|
* core/vm: track 63/64 call gas off stack (#15563)Felix Lange2017-11-291-38/+8
| | | | | | | | | | | | | | | | | * 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
* consensus, core, params: rebrand Metro to ByzantiumPéter Szilágyi2017-09-141-1/+1
|
* core/vm: avoid state lookup during gas calc for call (#15061)Martin Holst Swende2017-09-041-1/+1
|
* core/vm: rework reversion to work on a higher levelPéter Szilágyi2017-08-171-0/+4
|
* core/vm: polish RETURNDATA, add missing returns to CALL*Péter Szilágyi2017-08-161-1/+1
|
* core/vm: implement RETURNDATA metropolis opcodesJeffrey Wilcke2017-08-161-0/+26
|
* core/vm: implement metropolis static call opcodeJeffrey Wilcke2017-08-151-0/+27
|
* core/vm: fix overflow in gas calculation formulaMartin Holst Swende2017-06-281-6/+10
|
* all: update license informationFelix Lange2017-04-141-0/+16
|
* all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-141-124/+294
| | | | | | | | | | | | | | | | | 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-294/+124
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-021-124/+294
| | | | | | | | | | | | | | | | 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
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-0/+246
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.