Search code examples
hyperledger-fabrichyperledgerhyperledger-fabric-ca

How to connect to another computer's channel in hyperledger fabric


How do I join members on a channel configured on another computer?

On one computer, I joined the channel through the consortium definition and authentication process.

I do not know how to access channel B of B computer from Peer of computer A. I would be grateful if you could give me specific instructions on how to access the channel from another computer.


Solution

  • Computer A: Once you create the channel, you have the genesis block. You need the genesis block to join the channel.

    Computer B: When you have the genesis block, you should execute the following commands:

    peer channel join -b mychannel.block
    
    peer channel update -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/Org1MSPanchors.tx --tls --cafile tlsca.example.com-cert.pem
    

    In the channel configuration you should define both Peers