本文介绍了智能合约不会部署到 goQuorum 区块链的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 IBFT 上安装了带有 quorum-wizard 的 goQuorum,有 4 个仲裁节点和 4 个 tessera 节点.当我用./start.sh"启动网络时我得到

I installed goQuorum with quorum-wizard with 4 quorum nodes and 4 tessera nodes on IBFT. When I start the network with "./start.sh" I get

Starting Quorum network...

Waiting until all Tessera nodes are running...
Waiting until all Tessera nodes are running...
All Tessera nodes started
Starting Quorum nodes
Successfully started Quorum network.
--------------------------------------------------------------------------------

Tessera Node 1 public key:
BULeR8JyUWhiuuCMU/HLA0Q5pzkYT+cHII3ZKBey3Bo=

Tessera Node 2 public key:
QfeDAys9MPDs2XHExtc84jKGHxZg/aj52DTh0vtA3Xc=

Tessera Node 3 public key:
1iTZde/ndBHvzhcl7V68x44Vx7pl8nwx9LqnM/AfJUg=

Tessera Node 4 public key:
oNspPPgszVUFw0qmGFfWwh1uxVUXgvBxleXORHj07g8=

--------------------------------------------------------------------------------

当我运行nmap -p 21000-21100"时我得到

when I run "nmap -p 21000-21100" I get

21000/tcp 打开 irtrans21001/tcp 打开未知21002/tcp 打开未知21003/tcp 打开未知

21000/tcp open irtrans21001/tcp open unknown21002/tcp open unknown21003/tcp open unknown

这是我的 truffle-config.js

This is my truffle-config.js

const HDWalletProvider = require("@truffle/hdwallet-provider");
const mnemonic = "not my real mn mon ic num phrase dum get l gg";

module.exports = {
  networks: {
rinkeby: {
    provider: function() {
      return new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3/"+mnemonic);
    },
    network_id: '*',
    timeoutBlocks: 100000,
    networkCheckTimeout:2000000
  },
  quorum: {
    provider: function() {
      return new HDWalletProvider(mnemonic, "http://127.0.0.1:21000/", chainId=10);
    },
    network_id: '*',
    type: 'quorum',
    timeoutBlocks: 100000,
    networkCheckTimeout:2000000
  },
  compilers: {
    solc: {
      version: "0.5.0",
      settings: {
        optimizer: {
          enabled: true, // Default: false
          runs: 1000     // Default: 200
        },
        evmVersion: "homestead"  // Default: "byzantium"
      }
    }
  }
};

当我使用 truffle-config.js 进入目录并运行 truffle deploy --reset --network quorum 来编译我的智能合约时,我收到以下错误.

When I cd in to the directory with the truffle-config.js and I run truffle deploy --reset --network quorum to compile my smart contracts I get the following error.

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


/root/dapp1/Dapp/node_modules/web3-core-helpers/src/errors.js:42
        return new Error(message);
               ^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: Invalid JSON RPC response: ""
    at Object.InvalidResponse (/root/dapp1/Dapp/node_modules/web3-core-helpers/src/errors.js:42:16)
    at XMLHttpRequest.request.onreadystatechange (/root/dapp1/Dapp/node_modules/web3-providers-http/src/index.js:92:32)
    at XMLHttpRequestEventTarget.dispatchEvent (/root/dapp1/Dapp/node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
    at XMLHttpRequest._setReadyState (/root/dapp1/Dapp/node_modules/xhr2-cookies/xml-http-request.ts:219:8)
    at XMLHttpRequest._onHttpRequestError (/root/dapp1/Dapp/node_modules/xhr2-cookies/xml-http-request.ts:379:8)
    at ClientRequest.<anonymous> (/root/dapp1/Dapp/node_modules/xhr2-cookies/xml-http-request.ts:266:37)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketOnEnd (_http_client.js:493:9)
    at Socket.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
    at PollingBlockTracker._performSync (/root/dapp1/Dapp/node_modules/eth-block-tracker/src/polling.js:51:24)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

我可以在此环境中将智能合约部署到 rinkeby 测试网,但我无法将智能合约部署到法定人数

I can deploy the smart contractsto rinkeby test net within this environment but I can't get smart contracts to deploy to quorum

我正在使用

节点 v14.16.1

Node v14.16.1

Ubuntu 18.04(64 位)

Ubuntu 18.04 (64 Bit)

法定人数 21.1.0

Quorum 21.1.0

Web3.js v1.3.5

Web3.js v1.3.5

Truffle v5.3.4(核心:5.3.4)

Truffle v5.3.4 (core: 5.3.4)

solidity v0.5.0

solidity v0.5.0

推荐答案

您是否更改了仲裁向导中的默认端口?

Did you change from the default ports in the quorum-wizard?

节点 1 RPC 的默认值为 22000,21000 范围用于 p2p 网络.

The default for the node 1 RPC is 22000, the 21000 range is for p2p networking.

我会根据上面 Satpal 的回答设置主机和端口,如 hdwallet 文档此处.

I would set the host and port per Satpal's answer above, as in the hdwallet documentation here.

这篇关于智能合约不会部署到 goQuorum 区块链的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-16 12:15