Blockchain technology is transformative and evolutionary, but in some cases, it has not even left a certain impact. Many experts generally believe that blockchain will disrupt many industries and completely change the way many enterprises operate today.

How to create a new cryptocurrency in hyper ledger fabric 2.0

All businesses are one of the more challenging areas to embrace blockchain technology in the form of original concepts. Especially when it is necessary to rely on blockchain technology to sign contracts. On the decentralized network, both parties sign a contract to disclose sensitive information. These small mistakes are enough to bring your business back to its original era. At this point, we need an intelligent solution that can work independently in a mixed environment.

Hyper ledger fabric provides enterprises with the opportunity to script accessibility restrictions even in licensed networks. The concept evolved with the introduction of unlicensed blockchain in distributed ledger technology makes hyper ledger fabric so popular. Brothers can easily sign contracts and exchange sensitive information without worrying about making the information public. However, despite all the advantages, there are still gray areas in the early versions of hyper ledger fabric, and these shortcomings have been solved with the release of the updated version. In this blog, we will discuss the new features in hyper ledger fabric version 2.0 and how it solves the disadvantages of previous versions.

What are the new features in hyper ledger fabric version 2.0?

Launch new fabric chaincode lifecycle

In the new model of fabric 2.0 alpha, a new decentralized governance will be introduced, which will release a new process of installing chaincode on peer-to-peer networks. With this function, multiple organizations will now reach an agreement on the same page by setting different parameters on chaincode. Chaincode endorsement policy is such a smart feature that it will be introduced. In the endorsement policy, the command flow occurs as follows:

Example policy 1

{

“identiTIes”: [

{ “role”: { “name”: “member”, “mspId”: “Org1MSP” }},

{ “role”: { “name”: “member”, “mspId”: “Org2MSP” }}

],

“policy”: {

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

}

}

Example 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 these two example policies, identity defines the role and MSP of the blockchain network.

Similarly, these policies are defined by the object containing the NOF format policy, which is also a specific “signature set policy” for endorsement, where “n” is the minimum number of signatures required to specify the signature for the endorsement.

In example policy 1, there are two identities from org1msp and org2msp.

“policy”: {

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

}

When defining an endorsement policy, it should be signed by 0 (with role member) who will identify 1 in the identity array (identity org1msp), or 2 identified by 1 (with role member) who will identify identity to the I array (identity org2msp). Functionally, the blockchain strategy will succeed only when the transaction is signed by members of org1msp or org2msp. In the same way, example policy 2 will indicate any transactions related to this policy. And any changes will be accepted in the blockchain only when (I) is signed. Administrator of orderermsp (II). A member of any organization of org1msp or org2msp.

This is how endorsement policy works in a decentralized environment. Now go back to fabric chaincode and start to convert the example from now on;

1. Assist multiple organizations to agree on any specific parameters of chaincode

In the previous version, the 1. X version of fabric was explicitly mentioned, which stipulates that only one organization can be provided with the ability to set the parameters required by chaincode to make the network run normally. In this setting, only one organization can define the parameters of chaincode.

However, the new hyper ledger fabric version 2.0 is completely different, providing greater flexibility for all parties. In this way, it will support the hybrid model and local model of blockchain. Therefore, both centralized and decentralized environments can be supported. No matter chaincode needs one or more members to approve any strategy on the network, then it can transfer contracts and operations. By introducing this new function, everything will be possible.

2. The upgrade process of chaincode is more secure than the previous version

In previous versions of hyper ledger fabric, only one organization or the first organization in the network had the right to upgrade transactions on chaincode. As a result, any new organization in the network has no choice but to download the damaged chaincode.

In this way, new members will always bear the impact of transaction risk. However, the higher version of hyper ledger fabric has brought new revisions, which will allow consensus building on chaincode. Only after the team reaches a consensus can the new chaincode be implemented to help the blockchain platform run according to business needs.

3. Simplify endorsement strategy by updating

Chains in the network do not need to repackage or reinstall chaincode from time to time to change the endorsement policy. There is a new default policy for users to seek consensus from most members.

4. Better check the chaincode package

Reading chaincode in a readable tar file is very simple. Therefore, nodes in the network can easily check the chaincode package and coordinate with other nodes in the network during installation.

Introducing fabtoken in hyper ledger fabric version 2.0

In the latest version of hyper ledger fabric 2.0, users have the opportunity to use their assets as tokens. Specifically, fabtoken will be the token available on this new version to start the transaction. It uses the unspent transaction output or utxo model to issue, transfer and redeem tokens using the identity and membership infrastructure provided by hyper ledger fabric network. With fabtoken, users can easily create new cryptocurrencies. At the same time, it will completely simplify the process of transferring tokens from one user to another. The user can execute the whole transaction list and initiate the full redemption of the token using fabtoken.

After installing the hyper ledger fabric SDK, use the docker image for quick authentication. You need to access the fabtoken directory to select the desired token. Use this command for this purpose: CD $home / fabric samples / fabtoken.

When you plan to use fabtoken to make any token, ask the fabric network to start and run. Use the sample node application to test the fabtoken, using the command fabtoken.js and a shell script named “startfabric. Sh”. It will be located in your current directory. After entering this code, it will launch the fabric network and JavaScript directory. You need to install “NPM install”. Use the command/ Startfabric.sh starts the fabtoken immediately.

To create a token using fabtoken, the following screen should appear after installing the SDK,

1. – fabtoken.js – start setting the client network object. The client object has been created to represent the channel

2. Create a client object representing peer

3. Create a client object representing orderer

Successfully installed client sidetoken Arg: goldcointoken Arg: 1000

Start operation issue token

Use args GoldCoin to start issuing tokens, 1000end to issue tokens, and return {status: ‘success’, info:’} – fabtoken.js – end

When you give this command, it will initiate token creation and help you create tokens as you wish.

conclusion

The purpose of creating hyper ledger fabric is to provide better functions for enterprises. The advanced features introduced will help use hyper ledger fabric in different enterprises to simplify and enhance their potential in the near future.

Responsible editor; zl

Leave a Reply

Your email address will not be published. Required fields are marked *