aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitry <dimitry@ethereum.org>2018-03-23 22:12:46 +0800
committerDimitry <dimitry@ethereum.org>2018-05-15 22:43:32 +0800
commit65184583143d1c31f0c360280bc247c952f25ae4 (patch)
treed837b57f599b845a5659cc453c7a7d95fd33b8c7 /src
parenta55c8c39203d3ae6c65a1517b8c001b274f41d10 (diff)
downloadtangerine-tests-65184583143d1c31f0c360280bc247c952f25ae4.tar.gz
tangerine-tests-65184583143d1c31f0c360280bc247c952f25ae4.tar.zst
tangerine-tests-65184583143d1c31f0c360280bc247c952f25ae4.zip
fix more tests
Diffstat (limited to 'src')
-rw-r--r--src/GeneralStateTestsFiller/stCallCreateCallCodeTest/createNameRegistratorPerTxsNotEnoughGasFiller.json19
-rw-r--r--src/GeneralStateTestsFiller/stExample/add11Filler.json1
-rw-r--r--src/GeneralStateTestsFiller/stInitCodeTest/NotEnoughCashContractCreationFiller.json22
-rw-r--r--src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasContractCreationFiller.json42
-rw-r--r--src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasPrefundedContractCreationFiller.json18
5 files changed, 90 insertions, 12 deletions
diff --git a/src/GeneralStateTestsFiller/stCallCreateCallCodeTest/createNameRegistratorPerTxsNotEnoughGasFiller.json b/src/GeneralStateTestsFiller/stCallCreateCallCodeTest/createNameRegistratorPerTxsNotEnoughGasFiller.json
index 3ce51c24a..a3bd2db11 100644
--- a/src/GeneralStateTestsFiller/stCallCreateCallCodeTest/createNameRegistratorPerTxsNotEnoughGasFiller.json
+++ b/src/GeneralStateTestsFiller/stCallCreateCallCodeTest/createNameRegistratorPerTxsNotEnoughGasFiller.json
@@ -10,15 +10,28 @@
},
"expect" : [
{
- "indexes" : { "data" : -1, "gas" : -1, "value" : -1},
+ "indexes" : { "data" : -1, "gas" : 0, "value" : -1},
"network" : ["Frontier"],
"result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "0x0de0b6b3a7640000",
+ "balance" : "1000000000000000000",
"nonce" : "0x00"
},
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
- "balance" : "0x00"
+ "balance" : "0"
+ }
+ }
+ },
+ {
+ "indexes" : { "data" : -1, "gas" : 1, "value" : -1},
+ "network" : ["Frontier"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x0de0b6b3a761d192",
+ "nonce" : "0x01"
+ },
+ "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
+ "balance" : "0xa7ce"
}
}
},
diff --git a/src/GeneralStateTestsFiller/stExample/add11Filler.json b/src/GeneralStateTestsFiller/stExample/add11Filler.json
index 90b18ed66..35ff4bb90 100644
--- a/src/GeneralStateTestsFiller/stExample/add11Filler.json
+++ b/src/GeneralStateTestsFiller/stExample/add11Filler.json
@@ -44,6 +44,7 @@
"pre" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "1000000000000000000",
+ "//code" : "{ [[ 0 ]] (ADD 1 1) }",
"code" : "0x6001600101600055",
"nonce" : "0",
"storage" : {
diff --git a/src/GeneralStateTestsFiller/stInitCodeTest/NotEnoughCashContractCreationFiller.json b/src/GeneralStateTestsFiller/stInitCodeTest/NotEnoughCashContractCreationFiller.json
index acee81b7d..3edf8f15c 100644
--- a/src/GeneralStateTestsFiller/stInitCodeTest/NotEnoughCashContractCreationFiller.json
+++ b/src/GeneralStateTestsFiller/stInitCodeTest/NotEnoughCashContractCreationFiller.json
@@ -15,10 +15,30 @@
"gas" : -1,
"value" : -1
},
- "network" : [">=Frontier"],
+ "network" : ["<EIP158"],
"result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "22177"
+ },
+ "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
+ "//comment" : "0 mining reward considered to be as a touch. empty account created and stays untill eip158",
+ "balance" : "0"
+ }
+ }
+ },
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=EIP158"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "22177"
+ },
+ "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
+ "shouldnotexist" : "1"
}
}
}
diff --git a/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasContractCreationFiller.json b/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasContractCreationFiller.json
index 086e0ec2b..24da2545a 100644
--- a/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasContractCreationFiller.json
+++ b/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasContractCreationFiller.json
@@ -9,31 +9,58 @@
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : [
- {
+ {
"indexes" : {
"data" : -1,
- "gas" : -1,
+ "gas" : 0,
"value" : -1
},
"network" : ["Frontier"],
"result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "838000"
+ "balance" : "838000"
}
}
},
{
"indexes" : {
"data" : -1,
- "gas" : -1,
+ "gas" : 0,
"value" : -1
},
- "network" : [">=Homestead"],
+ "network" : [">Frontier"],
"result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "//comment" : "Transaction should be rejected because creation + dataGas > trGas",
"balance" : "1000000"
}
}
+ },
+ {
+ "indexes" : {
+ "data" : 0,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Frontier"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "550000"
+ }
+ }
+ },
+ {
+ "indexes" : {
+ "data" : 1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">Frontier"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "699771"
+ }
+ }
}
],
"pre" : {
@@ -47,10 +74,11 @@
},
"transaction" : {
"data" : [
- "0x600a80600c6000396000f200600160008035811a8100"
+ "0x600a80600c6000396000f200600160008035811a8100",
+ "0x600160015560026001556003600155600460015560056001556006600155"
],
"gasLimit" : [
- "54000"
+ "54000", "150000"
],
"gasPrice" : "3",
"nonce" : "0",
diff --git a/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasPrefundedContractCreationFiller.json b/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasPrefundedContractCreationFiller.json
index 59a0e33e9..19bda6b39 100644
--- a/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasPrefundedContractCreationFiller.json
+++ b/src/GeneralStateTestsFiller/stInitCodeTest/OutOfGasPrefundedContractCreationFiller.json
@@ -35,7 +35,7 @@
"gas" : -1,
"value" : -1
},
- "network" : [">=Homestead"],
+ "network" : [">=EIP158"],
"result" : {
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
"shouldnotexist" : "1"
@@ -44,6 +44,22 @@
"nonce" : "0x00"
}
}
+ },
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Homestead", "EIP150"],
+ "result" : {
+ "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
+ "balance" : "0"
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "nonce" : "0x00"
+ }
+ }
}
],
"pre" : {