我有一个布作曲家网络与一个组织3名同行。
问题是,当我做docker stats
我只看到一个“链代码容器” DEV-peer0.org1而据我所知,应该有开发等每个对等节点(Extra dev peers in hyperledger fabric)
这里是我的连接配置文件
{
"name": "hlfv1",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
},
"channels": {
"composerchannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer1.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer2.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
}
}
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com",
"peer1.org1.example.com",
"peer2.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
]
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://localhost:7050"
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpc://localhost:7051"
},
"peer1.org1.example.com": {
"url": "grpc://localhost:8051"
},
"peer2.org1.example.com": {
"url": "grpc://localhost:9051"
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "http://localhost:7054",
"caName": "ca.org1.example.com"
}
}
}
任何人都知道什么是错的?
当对等端安装chaincode dev的等容器自动生成和chaincode被实例化。
这意味着只有你的网络中的peer0.org1安装了chaincode。
您可以阅读Byfn项目qazxsw POI的解释
当你实例化一个通道上的chaincode容器,才能创建。只有安装chaincode不会创建容器。
可以下面提到的正式文件中找到有关此过程的更多细节。(搜索文本“开发等”)。
本文档解释了每个chaincode容器如何为byfn例如创建。
...
# Create the channel and join for peer 0
docker exec peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel.tx
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/[email protected]/msp" peer0.org1.example.com peer channel join -b composerchannel.block
# Create the channel and join for peer 1
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/[email protected]/msp" peer1.org1.example.com peer channel fetch config -o orderer.example.com:7050 -c composerchannel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/[email protected]/msp" peer1.org1.example.com peer channel join -b composerchannel_config.block
# Create the channel and join for peer 2
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/[email protected]/msp" peer2.org1.example.com peer channel fetch config -o orderer.example.com:7050 -c composerchannel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/[email protected]/msp" peer2.org1.example.com peer channel join -b composerchannel_config.block
if [ "${FABRIC_DEV_MODE}" == "true" ]; then
echo "Fabric Network started in chaincode development mode"
fi
例如:[对于DEV-peer0.org2.example.com-mycc-1.0]
https://github.com/hyperledger/fabric/blob/release-1.4/docs/source/build_network.rst