Hyper-Ledger Fabric Version 2.0 Launch: New Opportunities in the Making

Acquainting the world with the latest updates in Blockchain technology.

Richie Hammes
Towards Data Science

--

Image credits Acodez

Blockchain technology has been transformative and evolutionary but at certain points, even it fails to leave the required impact. It is widely considered by many experts that blockchain will disrupt many industries and it will revolutionize the way many businesses are done today.

Business stands as one of the more challenging realms to embrace blockchain technology in its pristine conceptual form. Especially, when one has to depend on the blockchain technology for signing contracts. On a decentralized network, the common signing of the contract between parties can make sensitive information public. These small mistakes are sufficient to put your business back to the stone age. At this point, the need for a futuristic and smart solution arises that can work independently and in a hybrid environment.

Hyper-Ledger Fabric has given that opportunity to businesses to script the accessibility limit even in a permissioned network. The concept that evolved with the introduction of non-permissioned blockchain on a decentralized ledger technology makes Hyper-Ledger Fabric so popular. The business fraternity can easily sign the contract and exchange sensitive information without the fear of making information public. But even with all the advantages, there are still the grey areas that have surfaced on Hyper-Ledger Fabric early versions and with the release of updated versions, those drawbacks have been carefully catered. In this blog, we will discuss about what’s new in the Hyper-Ledger Fabric Version 2.0 and how it has resolved the drawbacks of the previous versions.

What’s new in Version 2.0 of Hyper-Ledger Fabric?

Release of New Fabric Chaincode Lifecycle

In the new model of Fabric 2.0 Alpha, a new decentralized governance will be introduced that will release a new process for installing the chaincodes on the peer-to-peer network. With such a feature, now multiple organizations will be agreeing on the same page by setting up different parameters on the Chaincode. Chaincode endorsement policy is one such smart feature that will be introduced. In the endorsement policy, the flow of commands will happen in the following manner;

This is a Sample Policy

{“identities”: [{ “role”: { “name”: “member”, “mspId”: “Org1MSP” }},{ “role”: { “name”: “member”, “mspId”: “Org2MSP” }}],“policy”: {“1-of”: [{ “signed-by”: 0 }, { “signed-by”: 1 }]}}

Sample Policy 2

{“identities”: [{ “role”: { “name”: “member”, “mspId”: “Org1MSP” }},{ “role”: { “name”: “member”, “mspId”: “Org2MSP” }},{ “role”: { “name”: “admin”, “mspId”: “Org1MSP” }}],“policy”: {“2-of”: [{ “signed-by”: 2},{ “1-of”: [{ “signed-by”: 0 }, { “signed-by”: 1 }]}]}}

In both the sample policies, the identities are defining the roles and the MSP of the blockchain network.

Similarly, the policies are defined by an object that contains the nOf format policies, which are also the specific “Signature Set Policy” used for the endorsement where the ’n’ is the minimum number of signatures required for specified signature for the endorsement.

In the Sample Policy 1, there are two identities from the Org1MSP and Org2MSP. In this, the signature set policy says

“policy”: {“1-of”: [{ “signed-by”: 0 }, { “signed-by”: 1 }]}

While defining the endorsement policy, either it should be signed by 0 (With the Role member) that will identify 1 in the identity array (Identity Org1MSP) or a signed array by 1 (with role member) that identifies the identity 2 I the identities array (Identity Org2MSP). In the functionality, the policy of the blockchain will only succeed when the transaction gets signed by members of the Org1MSP or Org2MSP. In the same manner, the Sample Policy 2 will dictate any transaction against this policy. And any change will only be accepted in the blockchain when it will be signed by (i). Admin of the OrdererMSP (ii). Member of any of the organization either the Org1MSP or Org2MSP.

This is the way how the endorsement policy works for your perusal in the decentralized environment. Now, getting back to the way Fabric Chaincode will transform the use cases from now on by;

1. Helping Multiple Organizations Agree to Any Specific Parameter of The Chaincode

In the previous releases, categorically mentioning the 1.x Version release of Fabric, there was provision for just one organization that was having the ability to set up the parameter required for the Chaincode for proper functioning of the network. In this setup, only one organization had the ability to define the parameters of the chaincode.

But the new Hyper-Ledger Fabric Version 2.0 is completely different with greater flexibility given to all the parties. In this way, it is going to support hybrid and native model of the blockchain. Thus, centralized and decentralized, both the environment can be supported. Therefore, whether the chaincodes need one single member or multiple members to endorse any policy on the network before it becomes functional to move the contracts and operations, everything will be possible via the introduction of this new feature.

2. Upgrade Process of the Chaincode Safer Than the Previous Versions

In the past versions of the Hyper-Ledger Fabric, only one organization or also known as the first organization in the network had the authority to upgrade the transactions on the chaincodes. As a result, any new organization in the network had no other option but to download even corrupted chaincodes. In this way, the new members were always subject to risks from the transactions.

But the later version of the Hyper-Ledger Fabric has brought new amendments and that will allow a consensus to be built on the chaincodes. Only after a group consensus, the new chaincode will be implemented to help the blockchain platform function as per the business requirements.

3. Endorsement Policies Simplified with New Updates

The chains in the network need not have repackage or reinstall the chaincodes every now and then for change in the endorsement policies. There are new default policies available for users to seek consensus from the majority of the members.

4. Greater Inspection of the Chaincode Packages

It is very simple to read the chaincodes in readable tar file. As a result, the nodes in the network can easily inspect the chaincode packages and coordinate with others in the network in the installation process.

Introduction of the FabToken in Hyper-Ledger Fabric Version 2.0

In the latest version of the Hyper Ledger Fabric 2.0, the users are given the opportunity to use their assets as tokens. FabToken to be precise will be the token available on this new version for initiating the transactions. It uses an Unspent Transaction Output or UTXO model for the purpose of issue, transfer and redemption of the tokens using the identity and membership infrastructure that is provided by the Hyper-Ledger Fabric Network. Using the FabToken, users can easily create new crypto coin. At the same time, transferring coin from one user to the other will be completely simplified. The users can perform a whole list of transactions and initiate quite redemption of the coin using the FabToken.

FabToken will simplify the creation of the cryptocurrencies in the same manner as ERC 20 Standards. Meaning, Hyper-Ledger Fabric 2.0 will witness the same environment for token creation as Ethereum. This type of advantage will be given to the developers for the very first time on the Hyper-Ledger network. Before you venture out to use the FabToken in your SDK, please keep certain specific stuff in mind.

After the installation of the Hyper-Ledger Fabric SDK, do a quick verification using the docker images. You need to access the FabToken directory for making the cryptocurrency of your choice. Use this command for the purpose: cd $HOME/fabric-samples/fabtoken.

When you plan to use the FabToken for making any cryptocurrency, the need for the Fabric Network will arise. As FabTokens demand a Fabric Network to be up and running. Use the sample node application to test the FabToken. Use the command fabtoken.js along with a shell script named “startFabric.sh”. It will be located in the directory where you are at the moment. Once you are giving these codes, it will launch basic network and JavaScript directory. You need to install the “npm install.” Use the command ./startFabric.sh to instantly kick start the FabToken.

To create the coins using the FabToken, the following screen should appear after installing the SDK,

— — fabtoken.js — start Setting up client side network objects Created client side object to represent the channel

Created client side object to represent the peer

Created client side object to represent the orderer

Successfully setup client sideToken arg: goldcoinToken arg: 1000

Start issue token operation

Start token issue with args goldcoin,1000End issue token operation, returns{ status: ‘SUCCESS’, info: ‘’ } — — fabtoken.js — end

When you will give this command, it will initiate the token creation and help you create tokens as per your expectations.

Conclusion

Hyper-Ledger Fabric has been created with the objective to give better functionality to the businesses. The introduction of the advanced features will aid the usage of the Hyper-Ledger Fabric in different businesses for simplifying and powering up their potentials in the near future.

--

--