Skip to content

Commit

Permalink
integration tests: update vmTraceEx null in trace_* responses (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
lupin012 authored Aug 13, 2024
1 parent 56fc17b commit 7f85042
Show file tree
Hide file tree
Showing 11 changed files with 347 additions and 91 deletions.
3 changes: 2 additions & 1 deletion integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Usage: ./run_tests.py:
Launch an automated test sequence on Silkworm RpcDaemon (aka Silkrpc) or Erigon RpcDaemon
-h,--help: print this help
-j,--json-diff: use json-diff to make compare (default use diff)
-f,--display-only-fail: shows only failed tests (not Skipped)
-v,--verbose: <verbose_level>
-c,--continue: runs all tests even if one test fails [default: exit at first test fail]
Expand All @@ -52,7 +53,7 @@ Launch an automated test sequence on Silkworm RpcDaemon (aka Silkrpc) or Erigon
-d,--compare-erigon-rpcdaemon: send requests also to the reference daemon e.g.: Erigon RpcDaemon
-T,--transport_type: <http,http_comp,websocket,websocket_comp>
-k,--jwt: authentication token file
-a,--api-list: <apis>: run all tests of the specified API that contains string (e.g.: eth_,debug_)
-a,--api-list-with: <apis>: run all tests of the specified API that contains string (e.g.: eth_,debug_)
-A,--api-list: <apis>: run all tests of the specified API that match full name (e.g.: eth_call,eth_getLogs)
-x,--exclude-api-list: exclude API list (e.g.: txpool_content,txpool_status,engine_)
-X,--exclude-test-list: exclude test list (e.g.: 18,22)
Expand Down
Binary file modified integration/mainnet/trace_replayBlockTransactions/test_01.tar
Binary file not shown.
Binary file modified integration/mainnet/trace_replayBlockTransactions/test_03.tar
Binary file not shown.
Binary file modified integration/mainnet/trace_replayBlockTransactions/test_18.tar
Binary file not shown.
Binary file modified integration/mainnet/trace_replayBlockTransactions/test_20.tar
Binary file not shown.
123 changes: 59 additions & 64 deletions integration/mainnet/trace_replayTransaction/test_24.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,74 +16,69 @@
"response": {
"id": 1,
"jsonrpc": "2.0",
"result": {
"output": "0x",
"stateDiff": {
"0x40ba0dd32ef02315514a7859c49626750219acf4": {
"balance": {
"*": {
"from": "0x1b9de6773312e400",
"to": "0x1b9c5560e2ba5400"
}
},
"code": "=",
"nonce": {
"*": {
"from": "0x27",
"to": "0x28"
}
},
"storage": {}
},
"0xea674fdde714fd979de3edf0f56aa9716b898ec8": {
"balance": {
"*": {
"from": "0x1a3d0a7c5adacf42e2",
"to": "0x1a3d0c0d712b27d2e2"
}
},
"code": "=",
"nonce": "=",
"storage": {}
"result": {
"output": "0x",
"stateDiff": {
"0x40ba0dd32ef02315514a7859c49626750219acf4": {
"balance": {
"*": {
"from": "0x1b9de6773312e400",
"to": "0x1b9c5560e2ba5400"
}
},
"trace": [
{
"action": {
"callType": "call",
"from": "0x40ba0dd32ef02315514a7859c49626750219acf4",
"gas": "0x0",
"input": "0x",
"to": "0x9919d27045e0170a3baf247a2ad4342692126e6e",
"value": "0x16345785d8a0000"
},
"error": "out of gas",
"result": null,
"subtraces": 0,
"traceAddress": [],
"type": "call"
"code": "=",
"nonce": {
"*": {
"from": "0x27",
"to": "0x28"
}
],
"transactionHash": "0xff8fdcd975d1c4f7ded80777727480c7f499e72a9ac9c51aca2dc66e0f77dad4",
"vmTrace": {
"code": "0x606060405236156100495763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636ea056a98114610052578063c0ee0b8a14610092575b6100505b5b565b005b341561005a57fe5b61007e73ffffffffffffffffffffffffffffffffffffffff60043516602435610104565b604080519115158252519081900360200190f35b341561009a57fe5b604080516020600460443581810135601f810184900484028501840190955284845261005094823573ffffffffffffffffffffffffffffffffffffffff169460248035956064949293919092019181908401838280828437509496506101ef95505050505050565b005b6000805460408051602090810184905281517f3c18d31800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015292519290931692633c18d318926024808301939282900301818787803b151561017b57fe5b6102c65a03f1151561018957fe5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff1660003660006040516020015260405180838380828437820191505092505050602060405180830381856102c65a03f415156101e057fe5b50506040515190505b92915050565b5b5050505600a165627a7a723058204cdd69fdcf3cf6cbee9677fe380fa5f044048aa9e060ec5619a21ca5a5bd4cd10029",
"ops": [
{
"cost": 0,
"ex": {
"mem": null,
"push": [],
"store": null,
"used": 0
},
"idx": "2-0",
"op": "PUSH1",
"pc": 0,
"sub": null
}
]
}
},
"storage": {}
},
"0xea674fdde714fd979de3edf0f56aa9716b898ec8": {
"balance": {
"*": {
"from": "0x1a3d0a7c5adacf42e2",
"to": "0x1a3d0c0d712b27d2e2"
}
},
"code": "=",
"nonce": "=",
"storage": {}
}
},
"trace": [
{
"action": {
"callType": "call",
"from": "0x40ba0dd32ef02315514a7859c49626750219acf4",
"gas": "0x0",
"input": "0x",
"to": "0x9919d27045e0170a3baf247a2ad4342692126e6e",
"value": "0x16345785d8a0000"
},
"error": "out of gas",
"result": null,
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"transactionHash": "0xff8fdcd975d1c4f7ded80777727480c7f499e72a9ac9c51aca2dc66e0f77dad4",
"vmTrace": {
"code": "0x606060405236156100495763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636ea056a98114610052578063c0ee0b8a14610092575b6100505b5b565b005b341561005a57fe5b61007e73ffffffffffffffffffffffffffffffffffffffff60043516602435610104565b604080519115158252519081900360200190f35b341561009a57fe5b604080516020600460443581810135601f810184900484028501840190955284845261005094823573ffffffffffffffffffffffffffffffffffffffff169460248035956064949293919092019181908401838280828437509496506101ef95505050505050565b005b6000805460408051602090810184905281517f3c18d31800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015292519290931692633c18d318926024808301939282900301818787803b151561017b57fe5b6102c65a03f1151561018957fe5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff1660003660006040516020015260405180838380828437820191505092505050602060405180830381856102c65a03f415156101e057fe5b50506040515190505b92915050565b5b5050505600a165627a7a723058204cdd69fdcf3cf6cbee9677fe380fa5f044048aa9e060ec5619a21ca5a5bd4cd10029",
"ops": [
{
"cost": 0,
"ex": null,
"idx": "2-0",
"op": "PUSH1",
"pc": 0,
"sub": null
}
]
}
}
}
}
]
88 changes: 88 additions & 0 deletions integration/mainnet/trace_replayTransaction/test_27.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[
{
"request": {
"id": 1,
"jsonrpc": "2.0",
"method": "trace_replayTransaction",
"params": [
"0xc2d018922e1d372a8e5cc6c9e11d66ad06dc97e2618061cd33d6ef100d1eca9f",
[
"vmTrace",
"trace",
"stateDiff"
]
]
},
"response": {
"id": 1,
"jsonrpc": "2.0",
"result": {
"output": "0x",
"stateDiff": {
"0x829bd824b016326a401d083b33d092293333a830": {
"balance": {
"*": {
"from": "0xf06fe514e89b4d50a6",
"to": "0xf06fe8cfe0c850f0a6"
}
},
"code": "=",
"nonce": "=",
"storage": {}
},
"0xea193cb28cf6150b4cbaf0cfe7b39241e28091a7": {
"balance": {
"*": {
"from": "0xcc34c51bbfa4a5",
"to": "0x19e020ec6a20a5"
}
},
"code": "=",
"nonce": {
"*": {
"from": "0x53",
"to": "0x54"
}
},
"storage": {}
},
"0xf5bec430576ff1b82e44ddb5a1c93f6f9d0884f3": {
"balance": {
"*": {
"from": "0xa377815b00eebd68c26",
"to": "0xa3778c449baee287026"
}
},
"code": "=",
"nonce": "=",
"storage": {}
}
},
"trace": [
{
"action": {
"callType": "call",
"from": "0xea193cb28cf6150b4cbaf0cfe7b39241e28091a7",
"gas": "0x23902",
"input": "0x",
"to": "0xf5bec430576ff1b82e44ddb5a1c93f6f9d0884f3",
"value": "0xae99ac0251e400"
},
"result": {
"gasUsed": "0x0",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"transactionHash": "0xc2d018922e1d372a8e5cc6c9e11d66ad06dc97e2618061cd33d6ef100d1eca9f",
"vmTrace": {
"code": "0x",
"ops": []
}
}
}
}
]
88 changes: 88 additions & 0 deletions integration/mainnet/trace_replayTransaction/test_28.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[
{
"request": {
"id": 1,
"jsonrpc": "2.0",
"method": "trace_replayTransaction",
"params": [
"0x2db60e02bf8339a0c8f66a67ccb74fed1562938e8732e9ea7231ced1a2ed3cd6",
[
"vmTrace",
"trace",
"stateDiff"
]
]
},
"response": {
"id": 1,
"jsonrpc": "2.0",
"result": {
"output": "0x",
"stateDiff": {
"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5": {
"balance": {
"*": {
"from": "0xf9b1ec00eff1a10141",
"to": "0xf9b137fa860c0a0921"
}
},
"code": "=",
"nonce": {
"*": {
"from": "0xd6d7c2",
"to": "0xd6d7c3"
}
},
"storage": {}
},
"0x829bd824b016326a401d083b33d092293333a830": {
"balance": {
"*": {
"from": "0xf07067afd309a302e6",
"to": "0xf07068ce50b0bdb2e6"
}
},
"code": "=",
"nonce": "=",
"storage": {}
},
"0xd8ddbdbe791cfc804c1e729c1a6841e7bae7e5eb": {
"balance": {
"*": {
"from": "0xd4774808ea44180",
"to": "0xdfa5c6ccd2089a0"
}
},
"code": "=",
"nonce": "=",
"storage": {}
}
},
"trace": [
{
"action": {
"callType": "call",
"from": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",
"gas": "0x7148",
"input": "0x",
"to": "0xd8ddbdbe791cfc804c1e729c1a6841e7bae7e5eb",
"value": "0xb2e7ec3e7c4820"
},
"result": {
"gasUsed": "0x0",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"transactionHash": "0x2db60e02bf8339a0c8f66a67ccb74fed1562938e8732e9ea7231ced1a2ed3cd6",
"vmTrace": {
"code": "0x",
"ops": []
}
}
}
}
]
Binary file not shown.
Loading

0 comments on commit 7f85042

Please sign in to comment.