我正在将Basic网络与更改后的组织“用户”和“ legaldocxauth”以及fabcar链代码一起使用(以后我将根据用例更改链代码功能),但是每当我在实例化链代码时运行startFabric.sh给出错误“ 无法反序列化创建者身份,错误的usermsp msp未知”
Docker最新版本18.09.0
我更改了其他网络文件configtx,docker-compose yaml和 相应地,crypt configtx Msps
这是Startfabric.sh的代码
set -e
# don't rewrite paths for Windows Git Bash users
export MSYS_NO_PATHCONV=1
starttime=$(date +%s)
LANGUAGE=${1:-"golang"}
CC_SRC_PATH=user/go
if [ "$LANGUAGE" = "node" -o "$LANGUAGE" = "NODE" ]; then
CC_SRC_PATH=/opt/gopath/src/github.com/fabcar/node
fi
# clean the keystore
rm -rf ./../client/hfc-key-store
docker exec -e "CORE_PEER_LOCALMSPID=userMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/user.example.com/users/Admin@user.example.com/msp" cli peer chaincode install -n newCC -v 2.0 -p "$CC_SRC_PATH" -l "$LANGUAGE"
docker exec -e "CORE_PEER_LOCALMSPID=userMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/user.example.com/users/Admin@user.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n newCC -l "$LANGUAGE" -v 2.0 -c '{"Args":[""]}' -P "OR ('userMSP.member','legaldocxauthMSP.member')"
sleep 10
docker exec -e "CORE_PEER_LOCALMSPID=userMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/user.example.com/users/Admin@user.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n newCC -c '{"function":"initLedger","Args":[""]}'
printf "\nTotal setup execution time : $(($(date +%s) - starttime)) secs ...\n\n\n"
printf "Start by installing required packages run 'npm install'\n"
printf "Then run 'node enrollAdmin.js', then 'node registerUser'\n\n"
printf "The 'node invoke.js' will fail until it has been updated with valid arguments\n"
printf "The 'node query.js' may be run at anytime once the user has been registered\n\n"