首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >超级分类账结构:“错误验证ReadSet:在版本1处读取预期密钥[组]/通道/应用程序,但得到版本3”

超级分类账结构:“错误验证ReadSet:在版本1处读取预期密钥[组]/通道/应用程序,但得到版本3”
EN

Stack Overflow用户
提问于 2019-01-01 21:20:55
回答 1查看 465关注 0票数 3

我在这里面临一个问题,我用一个组织ORG1 (使用orderer orderer1)创建了一个通道,然后通过使用cli命令更新通道配置块添加了ORG2,然后添加了ORG3:

代码语言:javascript
复制
peer channel update -f nada_update_in_envelope.pb -c $CHANNEL_NAME -o orderer.example.com:7050 --tls --cafile $ORDERER_CA

接下来我要做的是为每个组织添加一个锚对等点。通过运行每个组织的锚对等点:

代码语言:javascript
复制
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文件生成的:

代码语言:javascript
复制
../bin/configtxgen -profile OneOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/ORG1MSPanchors.tx -channelID mainchannel -asOrg ORG1MSP
EN

回答 1

Stack Overflow用户

发布于 2021-01-18 01:54:35

根本原因是您的/Channel/Application版本在添加了2次新组织后升级到了3。但在"configtxgen -help“中,您可以看到以下内容:

代码语言:javascript
复制
 -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:

代码语言:javascript
复制
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版,并将其编码:

代码语言:javascript
复制
 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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53999025

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档