Blockchain for Enterprise

Book description

Implement blockchain principles in your choice of domain using Ethereum

Key Features

  • Build permissioned enterprise-grade blockchain applications from scratch
  • Implement Blockchain-as-a-Service to enterprises in terms of deployment and security
  • Achieve privacy in blockchains using proxy re-encryption algorithms

Book Description

The increasing growth in blockchain use is enormous, and it is changing the way business is done. Many leading organizations are already exploring the potential of blockchain. With this book, you will learn to build end-to-end enterprise-level decentralized applications and scale them across your organization to meet your company's needs.

This book will help you understand what DApps are and how the blockchain ecosystem works, via real-world examples. This extensive end-to-end book covers every blockchain aspect for business and for developers. You will master process flows and incorporate them into your own enterprise. You will learn how to use J.P. Morgan's Quorum to build blockchain-based applications. You will also learn how to write applications that can help communicate enterprise blockchain solutions. You will learn how to write smart contracts that run without censorship and third-party interference.

Once you've grasped what a blockchain is and have learned about Quorum, you will jump into building real-world practical blockchain applications for sectors such as payment and money transfer, healthcare, cloud computing, supply chain management, and much more.

What you will learn

  • Learn how to set up Raft/IBFT Quorum networks
  • Implement Quorum's privacy and security features
  • Write, compile, and deploy smart contracts
  • Learn to interact with Quorum using the web3.js JavaScript library
  • Learn how to execute atomic swaps between different networks
  • Build a secured Blockchain-as-a-Service for efficient business processes
  • Achieve data privacy in blockchains using proxy re-encryption

Who this book is for

This book is for innovators, digital transformers, and blockchain developers who want to build end-to-end, decentralized applications using the blockchain technology. If you want to scale your existing blockchain system across the enterprise, you will find this book useful, too. It adopts a practical approach to solving real problems in enterprises using a blend of theory and practice.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Blockchain for Enterprise
  3. Packt Upsell
    1. Why subscribe?
    2. packt.com
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    4. Get in touch
      1. Reviews
  6. What are Decentralized Applications?
    1. What is a DApp?
    2. What is a blockchain?
      1. Understanding Byzantine Fault Tolerance
      2. Representation of user accounts 
      3. What are UTXOs?
    3. Popular permissioned blockchain platforms
      1. Ethereum
      2. Quorum
      3. Parity
      4. MultiChain
      5. Hyperledger Fabric 1.0
      6. BigchainDB
      7. InterPlanetary File System
      8. Corda
        1. Transaction validity
      9. Hyperledger Sawtooth
    4. Popular blockchain use cases
      1. Everledger
      2. Walmart's food tracking 
      3. Ghana's land registry 
      4. Dubai's housing rental 
      5. Project Ubin
    5. Summary
  7. Building Blockchain Using Quorum
    1. Overview of Quorum
    2. Ethereum accounts
    3. What are Ethereum transactions?
    4. What is a Merkle tree?
    5. What is forking in blockchain?
    6. Raft consensus
    7. Istanbul Byzantine Fault Tolerence
    8. Private contracts and constellation
    9. Installing Quorum and constellation
    10. Build your first Raft network
      1. Setting up a constellation network
      2. Generating enodes
      3. Creating an account
      4. Creating the genesis block
      5. Starting nodes
      6. Adding or removing nodes dynamically
    11. Building your first IBFT network
      1. Installing IBFT tools
      2. Creating a genesis block
      3. Starting nodes
      4. Adding or removing a validator dynamically
    12. Summary
  8. Writing Smart Contracts
    1. Solidity source files
    2. The structure of a smart contract
    3. Data locations in Solidity
    4. The different types of data
      1. Arrays
      2. Strings
      3. Structs
      4. Enums
      5. Mappings
      6. The delete operator
      7. Conversion between elementary types
      8. Using var
    5. Control structures
    6. Creating contracts using the new operator
    7. Exceptions
    8. External function calls
    9. Features of contracts
      1. Visibility
      2. Function modifiers
      3. The fallback function
      4. Inheritance
        1. The super keyword
        2. Abstract contracts
    10. Libraries
      1. using for
    11. Returning multiple values
    12. Importing other Solidity source files
    13. Globally-available variables
      1. Block and transaction properties
      2. Address-type-related variables
      3. Contract-related variables
      4. Ether units
    14. Proof of existence, integrity, and ownership contract
    15. Compiling and deploying contracts
    16. Summary
  9. Getting Started with web3.js
    1. Introduction to web3.js
      1. Importing web3.js
      2. Connecting to nodes
      3. The API structure
      4. BigNumber.js
      5. Unit conversion
      6. Retrieving gas price, balance, and transaction details
      7. Sending ether
      8. Working with contracts
      9. Retrieving and listening to contract events
    2. Building a client for the ownership contract
      1. The project structure
      2. Building the backend
      3. Building the frontend
      4. Testing the client
    3. Summary
  10. Building Interoperable Blockchains
    1. Understanding blockchain interoperability
    2. What can interoperable blockchains achieve?
    3. Strategies for implementing blockchain interoperability
      1. Single custodian
      2. Multisignature federation
      3. Sidechains or relays
      4. Hash locking
    4. Building a FedCoin
      1. Smart contracts to digitalize fiat currency
      2. Atomic swap smart contracts
      3. Testing
    5. Summary
  11. Building Quorum as a Service Platform
    1. Introduction to cloud computing
      1. Private versus public versus hybrid cloud
      2. IaaS versus PaaS and SaaS
    2. What are containers?
      1. Introduction to Docker
      2. Building a Hello World Docker container
    3. Understanding the microservices architecture
    4. Diving into K8s
      1. Getting into resource objects
        1. Deployments and pods
        2. Services
        3. Ingress controllers and resources
        4. ConfigMaps and secrets
        5. Bind mounts and volumes
        6. Labels and selectors
      2. Getting started with minikube
        1. Installing minikube on macOS
        2. Installing minikube on Ubuntu
        3. Installing minikube on Windows
        4. Starting minikube
        5. Stopping and deleting minikube 
        6. Minikube status
        7. Accessing the K8s dashboard
      3. Deploying the Hello World app on k8s
        1. Pushing images to Docker Hub
        2. Creating deployments and services
    5. Building QaaS
      1. How does QNM work?
      2. Containerizing QNM
      3. Creating QNM deployment and service mainfest files
      4. Creating nodes using the K8s APIs
    6. Summary
  12. Building a DApp for Digitizing Medical Records
    1. Introduction to EMRs data management and sharing systems
      1. Problems with paper-based medical records
      2. Limitations of EMR data management and sharing systems
      3. Centralized versus decentralized EMR management systems
    2. Ensuring data privacy in a blockchain using PRE
      1. The NuCypher PRE library
        1. Installing the library
        2. Using the library
    3. Architecting DApp for EMRs
      1. Smart contracts for identity and access control
      2. Writing Python and JS scripts for testing
    4. Summary
  13. Building a Payment Solution for Banks
    1. Overview of the payment system
      1. Settlement and clearance of InterBank transfers
      2. Digitalizing fiat currency
      3. Using a cell phone number as identity
    2. Building the network
      1. Network permissioning in Quorum
    3. Building the DApp
    4. Summary
  14. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Blockchain for Enterprise
  • Author(s): Narayan Prusty
  • Release date: September 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788479745