Fix quickstart truffle-config.js sample to use new provider definition

Description

See https://gitter.im/PegaSysEng/pantheon?at=5d76c730b105ed4110d67c69

our answer https://gitter.im/PegaSysEng/pantheon?at=5d778ab1ae44a84124b230d2:

@johnbayne is seems that the issue is due to a change in the way truffle handles tests parallelising. The consequence is that the current way to configure provider in truffle-config.js which is displayed in our quickstart doc doesn't work for testing anymore. Long story short, with the config sample we provide, you get short on connections very fast and the provider is saturated.
I tested and was able to reproduce your issue and find a fix. We will update our quickstart for sure, but for now, you can update your truffle-config.js as indicated in https://ethereum.stackexchange.com/a/73858/405
It will require you to change it to :

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 const PrivateKeyProvider = require("truffle-hdwallet-provider"); const privateKey = "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63"; module.exports = { // See <http://truffleframework.com/docs/advanced/configuration> // for more about customizing your Truffle configuration! networks: { development: { host: "127.0.0.1", port: 8545, network_id: "*" // Match any network id }, quickstartWallet: { provider: () => new PrivateKeyProvider(privateKey, "<YOUR QUICKSTART HTTP-RPC ENDPOINT HERE>"), network_id: "*" }, } };

Let me know if that helps.

 

Status

Assignee

Nicolas Massart

Reporter

Nicolas Massart

Labels

None

Refinement State

Ready for Work

Scrum Team

Pliny

Fix versions

Priority

P3