Configuration Update on System Channel and Application Channel in Hyperledger Fabric

Introduction

Early this July my article System Channel and Application Channel was about a tutorial “Adding an Org to a Channel” (link), driven by a question from my readers. I received another question this week which again led me to revisit this topic. The question was about modifying a batch timeout (amount of time to wait before creating a block) in Hyperledger Fabric. While it is quite clear that we can update configuration through the standard (and tedious) process, what puzzled me at the beginning is which channel I should work on: system channel or application channel.

Test Overview

Here two tests are designed. In both tests, we are bringing up Test Network (v2.2), which is composed of one orderer organization and two peer organizations. Channels are created and all peers join the channels, and chaincodes are deployed on the channels. Test Network comes with a script network.sh that facilitates our deployment in channels and chaincodes.

Test 1: Different configuration between two channels

Step 1.1: Bring up Test Network, channel-one and deploy chaincode SACC

cd test-network./network.sh up createChannel -c channel-one./network.sh deployCC -c channel-one -ccn sacc -ccp ../chaincode/sacc/
docker logs -f peer0.org1.example.com
Modify the Batch Timeout from 2s (default) to 10s
./network.sh createChannel -c channel-two

Test 2: System channel configuration update

Step 2.1: Bring up Test Network, channel-one and deploy chaincode SACC

cd test-network./network.sh up createChannel -c channel-one./network.sh deployCC -c channel-one -ccn sacc -ccp ../chaincode/sacc/
./network.sh createChannel -c channel-two

Summary

Through this small exercise, we have learnt something about system channel and application channel. First, configurable parameters such as batch timeout are modified at the application channel, and different application channels can have their own batch timeout to meet their requirement. Meanwhile, when an application channel is created, it obtains the configuration currently in the system channel. If the parameters in the system channel are modified, this change does not have impact on those created application channels, and those created after the modification will honour the change.

Visit http://www.ledgertech.biz/kcarticles.html for all my works. Reach me on https://www.linkedin.com/in/ktam1/ or follow me @kctheservant in Twitter.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store