foundry: Anvil consistently freezing when deploying multiple contracts

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (7bc3e60 2022-07-12T00:04:40.748127213Z)

What command(s) is the bug in?

No response

Operating System

Linux

Describe the bug

When I run a series of contract deployment transactions against the Anvil node in WSL2, it freezes and not even a SIGINT signal (CTRL + C) is able to shutdown it down. Demo of the bug can be seen below:

https://drive.google.com/file/d/1TMKS9xGM1RpopVHAVh_Mu02C7-JpTNNI/view?usp=sharing

Restarting the computer usually fixed the issue, but after today’s foundryup, it became persistent.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Hi @mattsse! The node seem a lot more stable on WSL now! Thank you for the fix and may Foundry go to the moon 🚀!

@pedroyan made some related changes in #2369 that I think should, hopefully, fix it, mind trying again with latest?

please reopen if this is still happening

Could you try running the deployment multiple times? An engineer on our team running anvil on Mac also reproduced the problem, but it only after a couple of deployments

On Thu, 14 Jul 2022 at 07:33 Matthias Seitz @.***> wrote:

hmm, I wasn’t able to reproduce this, at least on Intel Mac and anvil 0.1.0 (3c49efe https://github.com/foundry-rs/foundry/commit/3c49efe58ca4bdeec4729490501da06914446405 2022-07-14T00:05:09.729536Z)

maybe this is a windows issue

could you perhaps try with anvil/forge running in docker?

— Reply to this email directly, view it on GitHub https://github.com/foundry-rs/foundry/issues/2282#issuecomment-1184278068, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYJ4QIE7ITTQ3GBUWKHGPTVT7UG5ANCNFSM53LK2X5Q . You are receiving this because you were mentioned.Message ID: @.***>

Anvil script:

anvil --fork-url https://eth-mainnet.g.alchemy.com/v2/KEY --fork-block-number 15097154

Deployment script:

forge script script/LocalDeploy.s.sol --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast --fork-url http://127.0.0.1:8545

Additional setup/execution info can be found in the readme of the repo 😃

@mattsse I will see if I can get you access to the repository in question - Maybe then you can collect debugging information and test the changes a bit better 😃

sigh, is there a way for me to reproduce this?

can you run anvil with RUST_LOG=backend,node,miner anvil and share the logs?

@pedroyan can you please try again with this PR https://github.com/foundry-rs/foundry/pull/2283?

foundryup --pr 2283