-
Notifications
You must be signed in to change notification settings - Fork 682
Automatic nonce generation race condition #2489
Comments
Hey @theblock-dev, can you give me a little more information about what you are doing? For example, can you tell me what version of Truffle you are using, what network you are migrating to, and what provider you are furnishing? If you have your |
Hi Tyler I am migrating it to the local ganache cli. Attached are the truffle-config.js and 2_deploy_contracts.js files ( Pls extract the zip ) Thanks |
Sure! Can you try upgrading Truffle to the latest version? Also, if you are using ganache-cli, upgrade to the latest Ganache as well if you can. It has been renamed just ganache. You will have to uninstall ganache-cli first. So Is your project on Github? |
I downgraded the truffle version to 5.4.23, and the issue got resolved automatically. I have not idea why the higher version gave this error. |
Actually the latest Ganaceh is 7.0.2 I believe. Is your project on GitHub so I can take a look and try to figure out what might be happening? If there is a problem with the latest version of Truffle then I would like to try and document it so we can fix it. Let me know if you have a code sample and steps for reliably reproducing this error. |
Hi Tyler Steps to replicate -
Thanks |
Thanks @theblock-dev! I'll go ahead and see if I can reproduce the problem you are having and hopefully have some advice for you. |
So I have reproduced your error and found the issue. The problem is with how you are asynchronously creating transactions with If I run Ganache separately and set a block time (which causes instamine mode to be off) it seems to get past the area causing problems. When I run your example with a plain old I think this will not cause a problem when using a real network like Rinkeby as it will just throw each into the pool and wait until each's turn comes up. But as a workaround you could just remove the |
So after a bit of troubleshooting with the Ganache team, it looks like there is an issue in Ganache. I'm going to transfer this issue there so we can get it triaged and fixed. Thanks for reporting this @theblock-dev! |
Just chiming in to say I am having the exact same issue. I don't run into the issue when using ganache-cli (v6.12.2), only when I upgrade to to ganache v7.0.2 |
@eggplantzzz - thanks a lot for your help and discussing with the ganache team. |
Has this been fixed in the new ganache version 7.0.3? Thanks |
@theblock-dev no, it's not fixed yet. This issue is actively being worked on though. |
Discussed in trufflesuite/truffle#4774
Originally posted by theblock-dev February 24, 2022
Hi All
While running the truffle migrate --reset command, I am getting into nonce issue. The migration code seems to be fine and I can not seem to find any issue with it. Here is the error I am getting
Is there a way to reset the nonce for the truffle?
Thanks
The text was updated successfully, but these errors were encountered: