1

I developed some smart contracts to be deployed to a private PoA (Proof of Authority) blockchain. I spun up a private blockchain via truffle develop and got the following receipt:

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


Starting migrations...
======================
> Network name:    'development'
> Network id:      5777
> Block gas limit: 0x6691b7


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

   Replacing 'Migrations'
   ----------------------
   > transaction hash:    0x3d13fe576e83c051ab7814c9c4b221310e55fe49ab4b75e6b0af8905856c9fbf
   > Blocks: 0            Seconds: 0
   > contract address:    0xf00B83D756789D8Ad24a0DceE356B26973279390
   > block number:        1
   > block timestamp:     1559731765
   > account:             0xCe6cd87Dea71E58A020A076dD0a820cC6d3879fB
   > balance:             99.999477214
   > gas used:            261393
   > gas price:           2 gwei
   > value sent:          0 ETH
   > total cost:          0.000522786 ETH


   > Saving migration to chain.
   > Saving artifacts
   -------------------------------------
   > Total cost:         0.000522786 ETH


Summary
=======
> Total deployments:   1
> Final cost:          0.000522786 ETH

The Azure solution I am currently using for the private blockchain is the Ethereum on Azure template. This template is set up that nobody has any Ether in their accounts. I configured Truffle as follows:

cloudDev: {
  network_id: "*",
  provider: () =>
    new HDWalletProvider(
      mnemonic,
      "<azure_url>:<azure_port>"
    ),
  gasPrice: 0
}

However, when I execute the deployment to this blockchain, I get the following receipt:

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


Starting migrations...
======================
> Network name:    'cloudDev'
> Network id:      5230
> Block gas limit: 0x2faf080


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

   Deploying 'Migrations'
   ----------------------
   > transaction hash:    0x85b99478d90fa12b52b26307ee0fb1d688537a55e4346fdc2fe8a76696f6e2b1
   > Blocks: 0            Seconds: 0
   > contract address:    0x3BE3DeB6910E5493aEbA67141F7FFb560eC80955
   > block number:        24773
   > block timestamp:     1559732366
   > account:             0x4e33D8a245Ad3C28634726607a5F9bb8d7BB295f
   > balance:             0
   > gas used:            261393
   > gas price:           0 gwei
   > value sent:          0 ETH
   > total cost:          0 ETH


   ⠧ Saving migration to chain.Error: Error: StatusError: Transaction: 0xcff0b628f0ae784a33c3fdf4b743c8414cd8031ddd34c6a7efda8bfd9d6e2fdf exited with an error (status 0) after consuming all gas.
     Please check that the transaction:
     - satisfies all conditions set by Solidity `assert` statements.
     - has enough gas to execute the full transaction.
     - does not trigger an invalid opcode by other means (ex: accessing an array out of bounds).
    at Object.run (/home/DevNebulae/.nvm/versions/node/v10.15.3/lib/node_modules/truffle/build/webpack:/packages/truffle-migrate/index.js:92:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)
Truffle v5.0.20 (core: 5.0.20)
Node v10.15.3

What may be the cause of this issue and how can I fix this?

  • Since I had the issue, I switched over to a custom VM with a Geth node running on it and providing the sealer account with a very large amount of gas. If anybody has a solution for this problem, please let the Ethereum community know! – DevNebulae Jun 15 at 14:59
1

In my case, downgrading Truffle from v5.0.27 to v5.0.5 fixed the issue.

npm i -g truffle@v5.0.5

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.