我被一个奇怪的情况困住了。我在码头环境中创建了一个带有Hyperledger的本地Ethereum网络。我尝试使用to (同一个码头网络中的不同容器)将合同部署到rpc节点。
1.)当我在对接-组合中为Besu节点配置了静态IP,并且我在松露中使用了服务名称时,契约部署就可以了。
2.)如果我不配置静态is,在docker-组合中,由于某种原因合同部署会被卡住。为什么?
我试图看看是否存在网络连接问题。通过主机名和IP(由docker动态分配)调用Besu节点。这是我看到的跟踪日志,它被无限期地卡住了-
truffle-envt-besu-setup |
truffle-envt-besu-setup | 1_initial_migration.js
truffle-envt-besu-setup | ======================
truffle-envt-besu-setup |
truffle-envt-besu-setup | Deploying 'Migrations'
truffle-envt-besu-setup | ----------------------
truffle-envt-besu-setup | > transaction hash: 0x1a673f0f62c4f0690eb444d4922cd257b16f72bfff3e4d0362a50f3f9353ede6
truffle-envt-besu-setup | - Blocks: 0 Seconds: 0这是码头编剧的片段-
node2.eth.local:
image: hyperledger/besu:1.3.9
command: >-
--data-path=/var/lib/besu --genesis-file=/var/lib/besu/genesis.json --rpc-http-enabled
--rpc-http-host=0.0.0.0 --rpc-ws-enabled --rpc-ws-host=0.0.0.0 --discovery-enabled=false
--p2p-host=0.0.0.0 --rpc-http-api=ETH,NET,WEB3,DEBUG,MINER,ADMIN,TXPOOL,CLIQUE
--rpc-ws-api=ETH,NET,WEB3,DEBUG,MINER,ADMIN,TXPOOL,CLIQUE --rpc-http-cors-origins='*'
--host-whitelist='*' --min-gas-price=0
ports:
- 8545:8545
- 8546:8546
volumes:
- './besu/node2:/var/lib/besu'
networks:
local_net:
rpc.node2.eth.local:
image: pegasyseng/ethsigner:0.4.0
command: >-
--chain-id=12345 --downstream-http-host=node2.eth.local --downstream-http-port=8545
--http-listen-host=0.0.0.0 --http-listen-port=8555 file-based-signer
--password-file=/var/lib/ethsigner/password.txt --key-file=/var/lib/ethsigner/keystore/account.txt
ports:
- 8555:8555
volumes:
- './ethsigner/node2:/var/lib/ethsigner'
depends_on:
- node2.eth.local
networks:
local_net:
networks:
local_net:
driver: bridge下面是块菌-config.js文件的片段-
besu_docker: {
host: "rpc.node2.eth.local",
network_id: "*",
port: 8555,
gas: 4500000,
gasPrice: 0
},有什么明显的东西我错过了吗?
发布于 2020-05-15 15:46:58
我认为您的truffle-config.js中有错误--端口应该是8545而不是8555。
https://ethereum.stackexchange.com/questions/82092
复制相似问题