aboutsummaryrefslogtreecommitdiffstats
path: root/tests/files/TransactionTests
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-02 23:34:03 +0800
committerobscuren <geffobscura@gmail.com>2015-03-02 23:34:03 +0800
commitb13735b40024ccc704a4c343b2985165a3bc66f4 (patch)
treea814196fe4c154f886ba0c6a9ba4348c9268b849 /tests/files/TransactionTests
parentb383ff0b96a1cf3df0b56f13b8d303ae4d4977ad (diff)
downloaddexon-b13735b40024ccc704a4c343b2985165a3bc66f4.tar
dexon-b13735b40024ccc704a4c343b2985165a3bc66f4.tar.gz
dexon-b13735b40024ccc704a4c343b2985165a3bc66f4.tar.bz2
dexon-b13735b40024ccc704a4c343b2985165a3bc66f4.tar.lz
dexon-b13735b40024ccc704a4c343b2985165a3bc66f4.tar.xz
dexon-b13735b40024ccc704a4c343b2985165a3bc66f4.tar.zst
dexon-b13735b40024ccc704a4c343b2985165a3bc66f4.zip
updated tests
Diffstat (limited to 'tests/files/TransactionTests')
-rw-r--r--tests/files/TransactionTests/ttTransactionTest.json113
-rw-r--r--tests/files/TransactionTests/ttWrongRLPTransaction.json51
2 files changed, 130 insertions, 34 deletions
diff --git a/tests/files/TransactionTests/ttTransactionTest.json b/tests/files/TransactionTests/ttTransactionTest.json
index 5949b4f50..c72f4a699 100644
--- a/tests/files/TransactionTests/ttTransactionTest.json
+++ b/tests/files/TransactionTests/ttTransactionTest.json
@@ -1,7 +1,31 @@
{
+ "AddressLessThan20" : {
+ "rlp" : "0xf85280018207d0870b9331677e6ebf0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
+ },
+ "AddressLessThan20Prefixed0" : {
+ "rlp" : "0xf85f80018207d094000000000000000000000000000b9331677e6ebf0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3",
+ "sender" : "23f0d6e160851f7b435f743d2ec368449bb06c0f",
+ "transaction" : {
+ "data" : "",
+ "gasLimit" : "2000",
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
+ "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3",
+ "to" : "0x000000000000000000000000000b9331677e6ebf",
+ "v" : "28",
+ "value" : "10"
+ }
+ },
+ "AddressMoreThan20" : {
+ "rlp" : "0xf86080018207d095b94f5374fce5edbc8e2a8697c15331677e6ebf0b1c0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
+ },
+ "AddressMoreThan20PrefixedBy0" : {
+ "rlp" : "0xf867367b8203e89c0000000000000000095e7baea6a6c7c4c2dfeb977efac326af552d870b121ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
"EmptyTransaction" : {
- "rlp" : "0xf8498080808080801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
- "sender" : "66c7b5c28121e4b66583d15481c92f5ad848fe1f",
+ "rlp" : "0xf85d80808094095e7baea6a6c7c4c2dfeb977efac326af552d8780801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
+ "sender" : "3e2ddf4fea89f584a735a1234cf20d8627421564",
"transaction" : {
"data" : "",
"gasLimit" : "",
@@ -9,39 +33,9 @@
"nonce" : "",
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
- "to" : "",
- "v" : "27",
- "value" : ""
- }
- },
- "RLPElementsWithZeros" : {
- "rlp" : "0xf8662c538203e894095e7baea6a6c7c4c2dfeb977efac326af552d870987000000112223331ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
- "sender" : "f8cf3e78f097103c068225ce61e34f29078191a5",
- "transaction" : {
- "data" : "0x0000011222333",
- "gasLimit" : "1000",
- "gasPrice" : "00123",
- "nonce" : "0054",
- "r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
- "s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
- "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
- "v" : "27",
- "value" : "00000011"
- }
- },
- "RLPWrongHexElements" : {
- "rlp" : "0xf864367b8203e894095e7baea6a6c7c4c2dfeb977efac326af552d870b8500000000121ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
- "sender" : "65959aab09090881850fd56f8a1cacb3abc4e811",
- "transaction" : {
- "data" : "0x0000000012",
- "gasLimit" : "1000",
- "gasPrice" : "123",
- "nonce" : "54",
- "r" : "0x0048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
- "s" : "0x00efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
"v" : "27",
- "value" : "11"
+ "value" : ""
}
},
"RightVRSTest" : {
@@ -114,10 +108,61 @@
"TransactionWithTooManyRLPElements" : {
"rlp" : "0xf865800182035294095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804851de98d0edd"
},
+ "ValuesAsDec" : {
+ "rlp" : "0xf86a830ffdc50183adc05394b94f5374fce5edbc8e2a8697c15331677e6ebf0b870ffdc5fffdc12c801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3",
+ "sender" : "3eb583df408b324b4ba3a8d63e6b2dba1c4f28f6",
+ "transaction" : {
+ "data" : "",
+ "gasLimit" : "11386963",
+ "gasPrice" : "1",
+ "nonce" : "1048005",
+ "r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
+ "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3",
+ "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "v" : "28",
+ "value" : "4501151495864620"
+ }
+ },
+ "ValuesAsHex" : {
+ "rlp" : "0xf867830ffdc50183adc05394b94f5374fce5edbc8e2a8697c15331677e6ebf0b84fffdc12c801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3",
+ "sender" : "24ef2c911b7b98e481e4c97c201194ee7889501b",
+ "transaction" : {
+ "data" : "",
+ "gasLimit" : "0xadc053",
+ "gasPrice" : "1",
+ "nonce" : "0xffdc5",
+ "r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
+ "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3",
+ "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "v" : "28",
+ "value" : "4294820140"
+ }
+ },
+ "WrongVRSTestIncorrectSize" : {
+ "rlp" : "0xf86380018207d094b94f5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca298ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a02c3a28887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a302c3"
+ },
"WrongVRSTestVge31" : {
"rlp" : "0xf85f80018207d094b94f5374fce5edbc8e2a8697c15331677e6ebf0b0a801fa098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
},
- "WrongVRSTestVl27" : {
+ "WrongVRSTestVl26" : {
"rlp" : "0xf85f80018207d094b94f5374fce5edbc8e2a8697c15331677e6ebf0b0a801aa098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
+ },
+ "WrongVRSTestVl29" : {
+ "rlp" : "0xf85f80018207d094b94f5374fce5edbc8e2a8697c15331677e6ebf0b0a801da098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
+ },
+ "unpadedRValue" : {
+ "rlp" : "0xf8880d8609184e72a000822710947c47ef93268a311f4cad0c750724299e9b72c26880a4379607f500000000000000000000000000000000000000000000000000000000000000051c9f6ab6dda9f4df56ea45583af36660329147f1753f3724ea5eb9ed83e812ca77a0495701e230667832c8999e884e366a61028633ecf951e8cd66d119f381ae5718",
+ "sender" : "7adf3b3bce3a5c8c17e8b243f4c331dd97c60579",
+ "transaction" : {
+ "data" : "0x379607f50000000000000000000000000000000000000000000000000000000000000005",
+ "gasLimit" : "0x2710",
+ "gasPrice" : "0x09184e72a000",
+ "nonce" : "13",
+ "r" : "0x006ab6dda9f4df56ea45583af36660329147f1753f3724ea5eb9ed83e812ca77",
+ "s" : "0x495701e230667832c8999e884e366a61028633ecf951e8cd66d119f381ae5718",
+ "to" : "7c47ef93268a311f4cad0c750724299e9b72c268",
+ "v" : "28",
+ "value" : ""
+ }
}
} \ No newline at end of file
diff --git a/tests/files/TransactionTests/ttWrongRLPTransaction.json b/tests/files/TransactionTests/ttWrongRLPTransaction.json
new file mode 100644
index 000000000..6c4e45326
--- /dev/null
+++ b/tests/files/TransactionTests/ttWrongRLPTransaction.json
@@ -0,0 +1,51 @@
+{
+ "RLPNonceWithFirstZeros" : {
+ "rlp" : "0xf86384000000030182035294095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPgasPriceWithFirstZeros" : {
+ "rlp" : "0xf862808300000182035294095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPgasLimitWithFirstZeros" : {
+ "rlp" : "0xf862800185000000094894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPValueWithFirstZeros" : {
+ "rlp" : "0xf861800182035294095e7baea6a6c7c4c2dfeb977efac326af552d8782000a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPWrongAddress" : {
+ "rlp" : "0xf85f800182094894095v7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPWrongData" : {
+ "rlp" : "0xf86d800182035294095e7baea6a6c7c4c2dfeb977efac326af552d870a8e0358ac39584bc98a7v979f984b031ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPAddressWithFirstZeros" : {
+ "rlp" : "0xf86080018209489500095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPAddressWrongSize" : {
+ "rlp" : "0xf866830ffdc50183adc05390fce5edbc8e2a8697c15331677e6ebf0b870ffdc5fffdc12c801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
+ },
+
+ "RLPExtraRandomByteAtTheEnd" : {
+ "rlp" : "0xf85280018207d0870b9331677e6ebf0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a33ac4"
+ },
+
+ "RLPTransactionGivenAsArray" : {
+ "rlp" : "0xb85f800182035294095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPElementIsListWhenItShouldntBe" : {
+ "rlp" : "0xf8698001cc83646f6783676f648363617494095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ },
+
+ "RLPElementIsListWhenItShouldntBe2" : {
+ "rlp" : "0xf86bcc83646f6783676f64836361740182035294095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
+ }
+}
+
+