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

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

Open
mrice32 opened this issue Feb 18, 2021 · 5 comments
Open

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

mrice32 opened this issue Feb 18, 2021 · 5 comments

Comments

@mrice32
Copy link

mrice32 commented Feb 18, 2021

Opening a new issue because #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
@mrice32 mrice32 changed the title Forking mainnet results in erroneous revert reason Forking mainnet results in erroneous revert on ganache-cli 6.12.0+ Feb 18, 2021
@0xTimepunk
Copy link

0xTimepunk commented Mar 10, 2021

I am having this issue too with the latest ganache version. Comented here as well because the other issue is closed.

@davidmurdoch

compound-finance#5

@mikeseese
Copy link
Contributor

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

@mzatroch
Copy link

mzatroch commented Apr 8, 2021

The same issue calling liquidateBorrow(address,CToken) from cEther compound contract -> revert re-entered error returned

@mikeseese
Copy link
Contributor

Hey @mzatroch, please open a new issue. It helps if you provide detailed reproduction steps since the error is a common symptom for several different causes. Thanks!

@ajb413
Copy link

ajb413 commented May 11, 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

@davidmurdoch davidmurdoch removed their assignment Jul 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Backlog
Development

No branches or pull requests

7 participants