Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Futures timed out with transactions unconfirmed after maximum fee bumps #735

Closed
racket2000 opened this issue Apr 17, 2024 · 8 comments
Closed
Assignees
Labels
status:ready This issue is ready to be worked on

Comments

@racket2000
Copy link

racket2000 commented Apr 17, 2024

I am receiving this error message when I try to deploy my contract on Polygon Mainnet:
Futures timed out with transactions unconfirmed after maximum fee bumps

However, after several minutes, the contract ends up being deployed. I determined this by looking up my Account address which is used for deployment on PolygonScan.

I would like to print out the Contract Address in the Console, as it is a part of a developer tutorial.

Is there anyway to override the maximum gas fee that is used for contract deployment? I saw associated issues regarding this, but I am not sure if a fix has been implemented yet.

@kanej
Copy link
Member

kanej commented Apr 18, 2024

Hey @racket2000, if you rerun the deployment without changes and using the same deployment id (the default of chain-<chainId> will be used if none was specified), then Ignition should detect that the transactions it sent eventually succeeded and print out the address as part of the final result.

The deployed addresses, after the second run, should be stored under ./ignition/deployments/<deployment_id>/deployed_addresses.json.

@kanej kanej added status:needs-more-information There isn't enough information to start working on this issue and removed status:triaging labels Apr 18, 2024
@racket2000
Copy link
Author

racket2000 commented Apr 18, 2024

Hello, thank you very much for getting back with me.

When I rerun the deployment, I receive an error: ProviderError: INTERNAL_ERROR: nonce too low

However, the contract has been published accordingly to Polygon Scan

I am not too sure how to solve this, it seems to be getting this error from my blockchain node provider.

@kanej
Copy link
Member

kanej commented Apr 19, 2024

nonce too low is not coming from an internal Ignition check.

It suggests Ignition is trying to send a transaction where the nonce has already been used and confirmed - which would be an Ignition bug.

Is the deployment you are trying to run open source, to help us try and reproduce this?

@racket2000
Copy link
Author

Hello, thank you for the assistance.

My deployment is not open-sourced -- it is an extremely basic Hello World contract for reading/writing a message into a variable.

I am using the following parameters in my hardhat.config.js file:

ignition: {
timeBeforeBumpingFees: 1000,
maxFeeBumps: 100,
blockPollingInterval: 20000
},

I believe that the maxFeeBumps parameter may be causing the issue, since I assume it is creating multiple transactions with higher fees under the hood.

When I did not include these parameters, the contract would fail to deploy due to a low-estimated gas fee. (The default settings have not worked for deploying on Polygon Mainnet.) It took a contract multiple hours to end up being deployed on the network when I did not specify the above parameters.

@kanej
Copy link
Member

kanej commented Apr 25, 2024

Hey @racket2000, so there are two issues here:

  1. Ignition's gas fees calculation is off for Polygon - we have a fix in PR review currently: Custom logic for Polygon and support for maxPriorityFeePerGas #740
  2. Setting a high maxFeeBumps on polygon leads to nonce too low error for a hello world contract

We will investigate 2 based on your reproduction steps.

@kanej kanej added status:ready This issue is ready to be worked on and removed status:needs-more-information There isn't enough information to start working on this issue labels Apr 25, 2024
@kanej kanej moved this to Todo in Hardhat Ignition Apr 25, 2024
@humblemodulo
Copy link

Not to pile on, but having similar issues with Polygon (mainnet) network. It simply refuses to deploy contracts. I'm guessing my issue is cursorily related to these as well:

#738
#724

For the record, I can deploy to BSC, Base, ETH (I'm guessing all L1s?) just fine. However, when it comes to Polygon specifically it is horribly inconsistent.

In the context of Polygon, I've tried multiple RPCs from:

- Chainlist (public)
- Tenderly
- GetBlock
- Moralis
- Quicknode
- Alchemy
- Infura

Also, for the record, I've tried old school hre.viem.deployContract, and receive errors as well. So, my guess is it goes to some core HH feature rather than simply Ignition.

I've attached a trimmed version of my Ignition output.

Anyway, just a bit more info.

trimmed-ignition-output.txt

@kanej
Copy link
Member

kanej commented Apr 29, 2024

Not to pile on, but having similar issues with Polygon (mainnet) network. It simply refuses to deploy contracts. I'm guessing my issue is cursorily related to these as well:

#738 #724

For the record, I can deploy to BSC, Base, ETH (I'm guessing all L1s?) just fine. However, when it comes to Polygon specifically it is horribly inconsistent.

In the context of Polygon, I've tried multiple RPCs from:

- Chainlist (public)
- Tenderly
- GetBlock
- Moralis
- Quicknode
- Alchemy
- Infura

Also, for the record, I've tried old school hre.viem.deployContract, and receive errors as well. So, my guess is it goes to some core HH feature rather than simply Ignition.

I've attached a trimmed version of my Ignition output.

Anyway, just a bit more info.

trimmed-ignition-output.txt

Thanks for the information and Ignition output.

For polygon specifically, the gas fee estimation heuristic that gets used in both Hardhat and Ignition is giving poor results (Polygon is just too different). Until we understand Polygon gas fee calculations better we are going to revert to pre-1559 transactions on Polygon, which is giving us far more predictable results in manual testing.

You can follow along with that PR here: #740, it will be shipped in the next release.

@zoeyTM zoeyTM moved this from Todo to In Progress in Hardhat Ignition Apr 30, 2024
@kanej kanej mentioned this issue May 1, 2024
@zoeyTM
Copy link
Contributor

zoeyTM commented May 3, 2024

I've investigated this issue, but I've been unable to reproduce this on the newest Ignition release (0.15.2). There may be an underlying bug still, but since the case to trigger it is an edge case under normal circumstances (transactions taking extreme amounts of time to confirm repeatedly), I'm going to close this issue for now.

This specific case was fixed as a result of us fixing Polygon transactions in general in release 0.15.2. If the bug pops up again, we can reopen and reevaluate.

@zoeyTM zoeyTM closed this as completed May 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Hardhat Ignition May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Archived in project
Development

No branches or pull requests

4 participants