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

CallTracer : JS TypeError when tracing a specific tx #23706

Closed
vbergeron-ledger opened this issue Oct 11, 2021 · 1 comment
Closed

CallTracer : JS TypeError when tracing a specific tx #23706

vbergeron-ledger opened this issue Oct 11, 2021 · 1 comment
Labels

Comments

@vbergeron-ledger
Copy link

vbergeron-ledger commented Oct 11, 2021

Hello folks, trying to migrate from our old custom tracer to the new optimized implem using the enter/exit.
our automated test suite caught this one.

System information

Geth version: Geth/v1.10.9-stable-eae3b194/linux-amd64/go1.17
OS & Version: linux

Expected behaviour

RPC IN :

{
	  "jsonrpc": "2.0", 
	  "method": "debug_traceTransaction",
	  "params": ["0x2a86756a791b7b9a12818bd06c5578062166fc78a93cbd3db384a3a55e816257", {"tracer": "callTracer"}],
		"id":0
}

RPC OUT :

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
      "type": "CALL",
      "from": "0x0a4f4ba42c795818297bd24de1a89084225cc062",
      "to": "0x7ee8ab2a8d890c000acc87bf6e22e2ad383e23ce",
      "value": "0x0",
      "gas": "0xb6015",
      "gasUsed": "0x1d88",
      "input": "0x865a6b4f00000000000000000000000063faee0a2cbcedc0102575c6ff17da38b1565c2200000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001847ecc63970000000000000000000000000000000000000000000000001c9eb028e55c1af0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c12d099be31567add4e4e4d0d45691c3f58f5663000000000000000000000000164a1229f4826c9dd70ee3d9f4f3d7b68a172153000000000000000000000000c04744ab87a4c37afd91680ef280b96ee21a026e000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000078d65bce7dd600000000000000000000000000c12d099be31567add4e4e4d0d45691c3f58f5663000000000000000000000000c04744ab87a4c37afd91680ef280b96ee21a026e000000000000000000000000000000000000000000003b3558c3d643af5e83240000000000000000000000000000000000000000000000000000000000000001",
      "output": "0x",
      "time": "10.86596ms",
      "calls": [
        {
          "type": "DELEGATECALL",
          "from": "0x7ee8ab2a8d890c000acc87bf6e22e2ad383e23ce",
          "to": "0x63faee0a2cbcedc0102575c6ff17da38b1565c22",
          "gas": "0xb2502",
          "gasUsed": "0xf24",
          "input": "0x7ecc63970000000000000000000000000000000000000000000000001c9eb028e55c1af0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c12d099be31567add4e4e4d0d45691c3f58f5663000000000000000000000000164a1229f4826c9dd70ee3d9f4f3d7b68a172153000000000000000000000000c04744ab87a4c37afd91680ef280b96ee21a026e000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000078d65bce7dd600000000000000000000000000c12d099be31567add4e4e4d0d45691c3f58f5663000000000000000000000000c04744ab87a4c37afd91680ef280b96ee21a026e000000000000000000000000000000000000000000003b3558c3d643af5e83240000000000000000000000000000000000000000000000000000000000000001",
          "error": "execution reverted",
          "calls": [
            {
              "type": "STATICCALL",
              "from": "0x7ee8ab2a8d890c000acc87bf6e22e2ad383e23ce",
              "to": "0xc12d099be31567add4e4e4d0d45691c3f58f5663",
              "gas": "0xaefc8",
              "gasUsed": "0x5c6",
              "input": "0x70a08231000000000000000000000000c04744ab87a4c37afd91680ef280b96ee21a026e",
              "output": "0x000000000000000000000000000000000000000000003c4465b43b21087e8324"
            }
          ]
        }
      ]
    }
  }

Actual behaviour

RPC IN :

{
	  "jsonrpc": "2.0", 
	  "method": "debug_traceTransaction",
	  "params": ["0x2a86756a791b7b9a12818bd06c5578062166fc78a93cbd3db384a3a55e816257", {"tracer": "callTracer"}],
		"id":0
}

RPC OUT :

{
    "jsonrpc": "2.0",
    "id": 0,
    "error": {
      "code": -32000,
      "message": "TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault'"
    }
}

Steps to reproduce the behaviour

Trace this specific transaction with the call described higher.
I ran some script and caught the same issue for other txs :

(block number, error, tx_number)
(11000000,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',65)
(11000001,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',40)
(11000001,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',41)
(11000001,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',42)
(11000001,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',43)
(11000002,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',35)
(11000003,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',171)
(11000004,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',64)
(11000004,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',119)
(11000005,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',1)
(11000006,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',37)
(11000007,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',92)
(11000007,TypeError: cannot read property 'calls' of undefined    in server-side tracer function 'fault',113)
@holiman
Copy link
Contributor

holiman commented Oct 11, 2021

Thanks for reporting, however, this is already fixed on master by #23667, just haven't made it into a release yet.

@holiman holiman closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants