0

We just built a new 3 node quorum network but we are unable to deploy any contract on it. Please find the below info:

Quorum vesrsion:

Geth
Version: 1.8.18-stable
Git Commit: b5266cbd194aaa61efd1815df87c7d9edaad118c
Quorum Version: 2.4.0
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1337
Go Version: go1.13.8
Operating System: linux
GOPATH=
GOROOT=/usr/local/go

genesis.json

{
  "alloc": {    
    "0xcf6b6c17223a1af15d7495843a5a9c9409901cbb": {
      "balance": "1000000000000000000000000000"
    }   
},
 "coinbase": "0x0000000000000000000000000000000000000000",
 "config": {
   "homesteadBlock": 0,
   "byzantiumBlock": 0,
   "chainId": 10,
   "eip150Block": 0,
   "eip155Block": 0,
   "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
   "eip158Block": 0,
   "isQuorum": true
  },
 "difficulty": "0x0",
 "extraData": "0x000000000000000000000000000000000000000000000000000000000000",
 "gasLimit": "0xF0000000",
 "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
 "nonce": "0x0",
 "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
 "timestamp": "0x00"
}

Node starting script:

#!/bin/bash

PRIVATE_CONFIG=/Aurachain/tm-node01/tm.ipc nohup geth --datadir node01/ --nodiscover --verbosity 5 --networkid 31337 --raft --raftport 50000 --raftjoinexisting 1 --rpc --rpcaddr 0.0.0.0 --rpcport 22000 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,raft --emitcheckpoints --port 21000 >> node.log 2>&1 &

error found in log when running "truffle migrate":

DEBUG[02-19|16:19:33.281] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-19|16:19:53.281] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-19|16:20:13.282] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-19|16:20:33.282] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-19|16:20:34.152] Executing EVM call finished              runtime=778.905µs
DEBUG[02-19|16:20:34.153] Executing EVM call finished              runtime=319.147µs
DEBUG[02-19|16:20:34.153] Executing EVM call finished              runtime=288.233µs
DEBUG[02-19|16:20:34.153] Executing EVM call finished              runtime=215.068µs
INFO [02-19|16:20:34.153] VM returned with error                   err="contract creation code storage out of gas"
DEBUG[02-19|16:20:34.154] Executing EVM call finished              runtime=342.389µs
DEBUG[02-19|16:20:34.154] Executing EVM call finished              runtime=270.944µs
DEBUG[02-19|16:20:34.154] Executing EVM call finished              runtime=205.448µs
INFO [02-19|16:20:34.154] VM returned with error                   err="contract creation code storage out of gas"
DEBUG[02-19|16:20:34.154] Executing EVM call finished              runtime=273.086µs
INFO [02-19|16:20:34.155] VM returned with error                   err="contract creation code storage out of gas"
DEBUG[02-19|16:20:34.155] Executing EVM call finished              runtime=339.126µs
DEBUG[02-19|16:20:34.155] Executing EVM call finished              runtime=160.921µs
DEBUG[02-19|16:20:34.155] Executing EVM call finished              runtime=216.27µs
INFO [02-19|16:20:34.156] VM returned with error                   err="contract creation code storage out of gas"
DEBUG[02-19|16:20:34.156] Executing EVM call finished              runtime=337.542µs
DEBUG[02-19|16:20:34.156] Executing EVM call finished              runtime=181.484µs
DEBUG[02-19|16:20:34.156] Executing EVM call finished              runtime=411.824µs
INFO [02-19|16:20:34.157] VM returned with error                   err="contract creation code storage out of gas"
DEBUG[02-19|16:20:34.157] Executing EVM call finished              runtime=269.971µs
DEBUG[02-19|16:20:34.157] Executing EVM call finished              runtime=190.412µs
INFO [02-19|16:20:34.157] VM returned with error                   err="contract creation code storage out of gas"
DEBUG[02-19|16:20:34.157] Executing EVM call finished              runtime=350.098µs
DEBUG[02-19|16:20:34.158] Executing EVM call finished              runtime=237.109µs
INFO [02-19|16:20:34.158] VM returned with error                   err="contract creation code storage out of gas"
DEBUG[02-19|16:20:34.158] Executing EVM call finished              runtime=314.698µs
DEBUG[02-19|16:20:34.158] Executing EVM call finished              runtime=287.373µs
DEBUG[02-19|16:20:34.159] Executing EVM call finished              runtime=198.519µs
DEBUG[02-19|16:20:34.159] Executing EVM call finished              runtime=217.507µs
TRACE[02-19|16:20:35.633] Pooled new future transaction            hash=1adb6c…820b42 from=0x7D32b1996b64515567c8C20168ec323850D48801 to=nil
TRACE[02-19|16:20:35.633] Promoting queued transaction             hash=1adb6c…820b42
TRACE[02-19|16:20:35.633] Promoting queued transaction             hash=1adb6c…820b42
INFO [02-19|16:20:35.633] Submitted contract creation              fullhash=0x1adb6ca029ebd4c0f66a57e4ad9b771cf1142249ad108d354c56ea77be820b42 to=0x785E4e919C00Ae252C6F0C5b0475eB238B10d853
INFO [02-19|16:20:35.633] QUORUM-CHECKPOINT                        name=TX-CREATED                                                       tx=0x1adb6ca029ebd4c0f66a57e4ad9b771cf1142249ad108d354c56ea77be820b42 to=0x785E4e919C00Ae252C6F0C5b0475eB238B10d853
TRACE[02-19|16:20:35.633] Broadcast transaction                    hash=1adb6c…820b42 recipients=2
TRACE[02-19|16:20:35.634] Broadcast transactions                   id=3edcecaf371483cc conn=staticdial count=1
TRACE[02-19|16:20:35.634] Broadcast transactions                   id=ed93c98211604e6f conn=staticdial count=1
DEBUG[02-19|16:20:43.456] Transaction pool status report           executable=4 queued=0 stales=0

We cannot even deploy the Migrations contract from the truffle suite:

pragma solidity >=0.4.21 <0.7.0;

contract Migrations {
  address public owner;
  uint public last_completed_migration;

  constructor() public {
    owner = msg.sender;
  }

  modifier restricted() {
    if (msg.sender == owner) _;
  }

  function setCompleted(uint completed) public restricted {
    last_completed_migration = completed;
  }
}

truffle-config.js is configured with:

host: provider: () => new HDWalletProvider(mnemonic, "http://path-to-rpc"),,
      port: 22000, // was 8545
      network_id: "*", // Match any network id
      gasPrice: 0,
      gas: 4500000,
      type: "quorum" // needed for Truffle to support Quorum

Is "gas: 4500000" not enough? Any ideas on what's wrong with our setup? Thanks.

1

the following config in the genesis.json solved our problem. We are using solc @0.5.10.

{
  "alloc": {
    "0x7D32b1996b64515567c8C20168ec323850D48801": {
      "balance": "1000000000000000000000000000"
    },
    "0x369DA55d3C7B1494447765559D83DCa0B62aB620": {
      "balance": "1000000000000000000000000000"
    },
    "0x5b7bfc09326bf10445432c0dcbf5c23685f244b6": {
      "balance": "1000000000000000000000000000"
    }
  },
  "coinbase": "0x0000000000000000000000000000000000000000",
  "config": {
    "homesteadBlock": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "chainId": 10,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip158Block": 0,
    "maxCodeSize": 35,
    "isQuorum": true
  },
  "difficulty": "0x0",
  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "gasLimit": "0xE0000000",
  "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
  "nonce": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp": "0x00"
}

| improve this answer | |
0

The message "contract creation code storage out of gas" means you haven't supplied sufficient gas for the contract.

How much gas are you providing? (For Truffle this is defined in the deploy script, else it uses the default value from the truffle-config.js config file).

| improve this answer | |
  • Hi @Satpal Sandhu, thanks for your answer. I update the initial question with the truffle-config.js config file... 4500000 gas should be enough for such a basic contract... – Razvan Turtureanu Feb 19 at 17:59
  • Ok, a couple of other points to check: - What version of solc are you using? Quorum doesn't support more recent versions (most folks are using around 0.5.5). - You should set "constantinopleBlock": 1 in your genesis, otherwise solidity versions 0.5.5+ won't work. – Satpal Sandhu Feb 20 at 9:44

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.