hardhat-ignition icon indicating copy to clipboard operation
hardhat-ignition copied to clipboard

Unexpected all the transactions of its network interaction were dropped

Open gionn opened this issue 1 year ago • 22 comments

When not getting #664, I got this new error, however one tx creating one of the contracts is being emitted properly (can see it in the explorer), and it get repeated as well if I try to rerun deploy again.

Batch #1
  Executing MyModule#Deployer...
  Executing MyModule#PaymentSplitter...
  Executing MyModule#XercFactory...

An unexpected error occurred:

IgnitionError: IGN401: Error while executing MyModule#PaymentSplitter: all the transactions of its network interaction 1 were dropped. Please try rerunning Hardhat Ignition.
    at monitorOnchainInteraction (/home/gionn/src/xerc/node_modules/@nomicfoundation/ignition-core/src/internal/execution/future-processor/handlers/monitor-onchain-interaction.ts:88:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async FutureProcessor.processFuture (/home/gionn/src/xerc/node_modules/@nomicfoundation/ignition-core/src/internal/execution/future-processor/future-processor.ts:114:9)
    at async ExecutionEngine._executeBatch (/home/gionn/src/xerc/node_modules/@nomicfoundation/ignition-core/src/internal/execution/execution-engine.ts:148:30)
    at async ExecutionEngine.executeModule (/home/gionn/src/xerc/node_modules/@nomicfoundation/ignition-core/src/internal/execution/execution-engine.ts:109:25)
    at async Deployer.deploy (/home/gionn/src/xerc/node_modules/@nomicfoundation/ignition-core/src/internal/deployer.ts:194:25)
    at async SimpleTaskDefinition.action (/home/gionn/src/xerc/node_modules/@nomicfoundation/hardhat-ignition/src/index.ts:206:24)
    at async Environment._runTaskDefinition (/home/gionn/src/xerc/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
    at async Environment.run (/home/gionn/src/xerc/node_modules/hardhat/src/internal/core/runtime-environment.ts:191:14)
    at async main (/home/gionn/src/xerc/node_modules/hardhat/src/internal/cli/cli.ts:328:7)

gionn avatar Dec 30 '23 11:12 gionn

I'm encountering similar issues. Rerunning the deployment usually deploys one of the contracts, then I have to rerun it again to deploy the second contract, and so on. It's really annoying.

jacek0x avatar Jan 04 '24 13:01 jacek0x

Are you deploying via alchemy or infura?

kanej avatar Jan 04 '24 14:01 kanej

Are you deploying via alchemy or infura?

I'm deploying via Alchemy on the Base Sepolia network. However, I've also encountered this error when using the Base Goerli network with the following configuration:

networks: {
  // for mainnet
  base_mainnet: {
    url: 'https://mainnet.base.org',
    accounts: [process.env.PRIVATE_KEY as string],
  },
  // for testnet
  base_goerli: {
    url: 'https://goerli.base.org',
    accounts: [process.env.PRIVATE_KEY as string],
  },
  base_sepolia: {
    url: process.env.ALCHEMY_BASE_SEPOLIA_RPC_URL as string,
    accounts: [process.env.PRIVATE_KEY as string],
  },
}

jacek0x avatar Jan 04 '24 14:01 jacek0x

@kanej Could it be that I'm on the free tier and hitting a rate limit?

jacek0x avatar Jan 04 '24 14:01 jacek0x

I am not sure. We have seen an issue when deploying via infura because it abstracts over different memory pools, so that transactions can apparently suddenly disappear. But we hadn't seen it against alchemy. We will need to dig in more. Is the repo you are using open source?

kanej avatar Jan 04 '24 14:01 kanej

I am not sure. We have seen an issue when deploying via infura because it abstracts over different memory pools, so that transactions can apparently suddenly disappear. But we hadn't seen it against alchemy. We will need to dig in more. Is the repo you are using open source?

Yes, I have open-sourced it here: https://github.com/jacek0x/degen-tips-contract

jacek0x avatar Jan 04 '24 14:01 jacek0x

I am not sure. We have seen an issue when deploying via infura because it abstracts over different memory pools, so that transactions can apparently suddenly disappear. But we hadn't seen it against alchemy. We will need to dig in more. Is the repo you are using open source?

Not sure if this is related, but I'm seeing the following error on Alchemy.

image

{"jsonrpc":"2.0","id":2,"error":{"code":-32600,"message":"Unsupported method: hardhat_getAutomine. See available methods at https://docs.alchemy.com/alchemy/documentation/apis"}}

jacek0x avatar Jan 04 '24 14:01 jacek0x

Not sure if this is related, but I'm seeing the following error on Alchemy.

@jacek0x

This is unrelated. We ping that every deployment to check whether we're connected to Hardhat Network or not, and I can confirm that my Alchemy Sepolia successful deployment also has that invalid request logged.

zoeyTM avatar Jan 05 '24 05:01 zoeyTM

After some digging, as best as I can tell, this does appear to be the same issue as #633, which is to say that it's technically not an issue on our end.

That being said, I'm currently investigating a way we can mitigate this internally within Ignition since this appears to be a more common problem than the edge case I originally assumed it to be.

zoeyTM avatar Jan 05 '24 06:01 zoeyTM

After some digging, as best as I can tell, this does appear to be the same issue as #633, which is to say that it's technically not an issue on our end.

That being said, I'm currently investigating a way we can mitigate this internally within Ignition since this appears to be a more common problem than the edge case I originally assumed it to be.

Is there a way I can mitigate this issue in my code? Could it be related to my Alchemy plan, or is it something else?

jacek0x avatar Jan 05 '24 08:01 jacek0x

After some digging, as best as I can tell, this does appear to be the same issue as #633, which is to say that it's technically not an issue on our end. That being said, I'm currently investigating a way we can mitigate this internally within Ignition since this appears to be a more common problem than the edge case I originally assumed it to be.

Is there a way I can mitigate this issue in my code? Could it be related to my Alchemy plan, or is it something else?

@jacek0x I believe the issue is in how Alchemy has their nodes set up internally. While there may not be anything you can do to resolve it yourself, I have just opened a PR (https://github.com/NomicFoundation/hardhat-ignition/pull/667) that should fix the issue on our end.

zoeyTM avatar Jan 05 '24 08:01 zoeyTM

Thanks, @zoeyTM!

jacek0x avatar Jan 05 '24 09:01 jacek0x

I'm encountering the same issue trying to deploy to Avalanche Fuji testnet. Only one transaction succeed at a time, the second one throws this error every time. The only way to make the deployment to progress is to restart it each time.

Edit: I've tried the development branch HEAD version, and I can confirm that it does fix the issue in my case. Now I'm getting the other, similar issue with the nonce not incrementing, but it happens less often. (https://github.com/NomicFoundation/hardhat-ignition/issues/664)

brunoenten avatar Jan 25 '24 13:01 brunoenten

Same error in polygon: all the transactions of its network interaction 1 were dropped. Please try rerunning Hardhat Ignition. Doesn't seem to be an error in public node as I checked it's up .

hammersharkfish avatar Mar 24 '24 16:03 hammersharkfish

Same error in polygon: all the transactions of its network interaction 1 were dropped. Please try rerunning Hardhat Ignition. Doesn't seem to be an error in public node as I checked it's up .

@hammersharkfish can I check, this is Polygon PoS via Alchemy or Infura?

kanej avatar Mar 26 '24 16:03 kanej

@kanej https://polygon-rpc.com

hammersharkfish avatar Mar 26 '24 18:03 hammersharkfish

Same problem using BSC Testnet over QuickNode. Simple contract ERC-20 using OpenZeppelin.

luiztools avatar Apr 01 '24 17:04 luiztools

I am reopening this issue. My understanding is that our re-calibration of checks and timeouts resolved the all the transactions of its network interaction 1 were dropped. and nonce not incrementing for some chains/testnets but remain on others. Specifically:

  • Polygon POS
  • BSC Testnet (over QuickNode)

kanej avatar Apr 02 '24 08:04 kanej

Same problem using Ethereum sepolia over alchemy. here is my hardcat.config.ts

import { HardhatUserConfig } from "hardhat/config"
import "@nomicfoundation/hardhat-toolbox-viem"
import "dotenv/config" // 在代码里使用process.env 需要引入这个包

const SEPOLIA_RPC_URL = process.env.RPC_URL
const PRIVATE_KEY = process.env.PRIVATE_KEY!
console.log(PRIVATE_KEY, "chainId: 11155111")
const config: HardhatUserConfig = {
    // defaultNetwork: "hardhat",
    networks: {
        sepolia: {
            url: "https://eth-sepolia.g.alchemy.com/v2/xxxxx",
            accounts: [PRIVATE_KEY],
            chainId: 11155111,
        },
    },
    solidity: "0.8.24",
}

export default config

can anyone help me fix this problem

l1135677068 avatar May 09 '24 12:05 l1135677068

@l1135677068 you should revoke your alchemy key you posted here to avoid misuse.

gionn avatar May 09 '24 12:05 gionn

@l1135677068 you should revoke your alchemy key you posted here to avoid misuse.

thanks

l1135677068 avatar May 09 '24 12:05 l1135677068

Doing pnpm store prune solved the issue for me.

vimtor avatar Jun 06 '24 10:06 vimtor