question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is debugging mainnet transactions with Infura possible?

See original GitHub issue
  • I’ve asked for help in the Truffle Gitter before filing this issue.

Issue

Can’t debug mainnet transactions using infura

Steps to Reproduce

// truffle.js
const HDWalletProvider = require('truffle-hdwallet-provider')

module.exports = {
  networks: {
    mainnet: {
      provider: new HDWalletProvider(
        'some randomly made up mnemonic',
        'https://mainnet.infura.io/'
      ),
      network_id: '1'
    }
  }
}

Expected Behavior

truffle debug <tx-id>  --network mainnet

should have debugged my transaction

Actual Results

Got an error

screen shot 2018-04-11 at 12 24 09

Environment

  • Operating System: MacOS 10.13.4
  • Ethereum client: Infura
  • Truffle version (truffle version): v4.1.5
  • node version (node --version): v9.8.0
  • npm version (npm --version): v5.6.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chapati23commented, Apr 13, 2018

Can confirm for sure now. In fully synced geth --fast node, i get Error: required historical state unavailable when trying to run debug.traceTransaction(<tx-id>).

was worth a shot.

1reaction
chapati23commented, Apr 11, 2018

Thanks @cgewecke, will give it a read and report back here after my local geth node is fully synced.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fork Ethereum and Replay Historical Transactions ...
For example, you can now debug verified external contracts using the Truffle Debugger.
Read more >
Debugging transactions in Ethereum. Part 2: Truffle and Buidler
As far as I know, truffle debug can be used against any node that supports the debug_traceTransaction JSON-RPC method.
Read more >
Debugging verified external contracts with Truffle Debugger
This means you'll be able to debug Mainnet / Görli / Ropsten / etc. transactions that interact with external contracts without the need...
Read more >
Using Non-Local Networks — Brownie v1.0.0 documentation
Brownie's debugging tools rely upon the debug_traceTransaction RPC method which is not supported by Infura. Attempts to call it will result in a...
Read more >
Troubleshooting Errors - Developers - Aave Document Hub
Debugging transactions on mainnet / Ropsten / Kovan ... If your contracts are successfully deployed on a public network, then you can use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found