trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
2.62k stars 683 forks source link

fork the mainnet with customized dynamic block height? #957

Open apiscerena opened 3 years ago

apiscerena commented 3 years ago

I wanna run an arbitrage test script to get some academic data from the forked ethereum mainnet. I could use ganache-cli -f https://alchemyapi-link@blockheight, but this method is pretty time-consuming to fork from a new block height.
Is there any way of traveling every block so that I could run my script to check arbitrage opportunities?

davidmurdoch commented 3 years ago

@apiscerena this is a great idea and is something we've been discussing internally. There are some technicalities around why this isn't going to be possible in some cases where state becomes incompatible with new blocks, but I think we'll find ways to work around them.

apiscerena commented 3 years ago

Glad to hear that news. Looking forward to using that new feature. Actually, I'm wondering how the state becomes incompatible with new blocks? Could you give me some hints or do you have any recommended articles to describe the situation?