aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2017-02-02 22:25:42 +0800
committerGitHub <noreply@github.com>2017-02-02 22:25:42 +0800
commit8b57c494908637a5c0e74f8f7a13b3218e026757 (patch)
treed5c7842eea6959c3b91dba00e8452a79d735a2a3 /tests
parent296450451b090393b2dd11d057c5b72cb4d92356 (diff)
downloadgo-tangerine-8b57c494908637a5c0e74f8f7a13b3218e026757.tar
go-tangerine-8b57c494908637a5c0e74f8f7a13b3218e026757.tar.gz
go-tangerine-8b57c494908637a5c0e74f8f7a13b3218e026757.tar.bz2
go-tangerine-8b57c494908637a5c0e74f8f7a13b3218e026757.tar.lz
go-tangerine-8b57c494908637a5c0e74f8f7a13b3218e026757.tar.xz
go-tangerine-8b57c494908637a5c0e74f8f7a13b3218e026757.tar.zst
go-tangerine-8b57c494908637a5c0e74f8f7a13b3218e026757.zip
params: core, core/vm, miner: 64bit gas instructions (#3514)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/block_test_util.go2
-rw-r--r--tests/state_test_util.go2
-rw-r--r--tests/vm_test_util.go6
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index 470eb7cb7..01539de03 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -146,7 +146,7 @@ func runBlockTests(homesteadBlock, daoForkBlock, gasPriceFork *big.Int, bt map[s
}
for name, test := range bt {
- if skipTest[name] {
+ if skipTest[name] /*|| name != "CallingCanonicalContractFromFork_CALLCODE"*/ {
glog.Infoln("Skipping block test", name)
continue
}
diff --git a/tests/state_test_util.go b/tests/state_test_util.go
index 5469a4c71..e8ab29d14 100644
--- a/tests/state_test_util.go
+++ b/tests/state_test_util.go
@@ -108,7 +108,7 @@ func runStateTests(chainConfig *params.ChainConfig, tests map[string]VmTest, ski
}
for name, test := range tests {
- if skipTest[name] {
+ if skipTest[name] /*|| name != "JUMPDEST_Attack"*/ {
glog.Infoln("Skipping state test", name)
continue
}
diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go
index 25e55886f..1edf0e425 100644
--- a/tests/vm_test_util.go
+++ b/tests/vm_test_util.go
@@ -129,7 +129,7 @@ func runVmTests(tests map[string]VmTest, skipTests []string) error {
}
for name, test := range tests {
- if skipTest[name] /*|| name != "loop_stacklimit_1021"*/ {
+ if skipTest[name] /*|| name != "exp0"*/ {
glog.Infoln("Skipping VM test", name)
continue
}
@@ -229,6 +229,6 @@ func RunVm(statedb *state.StateDB, env, exec map[string]string) ([]byte, []*type
vm.PrecompiledContracts = make(map[common.Address]vm.PrecompiledContract)
environment, _ := NewEVMEnvironment(true, chainConfig, statedb, env, exec)
- ret, err := environment.Call(caller, to, data, gas, value)
- return ret, statedb.Logs(), gas, err
+ ret, g, err := environment.Call(caller, to, data, gas.Uint64(), value)
+ return ret, statedb.Logs(), new(big.Int).SetUint64(g), err
}