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.

Forking mainnet results in erroneous revert on ganache-cli 6.12.0+

See original GitHub issue

Opening a new issue because https://github.com/trufflesuite/ganache-core/issues/571 is closed.

We’ve had a very similar re-entrancy guard issue with ganache forking. This update fixed our issue in ganache-cli release 6.10.2. But after trying different versions, we noticed a regression in ganache-cli versions 6.12.0+.

You can repro the issue in this repo: https://github.com/UMAprotocol/launch-emp. We have a two simple scripts – one runs a ganache fork and the other runs a node script against that fork.

There are two branches, the only difference between the two being the ganache version.

Working branch: https://github.com/UMAprotocol/launch-emp/tree/ganache_working. Broken branch: https://github.com/UMAprotocol/launch-emp/tree/ganache_broken.

After checking out each branch run the following in separate shells.

Shell 1:

yarn
# Thin yarn script to run ganache-cli
yarn ganache-fork

Shell 2:

node index.js --gasprice 100

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
seesemichaeljcommented, Mar 11, 2021

While I’m no longer with the Truffle team, @davidmurdoch would likely ask for the same thing; @0xTimepunk, could you provide reproduction steps? The error y’all are seeing is a generic symptom caused by several different issues, so it’s possible that a fix for @mrice32 would not be a fix for you @0xTimepunk. Reproduction steps can help whoever ends up looking into this more

0reactions
ajb413commented, May 14, 2021

Can’t seem to run Compound cToken exchangeRateCurrent (this) without hitting revert re-entered when forking mainnet. Using Node.js 12.14.1. MacBook Pro (15-inch, 2019) on macOS Big Sur 11.3. Made an example here https://github.com/ajb413/ganache-bug-example. Instructions for running it are in the readme.

edit: I was able to resolve my fork issues by switching to hardhat

Read more comments on GitHub >

github_iconTop Results From Across the Web

ganache - Uniswap GUI on forked mainnet
Running --chainId 1 on ganache-cli is giving me: Unknown argument: chainId If I try to change it in metamask, it says Not possible...
Read more >
ganache - npm Package Health Analysis - Snyk
A library and cli to create a local blockchain for fast Ethereum development. Visit Snyk Advisor to see a full health score report...
Read more >
How to FORK the Ethereum Mainnet with Ganache CLI
Become an in-demand blockchain MASTER:https://dappuniversity.com/bootcampSubscribe to this channel: ...
Read more >
ganache-cli - npm.io
-l or --gasLimit : Use a custom Gas Limit (defaults to 90000); -f or --fork : Fork from another currently running Ethereum client...
Read more >
Transaction reverts when I run a contract function on mainnet ...
but when I run the deploy.py using $ brownie run deploy.py --network mainnet-fork-dev It gives me the following error:
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