1

I am running my own Ethereum client node (Open Ethereum 3.0.1). I am using Truffle migrate to deploy my smart contract to MainNet. However, the contract deployment is taking too long. The result from the migration command is below:

kevins-mbp:AuthentoFile_Repo kevinm$ truffle migrate --network mainnet --reset

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.


Migrations dry-run (simulation)
===============================
> Network name:    'mainnet-fork'
> Network id:      1
> Block gas limit: 9990236 (0x98705c)

1_initial_migration.js
======================

   Deploying 'Migrations'
   ----------------------
   > block number:        10288818
   > block timestamp:     1592471208
   > account:             0xaAF66209133056F1f7285D6cDb61Cf21D135f300
   > balance:             0.1797474439
   > gas used:            210237 (0x3353d)
   > gas price:           2 gwei
   > value sent:          0 ETH
   > total cost:          0.000420474 ETH

   -------------------------------------
   > Total cost:         0.000420474 ETH

2_deploy_contracts.js
=====================

   Deploying 'AuthentoFile'
   ------------------------
   > block number:        10288820
   > block timestamp:     1592471211
   > account:             0xaAF66209133056F1f7285D6cDb61Cf21D135f300
   > balance:             0.1769681859
   > gas used:            1362266 (0x14c95a)
   > gas price:           2 gwei
   > value sent:          0 ETH
   > total cost:          0.002724532 ETH

   -------------------------------------
   > Total cost:         0.002724532 ETH

Summary
=======
> Total deployments:   2
> Final cost:          0.003145006 ETH


Starting migrations...
======================
> Network name:    'mainnet'
> Network id:      1
> Block gas limit: 9990236 (0x98705c)


1_initial_migration.js
======================

   Deploying 'Migrations'
   ----------------------
   > transaction hash:    0x77eac6bee9baeb315e7e52d31d13a9ab4241676c2ec2b4a5e7cf2071281ffe1a


Error:  *** Deployment Failed ***

"Migrations" -- Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!.

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:364:1
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

As you can see, the contract deployment was not completed. I ran this 2 times so now I have the following pending transactions (at least 8+ hours old). The tx hashes for these pending tx are:

  • 0xc0a28527f1fcebc0bdf9ae18479831eaf026b350420a3134bcd14b44f520b812
  • 0x77eac6bee9baeb315e7e52d31d13a9ab4241676c2ec2b4a5e7cf2071281ffe1a

Will these transactions ever get mined? On my Ethereum node I see these as Pending Transactions. My Ethereum client is not configured to do any mining, so I am assuming that a miner on the network will eventually try to mine these transactions?

Any help/insight would be very much appreciated.

1

It is a gas price issue.

According to EtherScan you are using:

0.00000002 Ether (20 Gwei)

According to EthGasStation.info this is below the safe low at the moment:

enter image description here

Unless you want to get involved in a difficult game on cancelling old transactions, I suggest you create a new Ethereum account and try to deploy the contracts from there with higher gas price.

| improve this answer | |
  • Thanks. I will wait a few days to see if the pending transactions ever get mined. After that, I will try to increase the gas price accordingly. Do you really believe I need to create a new account? What will happen if I run the truffle migrate with the same account? – Kevin Melberger Jun 18 at 19:46
  • If the account has a transaction with lower nonce being mined, all the transaction with the higher nonce, or later transactions, are stuck as well. – Mikko Ohtamaa Jun 19 at 7:40
0

Well, how about that! My contract deployment to Ethereum mainnet completed! It took over 10 hours to be mined. I guess it's all about the GasPrice.

https://etherscan.io/tx/0xc0a28527f1fcebc0bdf9ae18479831eaf026b350420a3134bcd14b44f520b812

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.