aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitry <dimitry@ethdev.com>2017-02-22 20:47:29 +0800
committerDimitry <dimitry@ethdev.com>2017-02-22 20:47:29 +0800
commit5b942ff2b41fe1181e8379aff4743ee29d5641ab (patch)
tree39ef2ad811fccc39385a6efd1f11e1c2388af71a /src
parentca08841cfde4c322c4b2d581a8ff512c366edca9 (diff)
downloaddexon-tests-5b942ff2b41fe1181e8379aff4743ee29d5641ab.tar
dexon-tests-5b942ff2b41fe1181e8379aff4743ee29d5641ab.tar.gz
dexon-tests-5b942ff2b41fe1181e8379aff4743ee29d5641ab.tar.bz2
dexon-tests-5b942ff2b41fe1181e8379aff4743ee29d5641ab.tar.lz
dexon-tests-5b942ff2b41fe1181e8379aff4743ee29d5641ab.tar.xz
dexon-tests-5b942ff2b41fe1181e8379aff4743ee29d5641ab.tar.zst
dexon-tests-5b942ff2b41fe1181e8379aff4743ee29d5641ab.zip
new uncle header tests
Diffstat (limited to 'src')
-rw-r--r--src/BlockchainTestsFiller/EIP150/bcUncleHeaderValiditiyFiller.json391
1 files changed, 387 insertions, 4 deletions
diff --git a/src/BlockchainTestsFiller/EIP150/bcUncleHeaderValiditiyFiller.json b/src/BlockchainTestsFiller/EIP150/bcUncleHeaderValiditiyFiller.json
index fc2766408..01b8b56a1 100644
--- a/src/BlockchainTestsFiller/EIP150/bcUncleHeaderValiditiyFiller.json
+++ b/src/BlockchainTestsFiller/EIP150/bcUncleHeaderValiditiyFiller.json
@@ -1728,7 +1728,7 @@
]
},
- "incorrectUncleTimestamp2" : {
+ "futureUncleTimestamp2" : {
"genesisBlockHeader" : {
"bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1",
@@ -1748,7 +1748,192 @@
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
- "balance" : "0x14"
+ "balance" : "30"
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "nonce" : "3"
+ }
+ },
+ "pre" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "10000000000000",
+ "nonce" : "0",
+ "code" : "",
+ "storage": {}
+ }
+ },
+ "blocks" : [
+ {
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "1",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "blockHeader" : {
+ "stateRoot" : "77f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fb",
+ "updatePoW" : "1"
+ },
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "2",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ {
+ "populateFromBlock" : "1",
+ "RelTimestamp" : "50000"
+ }
+ ]
+ }
+ ]
+ },
+
+ "futureUncleTimestampDifficultyDrop" : {
+ "genesisBlockHeader" : {
+ "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1",
+ "difficulty" : "331072",
+ "extraData" : "0x42",
+ "gasLimit" : "3141592",
+ "gasUsed" : "0",
+ "number" : "0",
+ "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a",
+ "timestamp" : "0x01",
+ "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "nonce" : "0x0102030405060708",
+ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ },
+ "expect" : {
+ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+ "balance" : "30"
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "nonce" : "3"
+ }
+ },
+ "pre" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "10000000000000",
+ "nonce" : "0",
+ "code" : "",
+ "storage": {}
+ }
+ },
+ "blocks" : [
+ {
+ "blocknumber" : "1",
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "blocknumber" : "2",
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "1",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "blocknumber" : "3",
+ "blockHeader" : {
+ "stateRoot" : "77f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fb",
+ "updatePoW" : "1"
+ },
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "2",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ {
+ "populateFromBlock" : "1",
+ "RelTimestamp" : "5000000"
+ }
+ ]
+ }
+ ]
+ },
+
+ "pastUncleTimestamp" : {
+ "genesisBlockHeader" : {
+ "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1",
+ "difficulty" : "131072",
+ "extraData" : "0x42",
+ "gasLimit" : "3141592",
+ "gasUsed" : "0",
+ "number" : "0",
+ "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a",
+ "timestamp" : "0x01",
+ "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "nonce" : "0x0102030405060708",
+ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ },
+ "expect" : {
+ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+ "balance" : "20"
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"nonce" : "2"
@@ -1764,6 +1949,7 @@
},
"blocks" : [
{
+ "blocknumber" : "1",
"transactions" : [
{
"data" : "",
@@ -1779,6 +1965,7 @@
]
},
{
+ "blocknumber" : "2",
"transactions" : [
{
"data" : "",
@@ -1793,8 +1980,203 @@
"uncleHeaders" : [
]
},
+ {
+ "expectException" : "InvalidTimestamp",
+ "blocknumber" : "3",
+ "blockHeader" : {
+ "stateRoot" : "77f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fb",
+ "updatePoW" : "1"
+ },
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "2",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ {
+ "populateFromBlock" : "1",
+ "RelTimestamp" : "-5000000"
+ }
+ ]
+ }
+ ]
+ },
+
+ "gasLimitLTGasUsageUncle" : {
+ "genesisBlockHeader" : {
+ "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1",
+ "difficulty" : "131072",
+ "extraData" : "0x42",
+ "gasLimit" : "3141592",
+ "gasUsed" : "0",
+ "number" : "0",
+ "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a",
+ "timestamp" : "0x01",
+ "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "nonce" : "0x0102030405060708",
+ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ },
+ "expect" : {
+ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+ "balance" : "20"
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "nonce" : "2"
+ }
+ },
+ "pre" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "10000000000000",
+ "nonce" : "0",
+ "code" : "",
+ "storage": {}
+ }
+ },
+ "blocks" : [
{
- "expectException" : "InvalidStateRoot",
+ "blocknumber" : "1",
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "blocknumber" : "2",
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "1",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "expectException" : "TooMuchGasUsed",
+ "blocknumber" : "3",
+ "blockHeader" : {
+ "stateRoot" : "77f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fb",
+ "updatePoW" : "1"
+ },
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "2",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ {
+ "populateFromBlock" : "1",
+ "gasUsed" : "314159000",
+ "overwriteAndRedoPoW" : "gasUsed"
+ }
+ ]
+ }
+ ]
+ },
+
+ "uncleBloomNot0" : {
+ "genesisBlockHeader" : {
+ "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1",
+ "difficulty" : "131072",
+ "extraData" : "0x42",
+ "gasLimit" : "3141592",
+ "gasUsed" : "0",
+ "number" : "0",
+ "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a",
+ "timestamp" : "0x01",
+ "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "nonce" : "0x0102030405060708",
+ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ },
+ "expect" : {
+ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+ "balance" : "30"
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "nonce" : "3"
+ }
+ },
+ "pre" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "10000000000000",
+ "nonce" : "0",
+ "code" : "",
+ "storage": {}
+ }
+ },
+ "blocks" : [
+ {
+ "blocknumber" : "1",
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "blocknumber" : "2",
+ "transactions" : [
+ {
+ "data" : "",
+ "gasLimit" : "314159",
+ "gasPrice" : "1",
+ "nonce" : "1",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : "10"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ },
+ {
+ "blocknumber" : "3",
+ "blockHeader" : {
+ "stateRoot" : "77f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fb",
+ "updatePoW" : "1"
+ },
"transactions" : [
{
"data" : "",
@@ -1809,7 +2191,8 @@
"uncleHeaders" : [
{
"populateFromBlock" : "1",
- "RelTimestamp" : "500"
+ "bloom" : "00000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000450000",
+ "overwriteAndRedoPoW" : "bloom"
}
]
}