javascript - 尝试使用松露将智能合约部署到我的区块链时不断出错
问题描述
我有一组我已经编译并部署到 rinkeby 测试网络的智能合约。我现在需要将其部署到在 IBFT 共识上运行的私有 goquorum 区块链。区块链是使用 quorum-wizard 构建的。它在我运行 ./start.sh 时开始
当我在我的松露项目的根目录中时,我运行 sudo truffle deploy --reset --network quorum 我收到以下错误。
> 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)
这是我的 truffle-config.js
const HDWalletProvider = require("@truffle/hdwallet-provider");
const mnemonic = "not my real mn emon ic words this is pl cfff was";
module.exports = {
networks: {
rinkeby: {
provider: function() {
return new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3/2342342342344345344343434");
},
network_id: '*',
timeoutBlocks: 100000,
networkCheckTimeout:2000000
},
// https://www.trufflesuite.com/docs/truffle/distributed-ledger-support/working-with-quorum
quorum: {
provider: function() {
return new HDWalletProvider(mnemonic, "http://127.0.0.1:21000/");
},
network_id: '*',
type: "quorum",
timeoutBlocks: 1000000,
networkCheckTimeout:20000000
}
},
compilers: {
solc: {
version: "0.5.0",
settings: {
optimizer: {
enabled: true, // Default: false
runs: 1000 // Default: 200
},
evmVersion: "homestead" // Default: "byzantium"
}
}
}
};
我在用
节点 v14.16.1
Ubuntu 18.04(64 位)
法定人数 21.1.0
Web3.js v1.3.5
松露 v5.3.4(核心:5.3.4)
坚固性 v0.5.0
解决方案
推荐阅读
- ios - ld:架构 x86_64 的 7 个重复符号 clang:错误:链接器命令失败,退出代码 1 反应原生 ios 应用程序构建失败
- python-3.x - 为什么我的函数中的代码在 VSCode 中以白色文本显示
- ajax - JSF Primefaces:如何更改焦点事件的输入值?
- mysql - 在 MySQL 中,当 INT 数据类型被明确声明为 UNSIGNED 时和不是时有什么区别?
- python - 比较列值并相应地分配新值
- java - ConfigObj 在 conf 文件中添加新行
- python - Numpy 数组根据条件返回行
- flutter - Flutter:带有 StreamBuilder 小部件的可滚动小部件
- python - 错误 [07002] [Microsoft][ODBC Microsoft Access Driver] 参数太少。执行 DELETE 时预期为 1
- python - 使用 Beautifulsoup 抓取数据时如何忽略 utf-8 编码