Reputation: 1319
I have an existing network on channel A.
Suppose a new organization wants to connect with me, but on different channel, for ex: channelB.
So instead of following this tutorial: https://hyperledger-fabric.readthedocs.io/en/release-1.2/channel_update_tutorial.html, can I just do what we do for a fresh network setup?
I don't need to get the last config block and compute the delta? Because, it's a new channel..
If the above one is correct, than my next question is how to initiate the anchor peer transaction from both the org separately?
Is this the correct way:
configtxgen -profile OrgsChannel -outputAnchorPeersUpdate anchor.tx -channelID channelB -asOrg orgA
Also, does the order matters? Can I join all peers of first org in channel and send the anchor peer txn and than join all peers of second org and again send new anchor peer txn for this org.
Are these steps sufficient for adding a new org on new channel and establishing the connectivity with them?
Thanks for any help!!
Upvotes: 0
Views: 826
Reputation: 89
Also we need to update system channel genesis block, new organization should be added in consortium then only new channel could be created.
Upvotes: 1
Reputation: 11
Yes, you edit configtx.yaml, then use configtxgen to create channel configuration and anchor update transaction for each org.
You can use either SDK or script to create channel and update anchor peer as long as the orderer is running. The steps that you described are correct. The order of anchor-updates does not matter. You can update the anchor before any or all peers are started or joined the channel.
When you use script to join peers from the second org to a channel created by the first org, you may need to fetch the genesis block of the channel, e.g., "peer channel fetch oldest mychannel.block -c ....", and then use it to join the peers.
Upvotes: 0