Book Image

Blockchain with Hyperledger Fabric - Second Edition

By : Nitin Gaur, Anthony O'Dowd, Petr Novotny, Luc Desrosiers, Venkatraman Ramakrishna, Salman A. Baset
Book Image

Blockchain with Hyperledger Fabric - Second Edition

By: Nitin Gaur, Anthony O'Dowd, Petr Novotny, Luc Desrosiers, Venkatraman Ramakrishna, Salman A. Baset

Overview of this book

Blockchain with Hyperledger Fabric - Second Edition is a refreshed and extended version of the successful book on practical Hyperledger Fabric blockchain development. This edition includes many new chapters, alongside comprehensive updates and additions to the existing ones. Entirely reworked for Hyperledger Fabric version 2, this edition will bring you right up to date with the latest in blockchain. Using a real-world Trade Finance and Logistics example, with working code available on GitHub, you’ll really understand both how and why Hyperledger Fabric can be used to maximum effect. This book is your comprehensive guide and reference to explore and build blockchain networks using Hyperledger Fabric version 2. This edition of the book begins by outlining the evolution of blockchain, including an overview of relevant blockchain technologies. Starting from first principles, you’ll learn how to design and operate a permissioned blockchain network based on Hyperledger Fabric version 2. You will learn how to configure the main architectural components of a permissioned blockchain network including Peers, Orderers, Certificate Authorities, Channels, and Policies. You’ll then learn how to design, develop, package, and deploy smart contracts, and how they are subsequently used by applications. This edition also contains chapters on DevOps, blockchain governance, and security, making this your go-to book for Hyperledger Fabric version 2.
Table of Contents (18 chapters)
16
Another Book You May Enjoy
17
Index

Defining the terms – what is blockchain?

According to NISTIR 8202 (https://nvlpubs.nist.gov/nistpubs/ir/2018/NIST.IR.8202.pdf),

Blockchains are tamper evident and tamper resistant digital ledgers implemented in a distributed fashion (i.e., without a central repository) and usually without a central authority (i.e., a bank, company, or government). At their basic level, they enable a community of users to record transactions in a shared ledger within that community, such that under normal operation of the blockchain network no transaction can be changed once published. National Institute of Standards and Technology Interagency or Internal Report (NISTIR) 8202: Blockchain Technology Overview

A blockchain supporting a cryptocurrency is permissionless, in the sense that anyone can participate without a specific identity and the ledger is publicly visible to anyone. Such blockchains typically use a consensus protocol based on proof of work (PoW) and economic incentives. In contrast, permissioned blockchains have evolved as an alternative way to run a blockchain with a group of known, identified participants.

A permissioned blockchain provides a way to secure the interactions among a group of known entities that share a mutual business goal but don't fully trust each other, such as businesses that exchange funds, goods (supply chain), or information. The entities in permissioned blockchains can choose to make their ledgers public (viewable by anyone) or private (scoped to participants in the permissioned blockchain). For the remainder of this book, we assume that permissioned blockchains also imply that ledgers are not publicly viewable. A permissioned blockchain relies on the identities of the peers, and in so doing can use traditional Byzantine Fault tolerant (BFT) consensus (or a flavor of BFT or any leader-based consensus protocol).

Blockchains may execute arbitrary, programmable transaction logic in the form of smart contracts, as exemplified by Ethereum (http://ethereum.org/). The scripts in Bitcoin were a predecessor of the concept. A smart contract functions as a trusted distributed application and gains its security from the blockchain and the underlying consensus among the peers.7

Discerning permissioned from permissionless blockchain is vital for enterprises looking to utilize the blockchain platform. The use case dictates the choice of technology, depending on consensus systems, governance models, data structure, and so on. With permissioned blockchains, the idea is to apply traditional technology design (such as three-tier or n-tier models) and IT management disciplines (such as ITIL and system management design principles) but in an incrementally better way, which can be significant. In the diagram that follows, you can see how a consortium of banks could use Hyperledger, a type of permissioned blockchain, for clearing and settlement without relying on a central clearing house:

https://cdn-images-1.medium.com/max/1600/1*EN1XjOiZ29RibHXbD9b-Ew.png

Figure 1.1: How a Hyperledger blockchain can change an organization's infrastructure (Source Hyperledger. Used under Creative Commons Attribution 3.0 Unported. https://creativecommons.org/licenses/by/3.0/)

The core difference between true decentralization versus distributed infrastructure with managed participation is more about governance and rules of engagement on the network. This core difference leads to a new (IT) economic model paving the way to discerning between a utility-based compute model (large, open public networks) or a consortium-based compute infrastructure (consortium-based permissioned networks). This leads to a never-ending debate around permissioned versus permissionless blockchain, and while this chapter will not address the debate, blockchain can present a way to either transform or disrupt current businesses and business models. Most use cases in regulated industries embark on permissioned blockchain models. This is due to regulatory requirements and the economic viability of transaction processing. Whereas permissionless blockchain provides a platform for new business models, such as peer-to-peer (P2P) transactions and disintermediation-led models, by definition, permissionless blockchain architecture relies on a very compute-intensive compute model to ensure transactional integrity. Regardless of the choice in blockchain models, blockchain provides a lot of possibilities for transformation and disruption.

Blockchain has extraordinary potential as a technology platform. In the enterprise, blockchain can provide:

  • A design approach that keeps transaction data, value, and state inherently close to the business logic
  • Secure execution of business transactions, validated through a community, in a secure process that facilitates the trust and robust transaction processing that are foundational to blockchain
  • An alternative, permissioned technology that conforms to existing regulations

Blockchain promises to solve longstanding industry concerns—and this is where its potential can really be seen, with issues like modernizing financial and trade systems and speeding up securities and trade settlements.