trufflesuite / trufflesuite.github.io

Staging Repo of Build Artifacts for Truffle Suite. Find the source at https://github.com/trufflesuite/trufflesuite.com
https://www.trufflesuite.com
34 stars 161 forks source link

"please check your gas amount" when migrating to quorum #222

Open moda20 opened 6 years ago

moda20 commented 6 years ago

hello ! I am trying to migrate a contract to the 7 nodes example from the quorum repository. i got this error


Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.

This is my truffle.Js


module.exports = {
  networks: {
    development: {
      host: 'localhost',
      port: 22000,
      network_id: '*',
      gas: 4500000,
      gasPrice:0
    }
  }
}

How is this gas related error even possible, isn't quorum letting the gas thing and the mining for some other ways ? is this a generic error

cgewecke commented 6 years ago

@moda20 Yes, this is a generic error thrown by web3 when it tries to new a contract but can't retrieve the contract code from the network after the transaction completes. This can be thrown for non-gas related reasons - a common one is that the contract's constructor contains require statements that throw an error.

Not sure what client you are using but I believe it's necessary to run Parity with a Geth mode flag to reliably avoid this error as well.

moda20 commented 6 years ago

@cgewecke i am running the 7 nodes example form the official quorum repo, and that launches geth nodes. I am just using truffle from terminal and never used parity, but i will check my code more. at least now i know it is not gas problem.