Problem bei der Trüffelmigration mit Quorum

Ich folge diesem Tutorial http://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains für die Installation von Quorum.

Ich habe vargrant erfolgreich installiert (installierte Version: 1.8.1).

vagrant ssh

Es öffnet ein Terminal in der virtuellen Maschine.

    ubuntu@ubuntu-xenial:~/quorum-examples/7nodes$ ./raft-init.sh
    [*] Cleaning up temporary data directories
    [*] Configuring node 1
    INFO [11-22|09:48:12] Allocated cache and file handles         database=/home/ubuntu/quorum-examples/7nodes/qdata/dd1/geth/chaindata cache=16 handles=16
    INFO [11-22|09:48:12] Writing custom genesis block 
    INFO [11-22|09:48:12] Successfully wrote genesis state           database=chaindata                                                     hash=c23b4e…8b1b71
    INFO [11-22|09:48:12] Allocated cache and file handles         database=/home/ubuntu/quorum-examples/7nodes/qdata/dd1/geth/lightchaindata cache=16 handles=16
    INFO [11-22|09:48:12] Writing custom genesis block 
    INFO [11-22|09:48:12] Successfully wrote genesis state         database=lightchaindata                                                    hash=c23b4e…8b1b71
            ....

   ubuntu@ubuntu-xenial:~/quorum-examples/7nodes$ ./raft-start.sh
   [*] Starting Constellation nodes
   [*] Starting node 1
   [*] Starting node 2
   [*] Starting node 3
   [*] Starting node 4
   [*] Starting node 5
   [*] Starting node 6
   [*] Starting node 7
   [*] Waiting for nodes to start
   [*] Sending first transaction
   Contract transaction send: TransactionHash:   0xe6d33f3db00fc9181496b004c13ed484c3a76cdd8422a423785a3bbd52828c02 waiting to be mined...
  true

Damit habe ich die Quorum-Einrichtung erfolgreich abgeschlossen.

Ich versuche, ein neues Trüffelprojekt zu erstellen.

  truffle init bare 

Ich habe die truffle.js wie folgt konfiguriert: -

 module.exports = {
      networks: {
         development: {
             host: "localhost",
             port: 22000, // was 8545
             network_id: "*" // Match any network id
        }
    }

};

Ich habe den SimpleStorage.sol-Vertrag erstellt und versuche ihn bereitzustellen. Bei der Bereitstellung tritt das folgende Problem auf.

   truffle migrate --reset

   Using network 'development'.

   Running migration: 1_initial_migration.js
   Deploying Migrations...
   ... undefined
   Error encountered, bailing. Network state unknown. Review successful  transactions manually.
   Error: Gas price not 0
             at Object.InvalidResponse (/usr/lib/node_modules/truffle/build/cli.bundled.js:37312:16)
             at /usr/lib/node_modules/truffle/build/cli.bundled.js:220420:36
             at /usr/lib/node_modules/truffle/build/cli.bundled.js:72910:11
             at /usr/lib/node_modules/truffle/build/cli.bundled.js:204149:9
             at XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/truffle/build/cli.bundled.js:205574:13)
             at XMLHttpRequestEventTarget.dispatchEvent (/usr/lib/node_modules/truffle/build/cli.bundled.js:73069:18)
             at XMLHttpRequest._setReadyState (/usr/lib/node_modules/truffle/build/cli.bundled.js:73359:12)
            at XMLHttpRequest._onHttpResponseEnd (/usr/lib/node_modules/truffle/build/cli.bundled.js:73514:12)
           at IncomingMessage.<anonymous> (/usr/lib/node_modules/truffle/build/cli.bundled.js:73474:24)
           at emitNone (events.js:91:20)

Wie kann ich das Gas aktualisieren? Ich bin neu bei Quorum. Bitte helfen Sie mir

Antworten (1)

Fügen Sie innerhalb von module.exports Gas und gasPrice hinzu.

 network_id: "*", // Match any network id
 gasPrice: 0,
 gas: 4500000