Does composer support endorsement policy? How?

泄露秘密 提交于 2019-12-23 06:49:11

问题


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
}


来源:https://stackoverflow.com/questions/46133737/does-composer-support-endorsement-policy-how

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!