Reader small image

You're reading from  Hyperledger Cookbook

Product typeBook
Published inApr 2019
Reading LevelBeginner
PublisherPackt
ISBN-139781789534887
Edition1st Edition
Languages
Concepts
Right arrow
Authors (3):
Xun (Brian) Wu
Xun (Brian) Wu
author image
Xun (Brian) Wu

Xun (Brian) Wu is a senior blockchain architect and consultant. With over 20 years of hands-on experience across various technologies, including Blockchain, big data, cloud, AI, systems, and infrastructure, Brian has worked on more than 50 projects in his career. He has authored nine books, which have been published by O'Reilly, Packt, and Apress, focusing on popular fields within the Blockchain industry. The titles of his books include: Learn Ethereum (First Edition), Learn Ethereum (Second Edition), Blockchain for Teens, Hands-On Smart Contract Development with Hyperledger Fabric V2, Hyperledger Cookbook, Blockchain Quick Start Guide, Security Tokens and Stablecoins Quick Start Guide, Blockchain by Example, and Seven NoSQL Databases in a Week.
Read more about Xun (Brian) Wu

Chuanfeng Zhang
Chuanfeng Zhang
author image
Chuanfeng Zhang

Chuanfeng Zhang is enthusiastic and passionate about technologies and trading and data analysis, with 20 years' experience in both the technology and finance sectors. He has worked at top investment banks and technology firms including Goldman Sachs, Credit Suisse, and IBM. He has led, designed, and successfully developed many enterprise-scale systems with diverse architectures for algorithmic trading, order management, risk management, business intelligence, and more.
Read more about Chuanfeng Zhang

Zhibin (Andrew) Zhang
Zhibin (Andrew) Zhang
author image
Zhibin (Andrew) Zhang

Andrew Zhang is an IBM Watson Cloud Advocate. He has many years of experience in cloud platforms, big data analytics, and machine learning. He works with start-ups and enterprise clients in the government, education, healthcare, and life science industries. His current interests are in embedding AI and blockchain open source technologies for consumer and enterprise applications. In his spare time, Andrew enjoys reading, traveling, and spending time with his family and friends.
Read more about Zhibin (Andrew) Zhang

View More author details
Right arrow

Preface

Hyperledger is an umbrella project of modular open source frameworks and tools for building and experimenting with blockchains. The Hyperledger Cookbook provides hands-on experiences and in-depth illustrations covering the full spectrum of Hyperledger offerings. You will not only learn a range of permissioned business blockchain technologies, including Fabric, Sawtooth, Burrow, Iroha, and Indy, but also a set of tools to work with these blockchain frameworks, including Composer, Explorer, and Caliper.

Each chapter contains a set of recipes that helps the reader to become more familiar with Hyperledger blockchain and its tools. The examples in this book will help readers to apply Hyperledger technologies to their own problems.

Who this book is for

This book is for blockchain developers who want to learn about the permissioned blockchain technologies for business offered by Hyperledger. With an abundance of recipes covering distributed ledger networks, smart contract engines, client libraries, and various tools in Hyperledger technologies, blockchain developers can apply them to rapidly develop decentralized DLT systems for their enterprises. For more experienced blockchain developers, the recipes covered in this book might expose them to new ways of thinking in terms of how to select and build enterprise blockchain for their business use cases.

What this book covers

Chapter 1, Working with Hyperledger Fabric, concentrates on the fundamental Fabric architecture and components. The recipes cover installation, building a Fabric network, adding an org to a channel, integrating with CouchDB, and writing your first Fabric application.

Chapter 2, Implementing Hyperledger Fabric, is dedicated to building a simple device asset management DApp. The example covers recipes designed to show how to design and write a chaincode smart contract, compile and deploy Fabric chaincode, run and test the smart contract, develop a DApp, and interact with Hyperledger Fabric chaincode through the client SDK API.

Chapter 3, Modeling a Business Network Using Hyperledger Composer, contains recipes designed to show how to use the Composer tool to rapidly develop use cases, build blockchain business networks using the Composer model language, deploy, test and export BNA using the Composer CLI tool, and interact with Composer through the SDK.

Chapter 4, Integrating Hyperledger Fabric with Explorer, this includes installing, setting up, and configuring Hyperledger Explorer, integrating with the Hyperledger framework, and running the Hyperledger Explorer application.

Chapter 5, Working with Hyperledger Sawtooth, includes recipes for installing, deploying, and running DApps with Hyperledger Sawtooth. With the help of Hyperledger Sawtooth's modular architecture, distributed ledger, distributed data storage, and decentralized consensus, several examples demonstrate how to build a transaction processor, design a namespace and address, grant permission on the Sawtooth network, and develop client applications with the Sawtooth RestAPI and SDK.

Chapter 6, Operating an Ethereum Smart Contract with Hyperledger Burrow, contains recipes about how to write smart contracts with Solidity, deploy and interact with Ethereum smart contracts on Burrow, invoke smart contracts with Seth CLI and RPC, and create externally owned accounts on Seth. This chapter also covers the permissioning of Ethereum EOA and contract accounts on Seth.

Chapter 7, Working with Hyperledger Iroha, covers several recipes associated with working with Hyperledger Iroha, including installing and configuring Hyperledger Iroha, and interacting with Hyperledger Iroha using the client library. This chapter also provides an example demonstrating how to use Iroha CLI to create a cryptocurrency.

Chapter 8, Exploring the CLI with Hyperledger Indy, covers the installation of Hyperledger Indy and the exploration of Indy CLI with Hyperledger Indy.

Chapter 9, Hyperledger Blockchain Scalability and Security, contains recipes about how to measure Hyperledger blockchain performance using the Hyperledger Caliper tool, how to design and implement highly scalable Hyperledger blockchain, and how to build a secure Hyperledger consortium network with Fabric CA.

Appendix, Hyperledger Blockchain Ecosystem, mainly targets those individuals who are relatively new to distributed ledger technology and permissioned blockchains. It covers Hyperledger blockchain concepts, the important technical design methodology of the Hyperledger ecosystem, and explores when to apply these technologies through real-world use cases.

To get the most out of this book

To better understand and follow the recipes in this book, it will help if you have some basic knowledge of blockchain technology and cryptograph concepts, have a basic understanding of programming languages for JavaScript, Go, and Python, some basic Unix skills, in particular, shell command, and are familiar with basic flows for launching and running applications in the cloud, such as Amazon AWS.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hyperledger-Cookbook. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Install Node.js, npm, and Python."

A block of code is set as follows:

type Chaincode interface {
Init (stub ChaincodeStubInterface) pb.Response
Invoke (stub ChaincodeStubInterface) pb.Response
}

Any command-line input or output is written as follows:

  $ sudo apt-get update

Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Click on the Query Chaincode button."

Warnings or important notes appear like this.
Tips and tricks appear like this.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it..., How it works..., There's more..., and See also).

To give clear instructions on how to complete a recipe, use these sections as follows:

Getting ready

This section tells you what to expect in the recipe and describes how to set up any software or any preliminary settings required for the recipe.

How to do it...

This section contains the steps required to follow the recipe.

How it works...

This section usually consists of a detailed explanation of what happened in the previous section.

There's more...

This section consists of additional information about the recipe in order to increase your knowledge of it.

See also

This section provides helpful links to other useful information for the recipe.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at customercare@packtpub.com.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hyperledger Cookbook
Published in: Apr 2019Publisher: PacktISBN-13: 9781789534887
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (3)

author image
Xun (Brian) Wu

Xun (Brian) Wu is a senior blockchain architect and consultant. With over 20 years of hands-on experience across various technologies, including Blockchain, big data, cloud, AI, systems, and infrastructure, Brian has worked on more than 50 projects in his career. He has authored nine books, which have been published by O'Reilly, Packt, and Apress, focusing on popular fields within the Blockchain industry. The titles of his books include: Learn Ethereum (First Edition), Learn Ethereum (Second Edition), Blockchain for Teens, Hands-On Smart Contract Development with Hyperledger Fabric V2, Hyperledger Cookbook, Blockchain Quick Start Guide, Security Tokens and Stablecoins Quick Start Guide, Blockchain by Example, and Seven NoSQL Databases in a Week.
Read more about Xun (Brian) Wu

author image
Chuanfeng Zhang

Chuanfeng Zhang is enthusiastic and passionate about technologies and trading and data analysis, with 20 years' experience in both the technology and finance sectors. He has worked at top investment banks and technology firms including Goldman Sachs, Credit Suisse, and IBM. He has led, designed, and successfully developed many enterprise-scale systems with diverse architectures for algorithmic trading, order management, risk management, business intelligence, and more.
Read more about Chuanfeng Zhang

author image
Zhibin (Andrew) Zhang

Andrew Zhang is an IBM Watson Cloud Advocate. He has many years of experience in cloud platforms, big data analytics, and machine learning. He works with start-ups and enterprise clients in the government, education, healthcare, and life science industries. His current interests are in embedding AI and blockchain open source technologies for consumer and enterprise applications. In his spare time, Andrew enjoys reading, traveling, and spending time with his family and friends.
Read more about Zhibin (Andrew) Zhang