HomeBlockchainBlockchain DIYDecentralized Setup with No System Channel

Decentralized Setup with No System Channel

Audio version of the article

Introduction

Overview

Fabric Network Setup

Decentralized Setup with No System Channel 16

Demonstration

Step 1: Prepare a Fabric host and obtain the setup

cd fabric-samples/
git clone https://github.com/kctam/peerowned-nosyschannel.gitcd peerowned-nosyschannel

Step 2: Create crypto material for the whole network

docker-compose downmkdir -p /tmp/hyperledger/
rm -rf /tmp/hyperledger/*

Decentralized Setup with No System Channel 17

docker-compose up -d rca-org1 rca-org2 ca-tls
Decentralized Setup with No System Channel 18
Decentralized Setup with No System Channel 19
sudo chown -R vagrant:vagrant /tmp/hyperledger/*
Decentralized Setup with No System Channel 20
./allCAnReg.sh./enrollAllOrgs.sh
Decentralized Setup with No System Channel 21
Decentralized Setup with No System Channel 22

Step 3: Bring up all components

docker-compose up -d
Decentralized Setup with No System Channel 23

Decentralized Setup with No System Channel 24
https://miro.medium.com/max/4800/0*RvtMJK9skEFUeNGf

Decentralized Setup with No System Channel 25

Step 4: Create application channel and join all components to the channel

source term-org1
source term-org2

Decentralized Setup with No System Channel 26
Terminal for org1 orderer1-org1 is used

Decentralized Setup with No System Channel 27
Terminal for org2 orderer1-org2 is used

configtxgen -profile SampleAppChannelEtcdRaft -configPath ${PWD} -outputBlock mychannel.block -channelID mychannel
# to show channel status
osnadmin channel list -o localhost:7080 --ca-file $ORDERER_CA --client-cert /tmp/hyperledger/org1/admin/tls-msp/signcerts/cert.pem --client-key /tmp/hyperledger/org1/admin/tls-msp/keystore/key.pem# join channel
osnadmin channel join --channelID mychannel --config-block mychannel.block -o localhost:7080 --ca-file $ORDERER_CA --client-cert /tmp/hyperledger/org1/admin/tls-msp/signcerts/cert.pem --client-key /tmp/hyperledger/org1/admin/tls-msp/keystore/key.pem

Decentralized Setup with No System Channel 28
No system channel and application channels are in orderer1-org1

Decentralized Setup with No System Channel 29
Join orderer1-org1 to application channel

Now check again.

Decentralized Setup with No System Channel 30
orderer1-org1 joins mychannel

# to show channel status
osnadmin channel list -o localhost:8080 --ca-file $ORDERER_CA --client-cert /tmp/hyperledger/org2/admin/tls-msp/signcerts/cert.pem --client-key /tmp/hyperledger/org2/admin/tls-msp/keystore/key.pem# join channel
osnadmin channel join --channelID mychannel --config-block mychannel.block -o localhost:8080 --ca-file $ORDERER_CA --client-cert /tmp/hyperledger/org2/admin/tls-msp/signcerts/cert.pem --client-key /tmp/hyperledger/org2/admin/tls-msp/keystore/key.pem

Decentralized Setup with No System Channel 31
orderer1-org2 joins mychannel

peer channel join -b mychannel.block

Decentralized Setup with No System Channel 32
Join peer1-org1 to mychannel

Decentralized Setup with No System Channel 33
Join peer1-org2 to mychannel

Decentralized Setup with No System Channel 34
Joining components to mychannel

Step 5: Test the network with chaincode sacc

Decentralized Setup with No System Channel 35

Decentralized Setup with No System Channel 36

Decentralized Setup with No System Channel 37

Decentralized Setup with No System Channel 38

Summary

This article has been published from the source link without modifications to the text. Only the headline has been changed.

Source link

- Advertisment -Decentralized Setup with No System Channel 40Decentralized Setup with No System Channel 41

Most Popular

- Advertisment -Decentralized Setup with No System Channel 42Decentralized Setup with No System Channel 43