Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Error "c.header.cliqueSigner is not a function" when debugging on a forked chain #4359

Closed
haltman-at opened this issue Apr 13, 2023 · 1 comment · Fixed by #4465
Closed

Comments

@haltman-at
Copy link
Contributor

haltman-at commented Apr 13, 2023

I'm trying to debug a transaction on Goerli by forking with Ganache and debugging there. However, on recent versions of Ganache (7.8.0 and 7.7.0) the debug_traceTransaction call returns an error. This error does not occur on Ganache 7.6.0. It also does not seem to occur when not using forking.

Reproduction steps:

  1. Create an instance of Ganache forking Goerli.
  2. Attempt to use Truffle Debugger (I used -x, although that shouldn't be relevant here) to debug the following transaction: 0x6a86b051ad13bcf8a4ebfc33f6ccdacced818bd2de3149e7566e9f55cc0fab64

If you do this, you get the following error:

Error: c.header.cliqueSigner is not a function
    at on.getTrace (/home/sniffnoy/truffle/truffle/packages/debugger/lib/web3/adapter.js:38:13)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
Truffle (unbundled) (core: 5.8.2)
Node v14.21.3

(This is on 7.8.0; with Ganache 7.7.0, it's called t.header.cliqueSigner instead. And, as mentioned, with 7.6.0, no error occurs.)

Now this error is of course coming from adapter.js, but that's because it got an error response from Ganache on the debug_traceTransaction call. Specifically, with 7.8.0, the response looks like this:

{
  id: 1681425938846,
  jsonrpc: '2.0',
  error: {
    message: 'c.header.cliqueSigner is not a function',
    stack: 'TypeError: c.header.cliqueSigner is not a function\n' +
      '    at VM._runTx (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/0.js:2:3817717)\n' +
      '    at async VM.runTx (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/0.js:2:3821314)\n' +
      '    at async Blockchain.<anonymous> (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:77581)\n' +
      '    at async Blockchain.traceTransaction (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:85688)',
    code: -32700
  }
}

So, seems like a Ganache bug!

Other notes: I initially encountered this error when manually forking via Infura, because I forgot that these days you can just do ganache -f goerli. But on trying the latter, the error still occurred.

@haltman-at
Copy link
Contributor Author

Note: Issue #4450 may be related to this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants