Skip to content

Commit 7b769a2

Browse files
authored
integration: fix trace_replay* tests (#250)
1 parent 3bfa899 commit 7b769a2

31 files changed

+3162
-3186
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

integration/mainnet/trace_replayBlockTransactions/test_27.json

+1,551-1,551
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.

integration/mainnet/trace_replayBlockTransactions/test_30.json

+1,551-1,551
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

integration/mainnet/trace_replayTransaction/test_24.json

+59-59
Original file line numberDiff line numberDiff line change
@@ -16,69 +16,69 @@
1616
"response": {
1717
"id": 1,
1818
"jsonrpc": "2.0",
19-
"result": {
20-
"output": "0x",
21-
"stateDiff": {
22-
"0x40ba0dd32ef02315514a7859c49626750219acf4": {
23-
"balance": {
24-
"*": {
25-
"from": "0x1b9de6773312e400",
26-
"to": "0x1b9c5560e2ba5400"
19+
"result": {
20+
"output": "0x",
21+
"stateDiff": {
22+
"0x40ba0dd32ef02315514a7859c49626750219acf4": {
23+
"balance": {
24+
"*": {
25+
"from": "0x1b9de6773312e400",
26+
"to": "0x1b9c5560e2ba5400"
27+
}
28+
},
29+
"code": "=",
30+
"nonce": {
31+
"*": {
32+
"from": "0x27",
33+
"to": "0x28"
34+
}
35+
},
36+
"storage": {}
37+
},
38+
"0xea674fdde714fd979de3edf0f56aa9716b898ec8": {
39+
"balance": {
40+
"*": {
41+
"from": "0x1a3d0a7c5adacf42e2",
42+
"to": "0x1a3d0c0d712b27d2e2"
43+
}
44+
},
45+
"code": "=",
46+
"nonce": "=",
47+
"storage": {}
2748
}
2849
},
29-
"code": "=",
30-
"nonce": {
31-
"*": {
32-
"from": "0x27",
33-
"to": "0x28"
50+
"trace": [
51+
{
52+
"action": {
53+
"callType": "call",
54+
"from": "0x40ba0dd32ef02315514a7859c49626750219acf4",
55+
"gas": "0x0",
56+
"input": "0x",
57+
"to": "0x9919d27045e0170a3baf247a2ad4342692126e6e",
58+
"value": "0x16345785d8a0000"
59+
},
60+
"error": "out of gas",
61+
"result": null,
62+
"subtraces": 0,
63+
"traceAddress": [],
64+
"type": "call"
3465
}
35-
},
36-
"storage": {}
37-
},
38-
"0xea674fdde714fd979de3edf0f56aa9716b898ec8": {
39-
"balance": {
40-
"*": {
41-
"from": "0x1a3d0a7c5adacf42e2",
42-
"to": "0x1a3d0c0d712b27d2e2"
43-
}
44-
},
45-
"code": "=",
46-
"nonce": "=",
47-
"storage": {}
48-
}
49-
},
50-
"trace": [
51-
{
52-
"action": {
53-
"callType": "call",
54-
"from": "0x40ba0dd32ef02315514a7859c49626750219acf4",
55-
"gas": "0x0",
56-
"input": "0x",
57-
"to": "0x9919d27045e0170a3baf247a2ad4342692126e6e",
58-
"value": "0x16345785d8a0000"
59-
},
60-
"error": "out of gas",
61-
"result": null,
62-
"subtraces": 0,
63-
"traceAddress": [],
64-
"type": "call"
65-
}
66-
],
67-
"transactionHash": "0xff8fdcd975d1c4f7ded80777727480c7f499e72a9ac9c51aca2dc66e0f77dad4",
68-
"vmTrace": {
69-
"code": "0x606060405236156100495763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636ea056a98114610052578063c0ee0b8a14610092575b6100505b5b565b005b341561005a57fe5b61007e73ffffffffffffffffffffffffffffffffffffffff60043516602435610104565b604080519115158252519081900360200190f35b341561009a57fe5b604080516020600460443581810135601f810184900484028501840190955284845261005094823573ffffffffffffffffffffffffffffffffffffffff169460248035956064949293919092019181908401838280828437509496506101ef95505050505050565b005b6000805460408051602090810184905281517f3c18d31800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015292519290931692633c18d318926024808301939282900301818787803b151561017b57fe5b6102c65a03f1151561018957fe5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff1660003660006040516020015260405180838380828437820191505092505050602060405180830381856102c65a03f415156101e057fe5b50506040515190505b92915050565b5b5050505600a165627a7a723058204cdd69fdcf3cf6cbee9677fe380fa5f044048aa9e060ec5619a21ca5a5bd4cd10029",
70-
"ops": [
71-
{
72-
"cost": 0,
73-
"ex": null,
74-
"idx": "2-0",
75-
"op": "PUSH1",
76-
"pc": 0,
77-
"sub": null
66+
],
67+
"transactionHash": "0xff8fdcd975d1c4f7ded80777727480c7f499e72a9ac9c51aca2dc66e0f77dad4",
68+
"vmTrace": {
69+
"code": "0x606060405236156100495763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636ea056a98114610052578063c0ee0b8a14610092575b6100505b5b565b005b341561005a57fe5b61007e73ffffffffffffffffffffffffffffffffffffffff60043516602435610104565b604080519115158252519081900360200190f35b341561009a57fe5b604080516020600460443581810135601f810184900484028501840190955284845261005094823573ffffffffffffffffffffffffffffffffffffffff169460248035956064949293919092019181908401838280828437509496506101ef95505050505050565b005b6000805460408051602090810184905281517f3c18d31800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015292519290931692633c18d318926024808301939282900301818787803b151561017b57fe5b6102c65a03f1151561018957fe5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff1660003660006040516020015260405180838380828437820191505092505050602060405180830381856102c65a03f415156101e057fe5b50506040515190505b92915050565b5b5050505600a165627a7a723058204cdd69fdcf3cf6cbee9677fe380fa5f044048aa9e060ec5619a21ca5a5bd4cd10029",
70+
"ops": [
71+
{
72+
"cost": 3,
73+
"ex": null,
74+
"idx": "2-0",
75+
"op": "PUSH1",
76+
"pc": 0,
77+
"sub": null
78+
}
79+
]
7880
}
79-
]
80-
}
81-
}
81+
}
8282
}
8383
}
8484
]

integration/run_tests.py

+1-25
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,7 @@
4444
"mainnet/trace_rawTransaction/test_02.json", # as executed on latest block
4545
"mainnet/trace_rawTransaction/test_03.json", # as executed on latest block
4646

47-
"mainnet/trace_replayTransaction/test_24.json", # diff on gasCost on last opcode (OUTOFGAS)
48-
49-
"mainnet/trace_replayBlockTransactions/test_01.tar", # diff on gasCost + diff last opcode (OUTOFGAS)
50-
"mainnet/trace_replayBlockTransactions/test_03.tar", # diff on 8 gasCost + 2 diff last opcode (OUTOFGAS)
51-
"mainnet/trace_replayBlockTransactions/test_04.tar", # diff on 1 gasCost
52-
"mainnet/trace_replayBlockTransactions/test_05.tar", # diff on 6 gasCost
53-
"mainnet/trace_replayBlockTransactions/test_08.tar", # diff on 1 gasCost
54-
"mainnet/trace_replayBlockTransactions/test_13.tar", # diff on CALLCODE gasCost
55-
"mainnet/trace_replayBlockTransactions/test_14.tar", # diff on 15 gasCost
56-
"mainnet/trace_replayBlockTransactions/test_15.tar", # diff on 3 gasCost
57-
"mainnet/trace_replayBlockTransactions/test_16.tar", # diff on 25 gasCost
58-
"mainnet/trace_replayBlockTransactions/test_17.tar", # diff on 21 gasCost
59-
"mainnet/trace_replayBlockTransactions/test_18.tar", # diff on 5 gasCost + diff last opcode (OUTOFGAS)
60-
"mainnet/trace_replayBlockTransactions/test_19.tar", # diff on 11 gasCost
61-
"mainnet/trace_replayBlockTransactions/test_20.tar", # diff on 18 gasCost
62-
"mainnet/trace_replayBlockTransactions/test_21.tar", # diff on 1 gasCost
63-
"mainnet/trace_replayBlockTransactions/test_22.tar", # diff on 26 gasCost
64-
"mainnet/trace_replayBlockTransactions/test_23.tar", # diff on 14 gasCost
65-
"mainnet/trace_replayBlockTransactions/test_24.tar", # diff on 9 gasCost
66-
"mainnet/trace_replayBlockTransactions/test_28.tar", # diff on 10 gasCost
67-
"mainnet/trace_replayBlockTransactions/test_29.tar", # diff on 4 gasCost 2 CALL stack info
68-
"mainnet/trace_replayBlockTransactions/test_31.tar", # diff on 12 gasCost
69-
"mainnet/trace_replayBlockTransactions/test_32.tar", # diff on 8 gasCost
70-
"mainnet/trace_replayBlockTransactions/test_33.tar", # diff on 3 gasCost
71-
"mainnet/trace_replayBlockTransactions/test_34.tar", # diff on 3 gasCost
47+
"mainnet/trace_replayBlockTransactions/test_29.tar", # diff on stack info
7248

7349
"mainnet/engine_getPayloadV1/test_01.json", # exception when invoke execution interface
7450
"mainnet/engine_getPayloadV2/test_01.json", # exception when invoke execution interface

0 commit comments

Comments
 (0)