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

trace_transaction includes extra calls in result #4410

Closed
naddison36 opened this issue Aug 11, 2022 · 2 comments · Fixed by #4472 or #4918
Closed

trace_transaction includes extra calls in result #4410

naddison36 opened this issue Aug 11, 2022 · 2 comments · Fixed by #4472 or #4918
Assignees

Comments

@naddison36
Copy link

Describe the bug

trace_transaction of mainnet transaction 0xc21820596ea093f26f7afcbb114883c8fb31f7521d8bc2ff9c7c7ebe60fb7ea6 adds extra calls when comparing the results from trace_replayTransaction.

The second object in the trace_transaction results is a call to 0x0000000000000000000000000000000000000004 which is not a contract.

{
      "action": {
          "callType": "call",
          "from": "0x803a2b40c5a9bb2b86dd630b274fa2a9202874c2",
          "gas": "0xac5f7",
          "input": "0x23b872dd",
          "to": "0x0000000000000000000000000000000000000004",
          "value": "0x0"
      },
      "blockHash": "0x22dd4a58533faa51295381734a861950295352693fb2c42e5e45964aef41ad1f",
      "blockNumber": 15309264,
      "result": {
          "gasUsed": "0x12",
          "output": "0x23b872dd"
      },
      "subtraces": 0,
      "traceAddress": [
          0
      ],
      "transactionHash": "0xc21820596ea093f26f7afcbb114883c8fb31f7521d8bc2ff9c7c7ebe60fb7ea6",
      "transactionPosition": 111,
      "type": "call"
  },

The third and sixth objects in the tx result also look incorrect and are not in the result.trace of trace_replayTransaction

To Reproduce

Send a JSON RPC trace_transaction call to an archive node

{
    "jsonrpc": "2.0",
    "method": "trace_transaction",
    "params": [
        "0xc21820596ea093f26f7afcbb114883c8fb31f7521d8bc2ff9c7c7ebe60fb7ea6"
    ],
    "id": 1
}

Send trace_replayTransaction for the same transaction and compare the result.trace output to the result of trace_transaction

{
    "jsonrpc": "2.0",
    "method": "trace_replayTransaction",
    "params": [
        "0xc21820596ea093f26f7afcbb114883c8fb31f7521d8bc2ff9c7c7ebe60fb7ea6", ["trace"]
    ],
    "id": 1
}

Expected behavior

The result array in the trace_transaction response should be the same as the result.trace array in the trace_replayTransaction response.

Desktop (please complete the following information):
I'm calling ArchiveNode.io's Nethermind node. I'm not sure what they are running it on.

  • OS: [e.g. Windows]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

You can also check against the Parity Trace on Etherscan https://etherscan.io/vmtrace?txhash=0xc21820596ea093f26f7afcbb114883c8fb31f7521d8bc2ff9c7c7ebe60fb7ea6&type=parity#raw

@naddison36
Copy link
Author

It looks like the extra calls are to the precompiled 0x0000000000000000000000000000000000000004 contract https://www.evm.codes/precompiled

@LukaszRozmej
Copy link
Member

reverted in #4914

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