1

All works with the local testrpc instance.

Now trying to deploy to rinkeby via the Infura site using the HDWalletProvider. Everything looks trivially configured... (unless I need to specifically unlock an account?)

But the migration doesn't work, failing on the 1_initial_migration.js which is a tiny contract.

 > truffle migrate --network rinkeby 
Using network 'rinkeby'.

Running migration: 1_initial_migration.js
  Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
exceeds block gas limit
 > 

Anyone else see / resolve this ?

  • I think this errors happens when you have configured in truffle.json a gas value larger than the network gas limit (or the default used by truffle is larger). – Ismael Nov 8 '17 at 18:05
1
  1. My gas setting in truffle.js:

    gas: 4300000 //may be 21000 - 3000000

    gasPrice: 20000000000

  2. Your smart contract maybe a little complicated, cost more gas than setting, please kindly check and increase the "gasLimit" of genesis.json, the largest number can be 0xffffffff.

  3. by the way, if you need mining in your ethereum node, set the difficulty of genesis.json a little low, for example "0x2000". Otherwise, it is easy to exceed time.

Hope it can help you.

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.