Book description
Learn to develop blockchain-based distributed ledgers and deploy a Hyperledger Fabric network with concrete exercises and examples
Key Features
- Updated with the latest features and additions that come with Hyperledger Fabric 2
- Write your own smart contracts and services using Java and JavaScript on a Hyperledger Fabric network
- Dive into real-world blockchain challenges such as integration and scalability
Book Description
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.
What you will learn
- Discover why blockchain is a technology and business game changer
- Set up blockchain networks using Hyperledger Fabric version 2
- Understand how to create decentralized applications
- Learn how to integrate blockchains with existing systems
- Write smart contracts and services quickly with Hyperledger Fabric and Visual Studio Code
- Design transaction models and smart contracts with Java, JavaScript, TypeScript, and Golang
- Deploy REST gateways to access smart contracts and understand how wallets maintain user identities for access control
- Maintain, monitor, and govern your blockchain solutions
Who this book is for
This book is designed in such a way that professionals from different areas including business leaders, technology leaders, blockchain application developers, and even beginners can benefit from it.
Publisher resources
Table of contents
- Preface
-
Blockchain – An Enterprise and Industry Perspective
- Our focus for the new edition
- Defining the terms – what is blockchain?
- Design considerations for blockchain solutions
- Fundamentals of the secure transaction processing protocol
- Where blockchain technology has been and where it's going
- Blockchain in the enterprise
- Enterprise design principles
- Business considerations for choosing a blockchain framework
- Technology considerations for choosing a blockchain framework
- Enterprise integration and designing for extensibility
- Other considerations
- Summary
- References
-
Exploring Hyperledger Fabric
- Building on the foundations of open computing
- Fundamentals of the Hyperledger project
- Hyperledger frameworks, tools, and building blocks
- Hyperledger Fabric component design
- Hyperledger Fabric – the journey of a sample transaction
- Actors and components in a Hyperledger Fabric network
- CAP theorem
- New features covered in this book
- Summary
-
Business Networks
- A busy world of purposeful activity
- Why a language for business networks?
- Defining a business network
- Introducing participants
- Introducing assets
-
Introducing transactions
- Change and transactions
- Transaction definition and instance
- Implicit and explicit transactions
- The importance of contracts
- Signatures
- Smart contract multi-party transactions
- Digital transaction processing
- Initiating transactions
- Transaction history
- Transaction streams
- A network of networks
- Current value and transaction history
- A business network as a history of transactions
- Regulators
- Introducing events
- Business network technology
- Summary
-
Setting the Stage with a Business Scenario
- Trading and letters of credit
- Business scenario and use case
- Designing and configuring a Hyperledger Fabric trade network
- Launching a sample trade network
- Configuring our development environment for network operations
- Summary
- Designing Smart Contract Transactions and Ledger Data Structures
-
Developing Smart Contracts
- Business networks
- Solution application components
- The multi-party transaction
- The ledger
-
Smart contracts
- A central role in the network
- Smart contracts and consensus
-
Writing a smart contract
- Smart contract structure
- Contract class and transaction methods
- Elaborating a smart contract
- Writing smart contract transaction methods
- Marshalling the transaction proposal input
- Accessing the ledger to generate a transaction response
- Accessing the state database
- Returning a signed transaction response
- Checking that business objects exist
- Transaction handlers
- Other functionality available in fabric-contract-api
- Annotations
- Packaging smart contracts
- Programming language
- Endorsement policy
- Summary
- Developing Applications
-
Advanced Topics for Developing Smart Contracts and Applications
- Customizing SDK behavior
- Transient data
- Private data
- Collection and state endorsements policy
- Advanced smart contract packaging
- Summary
-
Network Operation and Distributed Application Building
- Stages in a Fabric network's life cycle
- Fabric application model and architecture
-
Operations – network setup and bootstrap
- Operations overview – channel and contract setup
- Prerequisites – creating all channel artifacts
- Overview of Fabric tools and commands
- Creating channels
- Joining organization peers to channels
- Setting organization anchor peers on channels
- Running all channel operations in one go
- Installing and initializing contracts
-
Developing service-layer applications
- Application runtime life cycle
-
An application for the importer's organization
- Importer application structure
- Project dependencies
- Setting application properties and generating a connection profile
- Designing a service API for the importer application
- User registration, login, and session management
- User roles and access control
- Fabric registration, enrolment, and identity wallets
- Contract invocations through gateways
- Launching and testing the application
- Event management
-
Exercising the application through a presentation layer
- Launching applications
-
An end-to-end scenario – trade request to final payment
- Users and their credentials
- Registering users
- Logging in users
- Requesting a trade as an importer
- Accepting a trade as an exporter
- Requesting a letter of credit as an importer
- Issuing a letter of credit as an importer's bank
- Accepting a letter of credit as an exporter's bank
- Requesting an export license as an exporter
- Issuing an export license as a regulator
- Preparing a shipment as an exporter
- Accepting a shipment and issuing a bill of lading as a carrier
- Requesting a partial payment as an exporter's bank
- Making a partial payment as an importer's bank
- Delivering a shipment as a carrier
- Requesting the balance payment as an exporter's bank
- Making the balance payment as an importer's bank
- Viewing the list of active or processed trades as an importer
- Using a production-grade ordering service
- Summary of key steps
- Summary
- Enterprise Design Patterns and Considerations
-
Agility in a Blockchain Network
- Defining the promotion process
- Continuous integration
- Testing considerations for the trade network
- Continuous delivery
- Summary
- Governance – A Necessary Evil of Regulated Industries
-
Life in a Blockchain Network
-
Modifying or upgrading a Hyperledger Fabric application
- Changing requirements and update modes
- Fabric blockchain and application life cycle
- Network organization resource updates
-
Channel configuration updates
- Adding a new organization to a live network
- Prerequisites for adding a new organization to the network
- Generating cryptographic material for the new organization
- Generating channel artifacts for the new organization
- Generating the cryptographic and channel artifacts in one operation
- Docker containers for the new organization
- Launching network components for the new organization
- Updating the channel configuration
- Joining the new organization's peer to the channels
- Setting the anchor peer for the new organization's peer on the channels
- Installing contracts on peers in the new organization
- Smart contract and policy updates
- Platform upgrades
- System monitoring and performance
- Summary
-
Modifying or upgrading a Hyperledger Fabric application
-
Hyperledger Fabric Security
- Hyperledger Fabric design goals impacting security
- Hyperledger Fabric architecture
-
Network bootstrap and data governance: the first step toward security
- Bootstrapping the network with known members
- Defining the process for sharing data
- Defining the data model of the shared data
- Mapping data sharing needs Hyperledger-based mechanisms for operational agility
- Adding new members to the network (or channel)
- Deploying, instantiating, and upgrading smart contracts on peers in the network
- Strong identities: the key to the security of the Hyperledger Fabric network
- Smart contract security
- Common threats and how Hyperledger Fabric mitigates them
- Hyperledger Fabric and quantum computing
- GDPR considerations
- Summary
-
Blockchain's Future, Protocol Commercialization, and Challenges Ahead
- Summary of key Hyperledger projects
- Blockchain's future and the challenges ahead
- How can you help and stay engaged?
- Summary
- Another Book You May Enjoy
- Index
Product information
- Title: Blockchain with Hyperledger Fabric - Second Edition
- Author(s):
- Release date: November 2020
- Publisher(s): Packt Publishing
- ISBN: 9781839218750
You might also like
book
Practical Recommender Systems
Practical Recommender Systems explains how recommender systems work and shows how to create and apply them …
book
Generative Deep Learning, 2nd Edition
Generative AI is the hottest topic in tech. This practical book teaches machine learning engineers and …
book
Python for Data Analysis, 3rd Edition
Get the definitive handbook for manipulating, processing, cleaning, and crunching datasets in Python. Updated for Python …
book
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 3rd Edition
Through a recent series of breakthroughs, deep learning has boosted the entire field of machine learning. …