Tools, FAQ, Tutorials:
Join Peer to BYFN Network Channel
How to join the default peer to a BYFN network Channel?
✍: FYIcenter.com
You can follow this tutorial to join the default peer to a BYFN network Channel.
In last tutorial, we have created a transaction file, channel.tx, that contains a transaction message to create a channel called "mychannel" on the BYFN network.
Now we need connect to the BYFN CLI container to submit it the running BYFN network.
1. Connect the FYBN CLI container:
$ docker exec -it cli bash bash-4.4#
2. Verify if the channel.tx file is deployed on the CLI container or not:
bash-4.4# ls -l channel-artifacts/ total 28 -rw-r--r-- 1 1000 1000 284 Apr 1 23:59 Org1MSPanchors.tx -rw-r--r-- 1 1000 1000 284 Apr 1 23:59 Org2MSPanchors.tx -rw-r--r-- 1 1000 1000 346 Apr 1 23:57 channel.tx -rw-r--r-- 1 1000 1000 12980 Apr 1 23:56 genesis.block
3. Submit transaction file, channel.tx, to create a channel:
bash-4.4# peer channel create -o orderer.example.com:7050 -c mychannel \ -f ./channel-artifacts/channel.tx --tls \ --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto\ /ordererOrganizations/example.com/orderers/orderer.example.com/msp\ /tlscacerts/tlsca.example.com-cert.pem [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized [cli.common] readBlock -> INFO 002 Got status: &{NOT_FOUND} [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized [cli.common] readBlock -> INFO 004 Received block: 0
4. Verify the output file, mychannel.block, which contains the channel information:
bash-4.4# ls -l mychannel.block -rw-r--r-- 1 root root 15994 Apr 12 00:52 mychannel.block
5. Join the default peer to the "mychannel":
bash-4.4# peer channel join -b mychannel.block [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
6. Verify channels joined by the default peer:
bash-4.4# peer channel list [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized Channels peers has joined: mychannel
peer0.org1.example.com has joined the "mychannel".
⇒ Switch Default Peer on BYFN CLI Container
⇐ CORE_PEER_* Environment Variables on BYFN CLI
2020-09-30, 1130🔥, 0💬
Popular Posts:
How to login to the Developer Portal internally by you as the publisher? Normally, the Developer Por...
How to make application release build with Visual Studio 2017? If you want to make a final release b...
How To Break a File Path Name into Parts in PHP? If you have a file name, and want to get different ...
How to add request URL Template Parameters to my Azure API operation to make it more user friendly? ...
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...