Skip to content

Commit

Permalink
integration: fix gas cost in many debug API (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixtysixter authored Sep 9, 2024
1 parent 9ce4c3a commit caad39d
Show file tree
Hide file tree
Showing 25 changed files with 4,081 additions and 19,322 deletions.
Binary file modified integration/mainnet/debug_traceBlockByNumber/test_09.tar
Binary file not shown.
Binary file modified integration/mainnet/debug_traceBlockByNumber/test_10.tar
Binary file not shown.
Binary file modified integration/mainnet/debug_traceBlockByNumber/test_11.tar
Binary file not shown.
Binary file modified integration/mainnet/debug_traceCall/test_10.tar
Binary file not shown.
Binary file modified integration/mainnet/debug_traceCallMany/test_10.tar
Binary file not shown.
19,312 changes: 0 additions & 19,312 deletions integration/mainnet/debug_traceTransaction/test_16.json

This file was deleted.

Binary file not shown.
Binary file modified integration/mainnet/debug_traceTransaction/test_17.tar
Binary file not shown.
Binary file modified integration/mainnet/debug_traceTransaction/test_18.tar
Binary file not shown.
2 changes: 1 addition & 1 deletion integration/mainnet/debug_traceTransaction/test_21.json
Original file line number Diff line number Diff line change
Expand Up @@ -3674,7 +3674,7 @@
"depth": 1,
"error": {},
"gas": 10094,
"gasCost": 0,
"gasCost": 20000,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000003",
"0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Binary file modified integration/mainnet/debug_traceTransaction/test_28.tar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
298 changes: 298 additions & 0 deletions integration/mainnet/debug_traceTransaction/test_33.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
[
{
"request": {
"id": 1,
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0x6c929e1c3d860ee225d7f3a7addf9e3f740603d243260536dfa2f3cf02b51de4",
{
"disableMemory": false,
"disableStack": false,
"disableStorage": false
}
]
},
"response": {
"id": 1,
"jsonrpc": "2.0",
"result": {
"failed": true,
"gas": 24000,
"returnValue": "",
"structLogs": [
{
"depth": 1,
"gas": 532,
"gasCost": 3,
"memory": [],
"op": "PUSH1",
"pc": 0,
"stack": []
},
{
"depth": 1,
"gas": 529,
"gasCost": 3,
"memory": [],
"op": "PUSH1",
"pc": 2,
"stack": [
"0x60"
]
},
{
"depth": 1,
"gas": 526,
"gasCost": 12,
"memory": [],
"op": "MSTORE",
"pc": 4,
"stack": [
"0x60",
"0x40"
]
},
{
"depth": 1,
"gas": 514,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "PUSH1",
"pc": 5,
"stack": []
},
{
"depth": 1,
"gas": 511,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "DUP1",
"pc": 7,
"stack": [
"0x0"
]
},
{
"depth": 1,
"gas": 508,
"gasCost": 50,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "SLOAD",
"pc": 8,
"stack": [
"0x0",
"0x0"
],
"storage": {
"0000000000000000000000000000000000000000000000000000000000000000": "0000000000000000000000000000000000000000000000000000000000000000"
}
},
{
"depth": 1,
"gas": 458,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "PUSH1",
"pc": 9,
"stack": [
"0x0",
"0x0"
]
},
{
"depth": 1,
"gas": 455,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "PUSH1",
"pc": 11,
"stack": [
"0x0",
"0x0",
"0x1"
]
},
{
"depth": 1,
"gas": 452,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "PUSH1",
"pc": 13,
"stack": [
"0x0",
"0x0",
"0x1",
"0xa0"
]
},
{
"depth": 1,
"gas": 449,
"gasCost": 20,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "EXP",
"pc": 15,
"stack": [
"0x0",
"0x0",
"0x1",
"0xa0",
"0x2"
]
},
{
"depth": 1,
"gas": 429,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "SUB",
"pc": 16,
"stack": [
"0x0",
"0x0",
"0x1",
"0x10000000000000000000000000000000000000000"
]
},
{
"depth": 1,
"gas": 426,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "NOT",
"pc": 17,
"stack": [
"0x0",
"0x0",
"0xffffffffffffffffffffffffffffffffffffffff"
]
},
{
"depth": 1,
"gas": 423,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "AND",
"pc": 18,
"stack": [
"0x0",
"0x0",
"0xffffffffffffffffffffffff0000000000000000000000000000000000000000"
]
},
{
"depth": 1,
"gas": 420,
"gasCost": 2,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "CALLER",
"pc": 19,
"stack": [
"0x0",
"0x0"
]
},
{
"depth": 1,
"gas": 418,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "OR",
"pc": 20,
"stack": [
"0x0",
"0x0",
"0xa1e4380a3b1f749673e270229993ee55f35663b4"
]
},
{
"depth": 1,
"gas": 415,
"gasCost": 3,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "SWAP1",
"pc": 21,
"stack": [
"0x0",
"0xa1e4380a3b1f749673e270229993ee55f35663b4"
]
},
{
"depth": 1,
"error": {},
"gas": 412,
"gasCost": 20000,
"memory": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000060"
],
"op": "SSTORE",
"pc": 22,
"stack": [
"0xa1e4380a3b1f749673e270229993ee55f35663b4",
"0x0"
],
"storage": {
"0000000000000000000000000000000000000000000000000000000000000000": "000000000000000000000000a1e4380a3b1f749673e270229993ee55f35663b4"
}
}
]
}
}
}
]
Loading

0 comments on commit caad39d

Please sign in to comment.