Truffle: Migration + Infura stuck at polling "eth_getBlockByNumber"

Created on 29 Sep 2018  路  4Comments  路  Source: trufflesuite/truffle

  • [x] I've asked for help in the Truffle Gitter before filing this issue.

Issue

Unable to deploy contracts to any live/test networks.
The deployment works perfectly for ganache/ganache-cli.

Steps to Reproduce

truffle migrate --network rinkeby --reset

Here is my truffle-config

const HDWalletProvider = require("truffle-hdwallet-provider");

module.exports = {
  // See <http://truffleframework.com/docs/advanced/configuration>
  // to customize your Truffle configuration!
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*"
    },
    coverage: {
      host: "localhost",
      port: 8555, // <-- Use port 8555
      gas: 0xfffffffffff, // <-- Use this high gas value
      gasPrice: 0x01, // <-- Use this low gas price
      network_id: "1999"
    },
    rinkeby: {
      provider: new HDWalletProvider(
        "mnemonic",
        "https://rinkeby.infura.io/v3/xxx",
        0,
        20
      ),
      network_id: "3",
      gas: 6900000,
      gasPrice: 100000000000
    }
  },
  mocha: {
    useColors: true
  },
  compilers: {
    solc: {
      version: "0.4.25",
      settings: {
        optimizer: {
          enabled: true, // Default: false
          runs: 600 // Default: 200
        }
      }
    }
  }
};

Expected Behavior

Expected to deploy the contracts

Actual Results

Stuck at polling

   > {
   >   "jsonrpc": "2.0",
   >   "id": 2,
   >   "method": "eth_getBlockByNumber",
   >   "params": [
   >     "latest",
   >     false
   >   ]
   > }

Environment

  • Operating System: Windows 10
  • Ethereum client: Infura
  • Truffle version (truffle version): v5.0.0-beta.1
  • node version (node --version): 8.11.3
  • npm version (npm --version): 6.4.1

Most helpful comment

Are you currently using the version of truffle-hdwallet-provider installed via:

$ npm install --save truffle-hdwallet-provider@web3-one

The current default version of that package only works with Truffle v4, and results in hanging much like you describe.

Please let us know if that does not fix the issue for you. Thanks!

All 4 comments

Are you currently using the version of truffle-hdwallet-provider installed via:

$ npm install --save truffle-hdwallet-provider@web3-one

The current default version of that package only works with Truffle v4, and results in hanging much like you describe.

Please let us know if that does not fix the issue for you. Thanks!

Thanks. It resolves the issue.

what version should be used for truffle-privatekey-provider?

Was this page helpful?
0 / 5 - 0 ratings