我在这里面临一个问题,我用一个组织ORG1 (使用orderer orderer1)创建了一个通道,然后通过使用cli命令更新通道配置块添加了ORG2,然后添加了ORG3:
peer channel update -f nada_update_in_envelope.pb -c $CHANNEL_NAME -o orderer.example.com:7050 --tls --cafile $ORDERER_CA接下来我要做的是为每个组织添加一个锚对等点。通过运行每个组织的锚对等点:
peer channel update -o orderer1.example.com:7050 -c mainchannel -f channel-artifacts/org1/channels/mainchannel/mainchannel/ORG1MSPanchors.tx --tls --cafile <path>我从订货者的日志中得到的错误是:
2019-01-01 13:50:19.095 UTC orderer.common.broadcast ProcessMessage ->警告076频道:主频道因错误而拒绝广播来自172.25.0.23:39260的配置消息:错误授权更新:错误验证ReadSet: readset预期密钥组/通道/应用程序在版本1,但获得第3版
知道我在声明网络和创建通道之前创建的ORG1MSPanchors.tx文件中可以更改什么来设置正确的配置版本吗?
P.S: ORG1MSPanchors.tx文件是通过运行configtx.yaml文件生成的:
../bin/configtxgen -profile OneOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/ORG1MSPanchors.tx -channelID mainchannel -asOrg ORG1MSP发布于 2021-01-18 01:54:35
根本原因是您的/Channel/Application版本在添加了2次新组织后升级到了3。但在"configtxgen -help“中,您可以看到以下内容:
-outputAnchorPeersUpdate string
[DEPRECATED] Creates a config update to update an anchor peer (works only with the default channel creation, and only for the first update)因此,对于非第一次更新,您必须自己编辑这个ORG1MSPanchors.tx:
configtxlator proto_decode --input ./channel-artifacts/ORG1MSPanchors.tx --type common.Envelope >channel-artifacts/ORG1MSPanchors.json然后将"payload.data.config_update.read_set.groups.Application.version“和"payload.data.config_update.write_set.groups.Application.version”更改为第3版,并将其编码:
configtxlator proto_encode --input ./channel-artifacts/ORG1MSPanchors.json --type common.Envelope >./channel-artifacts/ORG1MSPanchors.tx现在,您可以使用“对等通道更新”来更新ORG1的锚节点。
事实上,正式的步骤应该是tutorial.html#updating-the-channel-config-to-include-an-org3-anchor-peer-optional
https://stackoverflow.com/questions/53999025
复制相似问题