2

The blockchain network has initially 3 orgs. I want to add another org to the network. Therefore I first update the channel configuration containing the required information on that org. After the update it is not possible to join the anchor peer of the org to the channel using "peer channel update". The following error message is shown:

Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 1, but got version 2

For preparing the network to join a new peer the last configuration block is retrieved and modified using "peer channel fetch config". But for adding another anchor peer the genesis block is required which is retrieved by "peer channel fetch 0".

According to my understanding the error emerges because the version number of the genesis block is not incremented after the first update.

How can I add the anchor peer? And how can the issue of the conflicting versions be solved?

B. Chain
  • 33
  • 7
  • Did you resolve the issue? I am also facing the same. I am able to update it once, but if I try again it is throwing the same version conflict. – Shubham Chadokar Nov 19 '19 at 11:04

1 Answers1

1

Not sure, if you are able to solve this as I see it's quite old post.

Here is my 2 cents, in this case we will have to update the Anchor peer for the fourth organization.

In case you haven't got Org4MSPanchors.tx in your channel-artifacts :

configtxgen -profile FourthOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org4MSPanchors.tx -channelID mychannel -asOrg Org2MSP

Then you need to update the same after channel update :

peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org4MSPanchors.tx 

peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org4MSPanchors.tx --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
Venkatachalam
  • 16,288
  • 9
  • 49
  • 77
Anil Singh
  • 21
  • 5