Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tx.receipt.gasUsed of last 2 transaction at each block NOT match gasUsed of tx.calltrace root CALL #1835

Closed
muyinliu opened this issue Aug 22, 2023 · 2 comments
Assignees

Comments

@muyinliu
Copy link

System information

Geth version: geth v1.2.10
OS & Version: Linux
Commit hash : (if develop)

Expected behaviour

tx.receipt.gasUsed of last 2 transaction at each block equal to gasUsed of tx.calltrace root CALL

Actual behaviour

tx.receipt.gasUsed of last 2 transaction at each block NOT match gasUsed of tx.calltrace root CALL

Steps to reproduce the behaviour

0x6ac7(27335) vs 0xbe7f(48767, expected), commands:

curl "http://127.0.0.1:8545" \
     -s \
     -X POST \
     -H "Content-Type: application/json" \
     --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xd6fa636bb108920d9b8853775bf3963fcec5bede1b5b36057b1092dbb82128a4"],"id":1}' | jq

=>

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "contractAddress": null,
    "gasUsed": "0x6ac7",
    "transactionHash": "0xd6fa636bb108920d9b8853775bf3963fcec5bede1b5b36057b1092dbb82128a4",
    "to": "0x0000000000000000000000000000000000001000",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002010000000000000000000000000000000000020000200000000000000000000080000020000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000002000000000000000000000000010000000000000000000000000000000000000000000000",
    "from": "0xee226379db83cffc681495730c11fdde79ba4c0c",
    "transactionIndex": "0xae",
    "effectiveGasPrice": "0x0",
    "cumulativeGasUsed": "0x1598094",
    "status": "0x1",
    "blockHash": "0x2bcc0956c1a088c98ce57a68849b70e1fb5011ca3163055a81dfc889669aa97f",
    "blockNumber": "0x1d4f562",
    "type": "0x0",
    "logs": [
      {
        "address": "0x0000000000000000000000000000000000001000",
        "topics": [
          "0x627059660ea01c4733a328effb2294d2f86905bf806da763a89cee254de8bee5"
        ],
        "transactionIndex": "0xae",
        "logIndex": "0x20c",
        "transactionHash": "0xd6fa636bb108920d9b8853775bf3963fcec5bede1b5b36057b1092dbb82128a4",
        "blockHash": "0x2bcc0956c1a088c98ce57a68849b70e1fb5011ca3163055a81dfc889669aa97f",
        "blockNumber": "0x1d4f562",
        "data": "0x0000000000000000000000000000000000000000000000000013510bb6412ee0",
        "removed": false
      },
      {
        "address": "0x0000000000000000000000000000000000001000",
        "topics": [
          "0x93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055",
          "0x000000000000000000000000ee226379db83cffc681495730c11fdde79ba4c0c"
        ],
        "transactionHash": "0xd6fa636bb108920d9b8853775bf3963fcec5bede1b5b36057b1092dbb82128a4",
        "blockHash": "0x2bcc0956c1a088c98ce57a68849b70e1fb5011ca3163055a81dfc889669aa97f",
        "data": "0x00000000000000000000000000000000000000000000000000add969684aa5e7",
        "logIndex": "0x20d",
        "removed": false,
        "transactionIndex": "0xae",
        "blockNumber": "0x1d4f562"
      }
    ]
  }
}
curl "http://127.0.0.1:8545" \
     -s \
     -X POST \
     -H "Content-Type: application/json" \
     --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xd6fa636bb108920d9b8853775bf3963fcec5bede1b5b36057b1092dbb82128a4", {"tracer": "callTracer", "tracerConfig": {"withLog": true}}],"id":1}'

=>

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "from": "0xee226379db83cffc681495730c11fdde79ba4c0c",
    "gas": "0x7fffffffffffac47",
    "gasUsed": "0xbe7f",
    "to": "0x0000000000000000000000000000000000001000",
    "input": "0xf340fa01000000000000000000000000ee226379db83cffc681495730c11fdde79ba4c0c",
    "calls": [
      {
        "from": "0x0000000000000000000000000000000000001000",
        "gas": "0x8fc",
        "gasUsed": "0x0",
        "to": "0x000000000000000000000000000000000000dead",
        "input": "0x",
        "value": "0x13510bb6412ee0",
        "type": "CALL"
      }
    ],
    "logs": [
      {
        "address": "0x0000000000000000000000000000000000001000",
        "topics": [
          "0x627059660ea01c4733a328effb2294d2f86905bf806da763a89cee254de8bee5"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000013510bb6412ee0"
      },
      {
        "address": "0x0000000000000000000000000000000000001000",
        "topics": [
          "0x93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055",
          "0x000000000000000000000000ee226379db83cffc681495730c11fdde79ba4c0c"
        ],
        "data": "0x00000000000000000000000000000000000000000000000000add969684aa5e7"
      }
    ],
    "value": "0xc12a751e8bd4c7",
    "type": "CALL"
  }
}

Backtrace

none

@zlacfzy
Copy link
Contributor

zlacfzy commented Sep 4, 2023

The last 2 transactions are system transaction, debug_traceTransaction not support trace systemTx now

@hitdavid
Copy link

hitdavid commented Sep 4, 2023

The last 2 transactions are system transaction, debug_traceTransaction not support trace systemTx now

and when?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants