From 8ce4e370169ed716d6f440b81f105ca31842c539 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Sat, 7 Mar 2015 14:18:22 +0100 Subject: [PATCH 01/10] add suiciderefund tests --- test/stRefundTestFiller.json | 89 +++++++++++++++++++++++++++++++ test/stTransactionTestFiller.json | 4 +- 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/test/stRefundTestFiller.json b/test/stRefundTestFiller.json index 9e867a508..b0d0e1747 100644 --- a/test/stRefundTestFiller.json +++ b/test/stRefundTestFiller.json @@ -304,6 +304,95 @@ "data" : "" } }, + + "refund_CallToSuicide" : { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "10000000", + "currentDifficulty" : "256", + "currentTimestamp" : 1, + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ [[ 0 ]] (CALL 500 0xaaae7baea6a6c7c4c2dfeb977efac326af552aaa 0 0 0 0 0 )}", + "storage" : { + "0x01" : "0x01" + } + }, + "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ (SUICIDE 0x095e7baea6a6c7c4c2dfeb977efac326af552d87) }", + "storage" : { + "0x01" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : { + "nonce" : "0", + "gasPrice" : "1", + "gasLimit" : "10000000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "data" : "" + } + }, + + "refund_CallToSuicideTwice" : { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "10000000", + "currentDifficulty" : "256", + "currentTimestamp" : 1, + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ [[ 0 ]] (CALL 500 0xaaae7baea6a6c7c4c2dfeb977efac326af552aaa 0 0 0 0 0 ) (CALL 500 0xaaae7baea6a6c7c4c2dfeb977efac326af552aaa 0 0 0 0 0 )}", + "storage" : { + "0x01" : "0x01" + } + }, + "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ (SUICIDE 0x095e7baea6a6c7c4c2dfeb977efac326af552d87) }", + "storage" : { + "0x01" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : { + "nonce" : "0", + "gasPrice" : "1", + "gasLimit" : "10000000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "data" : "" + } + }, + "refund_CallA" : { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", diff --git a/test/stTransactionTestFiller.json b/test/stTransactionTestFiller.json index 1299e6d94..b6ddbb2f9 100644 --- a/test/stTransactionTestFiller.json +++ b/test/stTransactionTestFiller.json @@ -584,7 +584,7 @@ "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "100000", + "balance" : "180000", "code" : "", "nonce" : "0", "storage" : { @@ -612,7 +612,7 @@ "transaction" : { "data" : "", - "gasLimit" : "50000", + "gasLimit" : "150000", "gasPrice" : "1", "nonce" : "", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", From d430ac7bef46688f98554be309a7cba078ff2e4b Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Sat, 7 Mar 2015 23:52:26 +0100 Subject: [PATCH 02/10] adjust gas prices for arithmetic tests --- test/vmArithmeticTestFiller.json | 404 ++++++++++++---------- test/vmIOandFlowOperationsTestFiller.json | 225 +++++++++++- 2 files changed, 440 insertions(+), 189 deletions(-) diff --git a/test/vmArithmeticTestFiller.json b/test/vmArithmeticTestFiller.json index 933df72d1..71d274175 100644 --- a/test/vmArithmeticTestFiller.json +++ b/test/vmArithmeticTestFiller.json @@ -22,7 +22,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -50,7 +50,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -78,7 +78,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -106,7 +106,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -134,7 +134,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -162,7 +162,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -191,7 +191,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -220,7 +220,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -248,7 +248,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -276,7 +276,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -304,7 +304,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -332,7 +332,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -360,7 +360,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -388,7 +388,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -416,7 +416,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -444,7 +444,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -472,7 +472,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -500,7 +500,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -528,7 +528,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -556,7 +556,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -584,7 +584,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -612,7 +612,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -640,7 +640,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -668,7 +668,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -696,7 +696,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -724,7 +724,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -752,7 +752,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -780,7 +780,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -808,7 +808,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -836,7 +836,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -864,7 +864,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -892,7 +892,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -920,7 +920,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -948,8 +948,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -976,8 +976,36 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" + } + }, + + "sdiv_dejavu": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "1000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ asm PUSH1 0x05 PUSH1 0x09 PUSH1 0x00 SUB SDIV DUP PUSH1 0 SSTORE }", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "10000000" } }, @@ -1004,7 +1032,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1032,7 +1060,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1060,7 +1088,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1088,7 +1116,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1116,7 +1144,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1144,7 +1172,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1172,7 +1200,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1200,7 +1228,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1228,7 +1256,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1256,7 +1284,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1284,8 +1312,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1312,8 +1340,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1340,8 +1368,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1368,7 +1396,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1396,7 +1424,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1424,8 +1452,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1452,8 +1480,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1480,8 +1508,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1508,8 +1536,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1536,7 +1564,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1564,7 +1592,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1592,7 +1620,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1620,7 +1648,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1648,7 +1676,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1676,7 +1704,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1704,7 +1732,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1732,7 +1760,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1761,7 +1789,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1789,7 +1817,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1817,8 +1845,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1845,8 +1873,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1873,8 +1901,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1901,8 +1929,8 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", - "gas" : "10000" + "gasPrice" : "1", + "gas" : "1000000" } }, @@ -1929,7 +1957,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1957,7 +1985,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -1985,7 +2013,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2013,7 +2041,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2041,7 +2069,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2069,7 +2097,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2097,7 +2125,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2125,7 +2153,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2153,7 +2181,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2182,7 +2210,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2210,7 +2238,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2238,7 +2266,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2266,7 +2294,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2294,7 +2322,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2322,7 +2350,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2350,7 +2378,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2378,7 +2406,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2406,7 +2434,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2434,7 +2462,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2462,7 +2490,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2490,7 +2518,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2518,7 +2546,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2546,7 +2574,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2574,7 +2602,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2602,7 +2630,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2630,7 +2658,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2658,7 +2686,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2686,7 +2714,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2714,7 +2742,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2742,7 +2770,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2770,7 +2798,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2798,7 +2826,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2826,7 +2854,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2854,7 +2882,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2882,7 +2910,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2910,7 +2938,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2938,7 +2966,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2966,7 +2994,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -2994,7 +3022,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3022,7 +3050,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3050,7 +3078,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3078,7 +3106,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3106,7 +3134,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3134,7 +3162,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3162,7 +3190,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3190,7 +3218,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3218,7 +3246,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3246,7 +3274,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3274,7 +3302,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3302,7 +3330,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3330,7 +3358,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3358,7 +3386,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3386,7 +3414,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3414,7 +3442,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3442,7 +3470,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3470,7 +3498,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3498,7 +3526,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3526,7 +3554,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3554,7 +3582,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3582,7 +3610,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3610,7 +3638,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3638,7 +3666,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3666,7 +3694,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3694,7 +3722,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3722,7 +3750,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3750,7 +3778,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3778,7 +3806,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3806,7 +3834,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3834,7 +3862,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3862,7 +3890,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3890,7 +3918,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3918,7 +3946,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3946,7 +3974,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -3974,7 +4002,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4002,7 +4030,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4030,7 +4058,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4058,7 +4086,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4086,7 +4114,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4114,7 +4142,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4142,7 +4170,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4170,7 +4198,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4198,7 +4226,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4226,7 +4254,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4254,7 +4282,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4282,7 +4310,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4310,7 +4338,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4338,7 +4366,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4366,7 +4394,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4394,7 +4422,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4422,7 +4450,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4450,7 +4478,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4478,7 +4506,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4506,7 +4534,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4534,7 +4562,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4562,7 +4590,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4590,7 +4618,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4618,7 +4646,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4646,7 +4674,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4674,7 +4702,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4702,7 +4730,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4730,7 +4758,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4758,7 +4786,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4786,7 +4814,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4814,7 +4842,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4842,7 +4870,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4870,7 +4898,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } }, @@ -4898,7 +4926,7 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000", "data" : "", - "gasPrice" : "100000000000000", + "gasPrice" : "1", "gas" : "100000" } } diff --git a/test/vmIOandFlowOperationsTestFiller.json b/test/vmIOandFlowOperationsTestFiller.json index 995b9d6da..84a5188a6 100644 --- a/test/vmIOandFlowOperationsTestFiller.json +++ b/test/vmIOandFlowOperationsTestFiller.json @@ -283,7 +283,7 @@ "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", "currentNumber" : "0", - "currentGasLimit" : "1000000", + "currentGasLimit" : "8390000000", "currentDifficulty" : "256", "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" @@ -306,6 +306,229 @@ "gas" : "100000" } }, + "mstore8MemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x60f1630fffffff53", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000" + } + }, + + "mloadMemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x630fffffff51", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000" + } + }, + + "mstoreMemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x60f1630fffffff52", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000000" + } + }, + + "log1MemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x60ff60ff630fffffffa1", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000000" + } + }, + + "extcodecopyMemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x60ff60ff630fffffff630fffffff3c", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000000" + } + }, + + "codecopyMemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x60ff60ff630fffffff630fffffff39", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000000" + } + }, + + "calldatacopyMemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x60ff60ff630fffffff630fffffff37", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000000" + } + }, + + "sha3MemExp": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "8390000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "0x60ff630fffffff20", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1", + "gas" : "8390000000" + } + }, "mstore8WordToBigError": { "env" : { From d57e48384b90a77d1b5c41e52f22935e0a073fb1 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Mon, 9 Mar 2015 14:04:21 +0100 Subject: [PATCH 03/10] uncleBlock reward modification - 15/16 -> (8+uncle.number-block.number)/8 --- libethereum/State.cpp | 16 ++++++++-------- libethereum/State.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libethereum/State.cpp b/libethereum/State.cpp index d1e430dbe..9bfc0c08c 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -555,7 +555,7 @@ u256 State::enact(bytesConstRef _block, BlockChain const& _bc, bool _checkNonce) BOOST_THROW_EXCEPTION(TooManyUncles()); set nonces = { m_currentBlock.nonce }; - Addresses rewarded; + vector rewarded; set knownUncles = _bc.allUnclesFrom(m_currentBlock.parentHash); for (auto const& i: rlp[2]) @@ -574,7 +574,7 @@ u256 State::enact(bytesConstRef _block, BlockChain const& _bc, bool _checkNonce) nonces.insert(uncle.nonce); tdIncrease += uncle.difficulty; - rewarded.push_back(uncle.coinbaseAddress); + rewarded.push_back(uncle); } applyRewards(rewarded); @@ -696,7 +696,7 @@ void State::commitToMine(BlockChain const& _bc) m_lastTx = m_db; - Addresses uncleAddresses; + vector uncleBlockHeaders; RLPStream unclesData; unsigned unclesCount = 0; @@ -716,7 +716,7 @@ void State::commitToMine(BlockChain const& _bc) BlockInfo ubi(_bc.block(u)); ubi.streamRLP(unclesData, WithNonce); ++unclesCount; - uncleAddresses.push_back(ubi.coinbaseAddress); + uncleBlockHeaders.push_back(ubi); if (unclesCount == 2) break; } @@ -760,7 +760,7 @@ void State::commitToMine(BlockChain const& _bc) m_currentBlock.sha3Uncles = sha3(m_currentUncles); // Apply rewards last of all. - applyRewards(uncleAddresses); + applyRewards(uncleBlockHeaders); // Commit any and all changes to the trie that are in the cache, then update the state root accordingly. commit(); @@ -1148,12 +1148,12 @@ State State::fromPending(unsigned _i) const return ret; } -void State::applyRewards(Addresses const& _uncleAddresses) +void State::applyRewards(vector const& _uncleBlockHeaders) { u256 r = m_blockReward; - for (auto const& i: _uncleAddresses) + for (auto const& i: _uncleBlockHeaders) { - addBalance(i, m_blockReward * 15 / 16); + addBalance(i.coinbaseAddress, m_blockReward * (8 + i.number - m_currentBlock.number) / 8); r += m_blockReward / 32; } addBalance(m_currentBlock.coinbaseAddress, r); diff --git a/libethereum/State.h b/libethereum/State.h index 78ec85f38..1f8516fce 100644 --- a/libethereum/State.h +++ b/libethereum/State.h @@ -314,7 +314,7 @@ private: u256 enact(bytesConstRef _block, BlockChain const& _bc, bool _checkNonce = true); /// Finalise the block, applying the earned rewards. - void applyRewards(Addresses const& _uncleAddresses); + void applyRewards(std::vector const& _uncleBlockHeaders); /// @returns gas used by transactions thus far executed. u256 gasUsed() const { return m_receipts.size() ? m_receipts.back().gasUsed() : 0; } From 4f852f473ef6eb5896a5460ffc937c80680ae62f Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 9 Mar 2015 19:22:43 +0100 Subject: [PATCH 04/10] Global variable "now" (alias for block.timestamp). --- libsolidity/ExpressionCompiler.cpp | 12 +++++++++++- libsolidity/GlobalContext.cpp | 1 + test/SolidityEndToEndTest.cpp | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/libsolidity/ExpressionCompiler.cpp b/libsolidity/ExpressionCompiler.cpp index b02aecf5f..d2457e676 100644 --- a/libsolidity/ExpressionCompiler.cpp +++ b/libsolidity/ExpressionCompiler.cpp @@ -825,10 +825,20 @@ void ExpressionCompiler::endVisit(Identifier const& _identifier) Declaration const* declaration = _identifier.getReferencedDeclaration(); if (MagicVariableDeclaration const* magicVar = dynamic_cast(declaration)) { - if (magicVar->getType()->getCategory() == Type::Category::Contract) + switch (magicVar->getType()->getCategory()) + { + case Type::Category::Contract: // "this" or "super" if (!dynamic_cast(*magicVar->getType()).isSuper()) m_context << eth::Instruction::ADDRESS; + break; + case Type::Category::Integer: + // "now" + m_context << eth::Instruction::TIMESTAMP; + break; + default: + break; + } } else if (FunctionDefinition const* functionDef = dynamic_cast(declaration)) m_context << m_context.getVirtualFunctionEntryLabel(*functionDef).pushTag(); diff --git a/libsolidity/GlobalContext.cpp b/libsolidity/GlobalContext.cpp index 60de5105f..411e99abb 100644 --- a/libsolidity/GlobalContext.cpp +++ b/libsolidity/GlobalContext.cpp @@ -37,6 +37,7 @@ GlobalContext::GlobalContext(): m_magicVariables(vector>{make_shared("block", make_shared(MagicType::Kind::Block)), make_shared("msg", make_shared(MagicType::Kind::Message)), make_shared("tx", make_shared(MagicType::Kind::Transaction)), + make_shared("now", make_shared(256)), make_shared("suicide", make_shared(strings{"address"}, strings{}, FunctionType::Location::Suicide)), make_shared("sha3", diff --git a/test/SolidityEndToEndTest.cpp b/test/SolidityEndToEndTest.cpp index ae2417052..3205c038a 100644 --- a/test/SolidityEndToEndTest.cpp +++ b/test/SolidityEndToEndTest.cpp @@ -1031,6 +1031,17 @@ BOOST_AUTO_TEST_CASE(blockchain) BOOST_CHECK(callContractFunctionWithValue("someInfo()", 28) == encodeArgs(28, 0, 1)); } +BOOST_AUTO_TEST_CASE(now) +{ + char const* sourceCode = "contract test {\n" + " function someInfo() returns (bool success) {\n" + " return block.timestamp == now && now > 0;\n" + " }\n" + "}\n"; + compileAndRun(sourceCode); + BOOST_CHECK(callContractFunction("someInfo()") == encodeArgs(true)); +} + BOOST_AUTO_TEST_CASE(function_types) { char const* sourceCode = "contract test {\n" From 5871652d9078d0f3b15fb1586ad66d05ffaaeeda Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 9 Mar 2015 22:11:16 +0100 Subject: [PATCH 05/10] Fixed dockerfile. --- solc/docker_emscripten/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/solc/docker_emscripten/Dockerfile b/solc/docker_emscripten/Dockerfile index b593cbf74..06467a2c5 100644 --- a/solc/docker_emscripten/Dockerfile +++ b/solc/docker_emscripten/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get install -qy automake libtool yasm scons RUN useradd -ms /bin/bash user USER user +ENV HOME /home/user WORKDIR /home/user # Emscripten SDK From 97350c88ed1c4e607691a7ec2afe7f17d226a0de Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Thu, 5 Mar 2015 15:51:26 +0100 Subject: [PATCH 06/10] Added JumpType indicator to AssemblyItem. --- libevmcore/Assembly.cpp | 16 +++++++++++++++- libevmcore/Assembly.h | 9 ++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/libevmcore/Assembly.cpp b/libevmcore/Assembly.cpp index be35b62c2..c253ef68f 100644 --- a/libevmcore/Assembly.cpp +++ b/libevmcore/Assembly.cpp @@ -77,6 +77,20 @@ int AssemblyItem::deposit() const return 0; } +string AssemblyItem::getJumpTypeAsString() const +{ + switch (m_jumpType) + { + case JumpType::IntoFunction: + return "->"; + case JumpType::OutOfFunction: + return "<-"; + case JumpType::Ordinary: + default: + return "->"; + } +} + unsigned Assembly::bytesRequired() const { for (unsigned br = 1;; ++br) @@ -205,7 +219,7 @@ ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap con switch (i.m_type) { case Operation: - _out << " " << instructionInfo((Instruction)(byte)i.m_data).name; + _out << " " << instructionInfo((Instruction)(byte)i.m_data).name << " " << i.getJumpTypeAsString( ) << endl; break; case Push: _out << " PUSH " << i.m_data; diff --git a/libevmcore/Assembly.h b/libevmcore/Assembly.h index cd71db747..8952deffd 100644 --- a/libevmcore/Assembly.h +++ b/libevmcore/Assembly.h @@ -42,6 +42,8 @@ class AssemblyItem friend class Assembly; public: + enum class JumpType { Ordinary, IntoFunction, OutOfFunction }; + AssemblyItem(u256 _push): m_type(Push), m_data(_push) {} AssemblyItem(Instruction _i): m_type(Operation), m_data((byte)_i) {} AssemblyItem(AssemblyItemType _type, u256 _data = 0): m_type(_type), m_data(_data) {} @@ -58,13 +60,18 @@ public: int deposit() const; bool match(AssemblyItem const& _i) const { return _i.m_type == UndefinedItem || (m_type == _i.m_type && (m_type != Operation || m_data == _i.m_data)); } - void setLocation(SourceLocation const& _location) { m_location = _location;} + void setLocation(SourceLocation const& _location) { m_location = _location; } SourceLocation const& getLocation() const { return m_location; } + void setJumpType(JumpType _jumpType) { m_jumpType = _jumpType; } + JumpType getJumpType() const { return m_jumpType; } + std::string getJumpTypeAsString() const; + private: AssemblyItemType m_type; u256 m_data; SourceLocation m_location; + JumpType m_jumpType; }; using AssemblyItems = std::vector; From f7841a9b49a42f0ead5786424e4372f75b354ed3 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Mon, 9 Mar 2015 13:15:59 +0100 Subject: [PATCH 07/10] fixed new line for user input from terminal. --- solc/CommandLineInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 08acb5ebd..01d8f8485 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -272,7 +272,7 @@ bool CommandLineInterface::processInput() while (!cin.eof()) { getline(cin, s); - m_sourceCodes[""].append(s); + m_sourceCodes[""].append(s + '\n'); } } else From 4323a0c65508a3dc72bc5264fc78ca127894ccc9 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Mon, 9 Mar 2015 19:22:24 +0100 Subject: [PATCH 08/10] added information about jump type for jump instructions Conflicts: libevmcore/Assembly.cpp libsolidity/Compiler.cpp --- libevmcore/Assembly.cpp | 10 +++++----- libsolidity/Compiler.cpp | 11 ++++++++--- libsolidity/CompilerContext.cpp | 7 +++++++ libsolidity/CompilerContext.h | 2 +- libsolidity/ExpressionCompiler.cpp | 5 +++-- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/libevmcore/Assembly.cpp b/libevmcore/Assembly.cpp index c253ef68f..57e124fb8 100644 --- a/libevmcore/Assembly.cpp +++ b/libevmcore/Assembly.cpp @@ -82,12 +82,12 @@ string AssemblyItem::getJumpTypeAsString() const switch (m_jumpType) { case JumpType::IntoFunction: - return "->"; + return "in"; case JumpType::OutOfFunction: - return "<-"; + return "out"; case JumpType::Ordinary: default: - return "->"; + return ""; } } @@ -219,7 +219,7 @@ ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap con switch (i.m_type) { case Operation: - _out << " " << instructionInfo((Instruction)(byte)i.m_data).name << " " << i.getJumpTypeAsString( ) << endl; + _out << " " << instructionInfo((Instruction)(byte)i.m_data).name << "\t\t" << i.getJumpTypeAsString(); break; case Push: _out << " PUSH " << i.m_data; @@ -254,7 +254,7 @@ ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap con default: BOOST_THROW_EXCEPTION(InvalidOpcode()); } - _out << string("\t\t") << getLocationFromSources(_sourceCodes, i.getLocation()) << endl; + _out << "\t\t" << getLocationFromSources(_sourceCodes, i.getLocation()) << endl; } if (!m_data.empty() || !m_subs.empty()) diff --git a/libsolidity/Compiler.cpp b/libsolidity/Compiler.cpp index 7ff846bdb..46888683e 100644 --- a/libsolidity/Compiler.cpp +++ b/libsolidity/Compiler.cpp @@ -177,7 +177,9 @@ void Compiler::appendFunctionSelector(ContractDefinition const& _contract) { callDataUnpackerEntryPoints.insert(std::make_pair(it.first, m_context.newTag())); m_context << eth::dupInstruction(1) << u256(FixedHash<4>::Arith(it.first)) << eth::Instruction::EQ; - m_context.appendConditionalJumpTo(callDataUnpackerEntryPoints.at(it.first)); + auto assemblyItem = callDataUnpackerEntryPoints.at(it.first); + //assemblyItem.setJumpType(eth::AssemblyItem::JumpType::IntoFunction); + m_context.appendConditionalJumpTo(assemblyItem); } if (FunctionDefinition const* fallback = _contract.getFallbackFunction()) { @@ -197,7 +199,9 @@ void Compiler::appendFunctionSelector(ContractDefinition const& _contract) m_context << callDataUnpackerEntryPoints.at(it.first); eth::AssemblyItem returnTag = m_context.pushNewTag(); appendCalldataUnpacker(functionType->getParameterTypes()); - m_context.appendJumpTo(m_context.getFunctionEntryLabel(functionType->getDeclaration())); + auto assemblyItem = m_context.getFunctionEntryLabel(functionType->getDeclaration()); + //assemblyItem.setJumpType(eth::AssemblyItem::JumpType::IntoFunction); + m_context.appendJumpTo(assemblyItem); m_context << returnTag; appendReturnValuePacker(functionType->getReturnParameterTypes()); } @@ -378,8 +382,9 @@ bool Compiler::visit(FunctionDefinition const& _function) m_context.removeVariable(*localVariable); m_context.adjustStackOffset(-(int)c_returnValuesSize); + if (!_function.isConstructor()) - m_context << eth::Instruction::JUMP; + m_context.appendJump(eth::AssemblyItem::JumpType::OutOfFunction); return false; } diff --git a/libsolidity/CompilerContext.cpp b/libsolidity/CompilerContext.cpp index 1dea62e93..f2bb1de20 100644 --- a/libsolidity/CompilerContext.cpp +++ b/libsolidity/CompilerContext.cpp @@ -177,6 +177,13 @@ u256 CompilerContext::getStorageLocationOfVariable(const Declaration& _declarati return it->second; } +CompilerContext& CompilerContext::appendJump(eth::AssemblyItem::JumpType _jumpType) +{ + eth::AssemblyItem item(eth::Instruction::JUMP); + item.setJumpType(_jumpType); + return *this << item; +} + void CompilerContext::resetVisitedNodes(ASTNode const* _node) { stack newStack; diff --git a/libsolidity/CompilerContext.h b/libsolidity/CompilerContext.h index 4d63d8ba0..f468d29c4 100644 --- a/libsolidity/CompilerContext.h +++ b/libsolidity/CompilerContext.h @@ -91,7 +91,7 @@ public: /// Appends a JUMP to a new tag and @returns the tag eth::AssemblyItem appendJumpToNew() { return m_asm.appendJump().tag(); } /// Appends a JUMP to a tag already on the stack - CompilerContext& appendJump() { return *this << eth::Instruction::JUMP; } + CompilerContext& appendJump(eth::AssemblyItem::JumpType _jumpType = eth::AssemblyItem::JumpType::Ordinary); /// Appends a JUMP to a specific tag CompilerContext& appendJumpTo(eth::AssemblyItem const& _tag) { m_asm.appendJump(_tag); return *this; } /// Appends pushing of a new tag and @returns the new tag. diff --git a/libsolidity/ExpressionCompiler.cpp b/libsolidity/ExpressionCompiler.cpp index d2457e676..129261120 100644 --- a/libsolidity/ExpressionCompiler.cpp +++ b/libsolidity/ExpressionCompiler.cpp @@ -108,7 +108,8 @@ void ExpressionCompiler::appendStateVariableAccessor(VariableDeclaration const& retSizeOnStack = returnType->getSizeOnStack(); } solAssert(retSizeOnStack <= 15, "Stack too deep."); - m_context << eth::dupInstruction(retSizeOnStack + 1) << eth::Instruction::JUMP; + m_context << eth::dupInstruction(retSizeOnStack + 1); + m_context.appendJump(eth::AssemblyItem::JumpType::OutOfFunction); } void ExpressionCompiler::appendTypeConversion(Type const& _typeOnStack, Type const& _targetType, bool _cleanupNeeded) @@ -405,7 +406,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) } _functionCall.getExpression().accept(*this); - m_context.appendJump(); + m_context.appendJump(eth::AssemblyItem::JumpType::IntoFunction); m_context << returnLabel; unsigned returnParametersSize = CompilerUtils::getSizeOnStack(function.getReturnParameterTypes()); From 035451db40a9630915dd27b20be23d450c0a1cf1 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 10 Mar 2015 12:00:23 +0100 Subject: [PATCH 09/10] added brackets for printing in/out cleaned up --- libevmcore/Assembly.cpp | 10 +++++----- libevmcore/Assembly.h | 6 +++--- libsolidity/Compiler.cpp | 8 ++------ libsolidity/CompilerContext.h | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/libevmcore/Assembly.cpp b/libevmcore/Assembly.cpp index 57e124fb8..0a0611292 100644 --- a/libevmcore/Assembly.cpp +++ b/libevmcore/Assembly.cpp @@ -82,9 +82,9 @@ string AssemblyItem::getJumpTypeAsString() const switch (m_jumpType) { case JumpType::IntoFunction: - return "in"; + return "[in]"; case JumpType::OutOfFunction: - return "out"; + return "[out]"; case JumpType::Ordinary: default: return ""; @@ -210,7 +210,7 @@ string Assembly::getLocationFromSources(StringMap const& _sourceCodes, SourceLoc return move(cut); } -ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap const& _sourceCodes) const +ostream& Assembly::stream(ostream& _out, string const& _prefix, StringMap const& _sourceCodes) const { _out << _prefix << ".code:" << endl; for (AssemblyItem const& i: m_items) @@ -219,7 +219,7 @@ ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap con switch (i.m_type) { case Operation: - _out << " " << instructionInfo((Instruction)(byte)i.m_data).name << "\t\t" << i.getJumpTypeAsString(); + _out << " " << instructionInfo((Instruction)(byte)i.m_data).name << "\t" << i.getJumpTypeAsString(); break; case Push: _out << " PUSH " << i.m_data; @@ -266,7 +266,7 @@ ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap con for (size_t i = 0; i < m_subs.size(); ++i) { _out << _prefix << " " << hex << i << ": " << endl; - m_subs[i].streamRLP(_out, _prefix + " ", _sourceCodes); + m_subs[i].stream(_out, _prefix + " ", _sourceCodes); } } return _out; diff --git a/libevmcore/Assembly.h b/libevmcore/Assembly.h index 8952deffd..1cbb12e12 100644 --- a/libevmcore/Assembly.h +++ b/libevmcore/Assembly.h @@ -121,7 +121,7 @@ public: void popTo(int _deposit) { while (m_deposit > _deposit) append(Instruction::POP); } void injectStart(AssemblyItem const& _i); - std::string out() const { std::stringstream ret; streamRLP(ret); return ret.str(); } + std::string out() const { std::stringstream ret; stream(ret); return ret.str(); } int deposit() const { return m_deposit; } void adjustDeposit(int _adjustment) { m_deposit += _adjustment; if (asserts(m_deposit >= 0)) BOOST_THROW_EXCEPTION(InvalidDeposit()); } void setDeposit(int _deposit) { m_deposit = _deposit; if (asserts(m_deposit >= 0)) BOOST_THROW_EXCEPTION(InvalidDeposit()); } @@ -131,7 +131,7 @@ public: bytes assemble() const; Assembly& optimise(bool _enable); - std::ostream& streamRLP(std::ostream& _out, std::string const& _prefix = "", const StringMap &_sourceCodes = StringMap()) const; + std::ostream& stream(std::ostream& _out, std::string const& _prefix = "", const StringMap &_sourceCodes = StringMap()) const; protected: std::string getLocationFromSources(StringMap const& _sourceCodes, SourceLocation const& _location) const; @@ -153,7 +153,7 @@ protected: inline std::ostream& operator<<(std::ostream& _out, Assembly const& _a) { - _a.streamRLP(_out); + _a.stream(_out); return _out; } diff --git a/libsolidity/Compiler.cpp b/libsolidity/Compiler.cpp index 46888683e..dc6e2c5a8 100644 --- a/libsolidity/Compiler.cpp +++ b/libsolidity/Compiler.cpp @@ -177,9 +177,7 @@ void Compiler::appendFunctionSelector(ContractDefinition const& _contract) { callDataUnpackerEntryPoints.insert(std::make_pair(it.first, m_context.newTag())); m_context << eth::dupInstruction(1) << u256(FixedHash<4>::Arith(it.first)) << eth::Instruction::EQ; - auto assemblyItem = callDataUnpackerEntryPoints.at(it.first); - //assemblyItem.setJumpType(eth::AssemblyItem::JumpType::IntoFunction); - m_context.appendConditionalJumpTo(assemblyItem); + m_context.appendConditionalJumpTo(callDataUnpackerEntryPoints.at(it.first)); } if (FunctionDefinition const* fallback = _contract.getFallbackFunction()) { @@ -199,9 +197,7 @@ void Compiler::appendFunctionSelector(ContractDefinition const& _contract) m_context << callDataUnpackerEntryPoints.at(it.first); eth::AssemblyItem returnTag = m_context.pushNewTag(); appendCalldataUnpacker(functionType->getParameterTypes()); - auto assemblyItem = m_context.getFunctionEntryLabel(functionType->getDeclaration()); - //assemblyItem.setJumpType(eth::AssemblyItem::JumpType::IntoFunction); - m_context.appendJumpTo(assemblyItem); + m_context.appendJumpTo(m_context.getFunctionEntryLabel(functionType->getDeclaration())); m_context << returnTag; appendReturnValuePacker(functionType->getReturnParameterTypes()); } diff --git a/libsolidity/CompilerContext.h b/libsolidity/CompilerContext.h index f468d29c4..76923a77a 100644 --- a/libsolidity/CompilerContext.h +++ b/libsolidity/CompilerContext.h @@ -120,7 +120,7 @@ public: eth::Assembly const& getAssembly() const { return m_asm; } /// @arg _sourceCodes is the map of input files to source code strings - void streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const { m_asm.streamRLP(_stream, "", _sourceCodes); } + void streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const { m_asm.stream(_stream, "", _sourceCodes); } bytes getAssembledBytecode(bool _optimize = false) { return m_asm.optimise(_optimize).assemble(); } From fac9e35dfbc3015b3f4a7664a97861f1dc40edf6 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Tue, 10 Mar 2015 12:37:30 +0100 Subject: [PATCH 10/10] Remove StructuredLogger dependency on libp2p --- libdevcore/StructuredLogger.cpp | 3 ++- libdevcore/StructuredLogger.h | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libdevcore/StructuredLogger.cpp b/libdevcore/StructuredLogger.cpp index d93a9496e..ff267ff4e 100644 --- a/libdevcore/StructuredLogger.cpp +++ b/libdevcore/StructuredLogger.cpp @@ -22,11 +22,12 @@ */ #include "StructuredLogger.h" - #include +#include #include #include "Guards.h" +namespace ba = boost::asio; using namespace std; namespace dev diff --git a/libdevcore/StructuredLogger.h b/libdevcore/StructuredLogger.h index 58b408ede..eea19d107 100644 --- a/libdevcore/StructuredLogger.h +++ b/libdevcore/StructuredLogger.h @@ -27,9 +27,10 @@ #include #include -#include namespace Json { class Value; } +namespace boost { namespace asio { namespace ip { templateclass basic_endpoint; class tcp; }}} +namespace bi = boost::asio::ip; namespace dev { @@ -61,12 +62,16 @@ public: static void stopping(std::string const& _clientImpl, const char* _ethVersion); static void p2pConnected( std::string const& _id, - bi::tcp::endpoint const& _addr, + bi::basic_endpoint const& _addr, std::chrono::system_clock::time_point const& _ts, std::string const& _remoteVersion, unsigned int _numConnections ); - static void p2pDisconnected(std::string const& _id, bi::tcp::endpoint const& _addr, unsigned int _numConnections); + static void p2pDisconnected( + std::string const& _id, + bi::basic_endpoint const& _addr, + unsigned int _numConnections + ); static void minedNewBlock( std::string const& _hash, std::string const& _blockNumber,