Exploring an Enterprise Blockchain Application Using Hyperledger Fabric

The previous chapter, we discussed the Ethereum blockchain. Ethereum is a public blockchain; anyone can read the blockchain data and make legitimate changes. Anyone can write a new block into the chain. Ethereum is fully autonomous and is not controlled by anyone. The smart contract is written in Solidity, as a nearly Turing complete language, that can run on the Ethereum virtual machine (EVM) to execute various transactions. Developers can build and deploy decentralized applications (DApps) using these smart contracts. Ether is a cryptocurrency in Ethereum, and acts as fuel for every operation in Ethereum, including executing smart contracts, DApps, transactions, and so on. However, this is not the only way to build a blockchain.

Blockchains that require an access control layer built into the blockchain nodes to read restricted information on the blockchain can be created. This will limit the number of participants in the network who can transact in the consensus mechanism of the blockchain's network. This kind of blockchain is called a permissioned blockchain.

The differences between public and permissioned blockchains are shown in the following table:

 

Permissionless

Permissioned

Public

Everyone can read the transaction data.

Everyone can validate a transaction in the block.

  • Speed: Poor
  • Consensus: Proof-of-Work
  • Blockchain: Bitcoin, Ethereum
  • Token: Needed

Everyone can read the transaction data.

Only predefined users can validate a transaction.

  • Speed: Good
  • Consensus: Proof-of-Work
  • Blockchain: Ethereum after Casper
  • Token: Needed

Private

Only predefined users can read transaction data.

Only predefined users can validate a transaction.

  • Speed: Good
  • Consensus: Federated byzantine agreement (FBA)
  • Token: Not needed

 

Only predefined users can read transaction data.

Only entitled users can validate a transaction.

  • Speed: Good
  • Consensus: Practical Byzantine Fault Tolerance Algorithm (PBFT)
  • Blockchain: Hyperledger Fabric
  • Token: Not needed

 

Hyperledger Fabric is one such private permissioned blockchains. In this chapter, we will discuss the Hyperledger Fabric blockchain.

Hyperledger Fabric is an open source enterprise blockchain technology. The project was initially contributed by IBM and digital asset. Hyperledger Fabric is one of the blockchain projects hosted by the Linux foundation. The smart contract in Hyperledger Fabric is called chaincode, which defines the business logic for Fabric applications. The modular architecture design enables Fabric to support high degrees of confidentiality, resiliency, flexibility, and scalability. The components in Fabric, such as consensus and membership services, can be plug and play.

In this chapter, we will cover the following topics:

  • Issuance claim
  • Setting up a Hyperledger Fabric environment
  • Write a chaincode
  • Configuring Hyperledger Fabric

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.20.222.168