I understand that it is possible to specify the endorsement policy using -o or -O options during composer network deploy or composer network start, but given that composer connection profile contains the connection information for only one MSP/Org, how does composer sends the transaction proposal to the Peers of other Orgs in the endorsement policy?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The connection profile has information which represents the organisation to which you belong (mspID), this doesn't restrict from sending transaction proposals to other organisations' peers. To do so all you need to do is add those peer definitions to your connection profile, but do not include the eventURL for those peers as you are unlikely to be authorised to listen for events from those peers, so for example your connection profile may look like
{
"type": "hlfv1",
"orderers": [
{ "url" : "grpc://consortium_orderer:7050" }
],
"ca": { "url": "http://myorg_ca:7054",
"name": "ca.example.com"
},
"peers": [
{
"requestURL": "grpc://myorg_peer:7051",
"eventURL": "grpc://myorg_peer:7053"
},
{
"requestURL": "grpc://otherorg_peer:7051"
}
],
"keyValStore": "/home/vagrant/.composer-credentials",
"channel": "mychannel",
"mspID": "Org1MSP",
"timeout": 300
}