Programming Hyperledger Fabric
Creating Permissioned Blockchains
Siddharth Jain
  • MEAP began June 2020
  • Publication in Spring 2021 (estimated)
  • ISBN 9781617297236
  • 400 pages (estimated)
  • printed in black & white

The author has done justice to it by really starting from the basics and explaining with wit the core concepts and taking the reader slowly to the core of Fabric.

Satej Kumar Sahu
Because blockchain applications store data in immutable decentralized databases, they allow for fast account reconciliation, secure tracking and tracing, transparent records, and no costly third-party auditing—all huge benefits to modern business! Focused on building permissioned, private business applications rather than cryptocurrencies, Programming Hyperledger Fabric teaches you how to build Blockchain applications that are useful and functional in the real world. Using the flexible, modular, and built-for-enterprise Hyperledger Fabric framework, you’ll learn how to develop and effectively deploy enterprise-ready blockchain applications to production across multiple servers in the cloud.

About the Technology

Hyperledger Fabric is a free, open source, and enterprise-grade framework for creating industrial blockchain applications. Fabric has been used to create online marketplaces, transparent insurance claims processes, and supply chain management apps for some of the world’s biggest companies. Its flexible SDK simplifies many challenges of blockchain development, letting developers write smart contracts and build client applications in either Java, JavaScript, or Go. The decentralized architecture of Fabric blockchain apps means that all parties must agree before a change is committed to a shared database—while still preserving privacy and data protection with Fabric’s selective sharing features.

About the book

Programming Hyperledger Fabric is a hands-on guide to developing blockchain applications for enterprise use cases such as supply chains, financial accounting, and logistics. You’ll learn by building a complete decentralized application for tracking products in a pharmaceutical supply chain, setting up infrastructure, securing communications, and establishing consensus chapter by chapter. The book is focused on solving the problems of deploying blockchain apps to production and is filled with reliable tips and tricks for utilizing Docker and other technologies, handling Fabric networks, and troubleshooting Fabric apps. By the time you’re done, you’ll be ready to bring effective and useful business blockchain apps from tomorrow into today.
Table of Contents detailed table of contents

Part 1: The Basics

1 Blockchain Primer

1.1 What is a Blockchain?

1.1.1 How does it all work?

1.1.2 So what’s the big deal?

1.2 Two Types of Blockchains: Permissioned and Permissionless

1.3 What is Hyperledger Fabric?

1.3.1 What is AWS Blockchain, Azure Blockchain Workbench, IBM Blockchain (Oh My!)?

1.4 Why use Blockchain?

1.4.1 Cost of Verification

1.4.2 Cost of Networking

1.4.3 Raising Capital

1.5 How Blockchain Works?

1.6 How Fabric Works?

1.7 Fabric’s ordering service. Introduction to Consensus and CFT vs. BFT

1.8 Blockchain vs. Shared Database

1.9 Bitcoin’s Proof of Work (PoW) and other consensus protocols

1.10 Permissioned vs. Permissionless Blockchains

1.11 Challenges facing Blockchain Technology

1.11.1 Challenges facing permissionless blockchains

1.11.2 Challenges facing permissioned blockchains

1.11.3 Challenges common to both

1.12 Which Blockchain Platform should I use?

1.13 Summary

1.14 Further Reading

2 AA Closer look at Fabric

2.1 How are identities managed in Fabric?

2.1.1 Fabric CA

2.1.2 How client application interacts with Fabric CA?

2.1.3 Alternate designs

2.1.4 Idemix Certificates

2.2 Choosing the right database for your key-value store

2.3 Introducing Docker

2.4 Securing communication between machines using Transport Layer Security (TLS) and Client Authentication

2.5 Steps to provision a Fabric network

2.5.1 Collective Decisions

2.5.2 Individual (i.e., per organization) Decisions

2.5.3 Provisioning Steps

2.6 Fabric Consensus and Forks

2.7 Thought Exercise: Is Git a Blockchain?

2.8 Summary

2.9 Further Reading

3 Writing Your First Smart Contract

3.1 The Fabric Codebase

3.2 Defining the problem: Tracking assets through a supply chain

3.3 The Smart Contract Boilerplate: Getting to know Node and Typescript

3.3.1 package.json

3.3.2 Installing dependencies

3.3.3 Main Entry Point

3.3.4 Compiling Typescript

3.3.5 Checking the code for style violations

3.3.6 Running unit tests

3.3.7 Running the smart contract

3.4 Writing the smart contract

3.4.1 create

3.4.2 Buffers

3.4.3 update

3.4.4 verify

3.5 Restrictions on smart contracts

3.6 Summary

3.7 Further Reading

Part 2: Provisioning a Network

4 Provisioning a 3-Org Local Test Network

5 Debugging Fabric

6 Provisioning a Channel and Installing the Chaincode

7 Performing transactions on the Network

8 Dockerizing the Network

Part 3: Scaling for Production

9 Deploying to the Cloud

10 Using Fabric CA for Issuing Identities

11 Securing Communication with TLS

Part 4: Developing Client Applications

12 Provisioning an OpenLDAP server

13 Developing Client Application - Part I

14 Developing Client Application - Part II


Appendix A: Installing Software and Prerequisites

A.1 Installing Xcode CLI tools

A.2 Installing Homebrew

A.3 Installing Git

A.4 Installing Node

A.5 Installing Go and Delve

A.6 Installing Fabric Source Code

A.7 Installing Docker CE

A.7.1 Mac

A.7.2 Linux

A.8 Installing Fabric Binaries, Samples and Docker Images

A.9 Installing VS Code

A.10 Installing Azure CLI

A.11 Installing SourceTree

A.12 Other tools

A.13 ~/.bash_profile

Appendix B: Bonus Chapter: The Bitcoin

B.1 Anatomy of a Bitcoin transaction

B.1.1 Understanding a cryptographic hash

B.1.2 Public keys and addresses

B.1.3 Digital Signatures

B.1.4 How is the ownership of UTXOs proved?

B.1.5 Transaction Validation

B.1.6 Types of Transactions

B.2 Handling concurrency: The mining network

B.2.1 Why batch transactions into blocks?

B.2.2 Collisions, forks, conflict resolution and the myth of immutability

B.3 Making the ledger secure and tamper-proof: The Proof of Work

B.4 Bitcoin Lab

B.4.1 BlockHeader.ts

B.4.2 Block.ts

B.4.3 Blockchain.ts

B.4.4 Putting it all together

B.4.5 Hacking the blockchain

B.5 Summary

B.6 Further Reading

B.7 Exercises

What's inside

  • Where Fabric fits in to the blockchain landscape
  • The ins and outs of deploying real-world applications
  • Developing smart contracts and client applications in Node
  • Debugging and troubleshooting
  • Securing production applications

About the reader

For experienced software developers. Examples are written in TypeScript. No prior experience with Hyperledger or other blockchain technologies is required.

About the author

Siddharth Jain is a Data Management Fellow at Johnson & Johnson. He holds a Ph.D. in electrical engineering and computer sciences from the University of California, Berkeley and has more than 10 years of experience developing large-scale commercial applications and products, such as Bing Maps, Uber Movement, and other sites such as

placing your order...

Don't refresh or navigate away from the page.
Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
print book $29.99 $59.99 pBook + eBook + liveBook
Additional shipping charges may apply
Programming Hyperledger Fabric (print book) added to cart
continue shopping
go to cart

eBook $19.99 $47.99 3 formats + liveBook
Programming Hyperledger Fabric (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks