Truffle
Quorum 的松露遷移問題
我正在按照本教程http://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains進行 Quorum 安裝..
我已經成功安裝了 vargrant(安裝版本:1.8.1)。
vagrant ssh
它在虛擬機中打開一個終端。
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
至此,我成功完成了 Quorum 設置。
我正在嘗試創建一個新的松露項目。
truffle init bare
我將 truffle.js 配置如下:-
module.exports = { networks: { development: { host: "localhost", port: 22000, // was 8545 network_id: "*" // Match any network id } }
};
我創建了 SimpleStorage.sol 契約並嘗試部署。部署時會引發以下問題。
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)
我如何更新 Gas?我是 Quorum 的新手。請幫幫我
在 module.exports 中,添加 Gas 和 gasPrice。
network_id: "*", // Match any network id gasPrice: 0, gas: 4500000