O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions

Book Description

Develop, validate, and deploy powerful decentralized applications using blockchain

Get the most out of cutting-edge blockchain technology using the hands-on information contained in this comprehensive resource. Written by a team of technology and legal experts, Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions demonstrates each topic through a start-to-finish, illustrated case study. The book includes financial, technology, governance, and legal use cases along with advantages and challenges. Validation, implementation, troubleshooting, and best practices are fully covered. You will learn, step-by-step, how to build and maintain effective, reliable, and transparent blockchain solutions.

•Understand the fundamentals of decentralized computing and blockchain
•Explore business, technology, governance, and legal use cases
•Review the evolving practice of law and technology as it concerns legal and governance issues arising from blockchain implementation
•Write and administer performant blockchain-enabled applications
•Handle cryptographic validation in private, public, and consortium blockchains
•Employ blockchain in cloud deployments and Internet of Things (IoT) devices
•Incorporate Web 3.0 features with Swarm, IPFS, Storj, Golem, and WHISPER
•Use Solidity to build and validate fully functional distributed applications and smart contracts using Ethereum
•See how blockchain is used in crypto-currency, including Bitcoin and Ethereum
•Overcome technical hurdles and secure your decentralized IT platform

Table of Contents

  1. Cover
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. Contents
  6. Acknowledgments
  7. Introduction
  8. CHAPTER 1 Introduction to Blockchain
    1. Blockchain: An Information Technology
      1. A Distributed Trusted Information Technology
      2. Implementation Trends
    2. Trust: The Byzantine Generals Problem
      1. The Byzantine Generals Problem Explained: Why Trust Is So Important
      2. Byzantine Fault Tolerance in Use Today: Why Airplanes Are Safe
    3. Satoshi Nakamoto’s Blockchain Breakthrough
      1. Satoshi Nakamoto: The Man, the Myth, the Mystery
      2. Satoshi Nakamoto: Timing Is Everything
      3. Blockchain: Underpinning of Cryptocurrency
    4. Types of Blockchain
      1. Public Blockchains
      2. Consortium Blockchains
      3. Private Blockchains
      4. Comparing Blockchains
    5. Blockchain Implementations
      1. Bitcoin
      2. Namecoin
      3. Ripple
      4. Ethereum
    6. Blockchain Collaborative Implementations
      1. Hyperledger
      2. Corda
    7. Blockchain in Practical Use Today
      1. Blockchain in the Financial Technology Space
      2. Blockchain in the Sharing Economy
      3. Blockchain and Real Estate
      4. Blockchain and Identity
      5. Blockchain and the Practice of Law
      6. Blockchain Decentralized File Storage
      7. Decentralized Autonomous Organizations
      8. Blockchain and Cloud Computing
      9. Blockchain Gambling and Betting
      10. Summary
  9. CHAPTER 2 Business Use Cases
    1. Currency and Tokens
      1. Cryptocurrency
      2. Digital Tokens
    2. Financial Services Use Cases
      1. Know Your Customer (KYC) Use Case
      2. Asset Management Settlement Use Case
      3. Insurance Claims Processing Use Case
      4. Trade Finance (Supply Chain) Use Case
      5. Global Payments Use Case
      6. Smart Property
      7. Transferring Ownership of Smart Property
      8. Using Smart Property as Collateral
    3. Smart Contracts on the Blockchain
      1. The Trust Problem
      2. Blockchain Details
    4. Blockchain IoT Protocol Projects
    5. Summary
  10. CHAPTER 3 Technology Use Cases
    1. Web Versions 1 and 2
    2. Web 3.0
    3. Distributed Storage Systems
      1. InterPlanetary File System
      2. Swarm
      3. Storj
    4. Distributed Computation
    5. Golem
      1. Zennet
    6. Decentralized Communications
      1. Existing Decentralized Communications
      2. Whisper
    7. Summary
  11. CHAPTER 4 Legal and Governance Use Cases
    1. Blockchain Changes the Legal Landscape
      1. Cryptocurrencies as Legal Tender
      2. Blockchain and Privacy Laws
      3. Legal Ramifications of Blockchain Records
    2. The Beginning of Autonomous Law: Smart Contract
      1. Smart Contract Evolution
      2. Smart Contract Components
      3. Smart Contract Benefits
      4. Smart Contract Challenges
      5. Smart Contract Risks
      6. Smart Contract Legal Challenges
      7. Blockchain as Evidence and Digital Signature
      8. Smart Contract Design Example
    3. Is an Advertising Payment Application a Blockchain Fit?
      1. Defining Contract Data Structures
      2. Smart Contract Events
      3. Smart Contract Functions
      4. Smart Contracts in Practice
    4. Decentralized Autonomous Organizations
      1. DAO and Jurisdiction
      2. DAO Service-Level Liability
      3. DAO Liability for Contract Breach
      4. DAO and Intellectual Property
      5. DAO and Who or What Is Responsible
      6. DAO Compliance with Financial Services Regulation
      7. The DAO and Exiting a Contract
      8. DAO Data as Property
      9. DAO and Due Diligence
    5. Summary
  12. CHAPTER 5 Technology on Ethereum
    1. Ethereum Accounts
      1. Ether the Cryptocurrency
      2. Obtaining Ether
      3. Mining in Ethereum
    2. Ethereum Work
      1. Transactions
      2. Network Fuel (Gas)
      3. Messages
      4. The Ethereum Block
      5. State Transition Function (STF)
      6. Code Execution
      7. Turing Complete
      8. Scalability
      9. Infrastructure: Storage and Communication
    3. Decentralized Applications
      1. Profile of a Dapp
    4. Decentralized Autonomous Organizations
    5. Summary
  13. CHAPTER 6 Fast-Track Application Tutorial
    1. Introducing Solidity
      1. Solidity Basics
      2. Solidity Functions and Parameters
      3. Layout of Storage
    2. Run Ethereum Dapps in Your Browser
      1. Installing MetaMask
      2. Developing a Contract Using MetaMask
      3. Remix/Browser Solidity
    3. Develop a Simple Smart Contract
      1. Deploy the Smart Contract
      2. Validate the Smart Contract
      3. Next Step: Try Truffle
    4. Summary
  14. CHAPTER 7 Ethereum Application Best Practices
    1. Ethereum Blockchain Development
      1. Setting Up the Development Environment for Truffle
      2. Set Up a Truffle Project
      3. Truffle Directory Structure
    2. Ethereum Blockchain Development: Best Practices
      1. Blockchain Technologies
      2. Solidity Basics Continued
      3. Calling Contracts from Contracts
      4. Handling Events
    3. Smart Contract Design
      1. Modules and Interfaces
      2. Security and Roles
      3. Single Contract Design
      4. Linked Contracts
      5. User-Specific Contracts
      6. Handling Persistent Contract Addresses
      7. Halting a Contract
    4. Smart Contract Life Cycle: Migration
    5. Smart Contract Interaction with Users and Enterprise Applications
    6. Debugging Your Smart Contract
      1. Debugging Using Remix
      2. Debugging Using Events
    7. Smart Contract Validation
      1. Types of Tests
      2. Dry Run Using Private Nets
    8. Autopsy of a Wallet Bug
    9. The Future
    10. Summary
  15. CHAPTER 8 Private Blockchain Platforms and Use Cases
    1. Categories of Blockchain
    2. Private Blockchain Use Cases
    3. Private Blockchain Technology
      1. AlphaPoint Distributed Ledger Platform
      2. Chain Core
      3. Corda
      4. Domus Tower
      5. The Elements Project
      6. HydraChain
      7. Hyperledger
      8. Interbit
      9. Monax
      10. MultiChain
      11. Openchain
      12. Quorum
      13. Stellar
      14. Symbiont Assembly
    4. Summary
  16. CHAPTER 9 Challenges
    1. Blockchain Governance Challenges
      1. Bitcoin Blocksize Debate
      2. The Ethereum DAO Fork
      3. Ethereum’s Move to PoS and Scaling Challenges
    2. Blockchain Technical Challenges
      1. Bugs in the Core Code
      2. Denial-of-Service Attacks
      3. Security in Smart Contracts
      4. Scaling
      5. Sharding
    3. Summary
  17. CHAPTER 10 Sample Application: Blockchain and Betting
    1. What Is a Dapp?
    2. Introduction to Lotteries, Betting, and Gambling on the Blockchain
    3. Setting Up a Development Environment
    4. Syncing an Ethereum Node
    5. Creating and Configuring a Private Development Chain
    6. Creating a Killable Contract
    7. Compiling the Contract
    8. Deploying a Contract
    9. Contract Debugging and Interaction
    10. Defining Data Structures
    11. Enumerables
    12. Storage Variables
    13. Events
    14. Functions
      1. Creating a Game
      2. Bidding
      3. Scoring Games and Payouts
      4. Withdrawing
      5. Reading Games
      6. Reading Bids
    15. Summary
  18. CHAPTER 11 Deploying the Sample Application: Blockchain and Betting
    1. Deploying Full Contract
      1. Deploying to the Mainnet
    2. Seeding Data
    3. Front-End User Interface
      1. Pages in the User Interface
      2. Displaying Games
      3. Bet Page Markup
      4. Displaying Game Information
      5. Displaying Open Bids
      6. Displaying Bets
      7. Placing Bids/Bets
      8. Scoring Games
      9. Withdrawing Money
      10. Deploying to AWS
    4. Summary
  19. Index