MasteringBlockchainSecondEdition code

965 496 0
MasteringBlockchainSecondEdition code

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Mastering Blockchain Second Edition Distributed ledger technology, decentralization, and smart contracts explained Imran Bashir BIRMINGHAM - MUMBAI Mastering Blockchain Second Edition Copyright © 2018 Packt Publishing All rights reserved No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews Every effort has been made in the preparation of this book to ensure the accuracy of the information presented However, the information contained in this book is sold without warranty, either express or implied Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information Acquisition Editors: Ben Renow-Clarke, Suresh M Jain Project Editor: Suzanne Coutinho Content Development Editor: Alex Sorrentino Technical Editor: Bhagyashree Rai Indexer: Tejal Daruwale Soni Graphics: Tom Scaria Production Coordinator: Aparna Bhagat First published: M arch 2017 Second edition: M arch 2018 Production reference: 1290318 Published by Packt Publishing Ltd Livery Place 35 Livery Street Birmingham B3 2PB, UK ISBN 978-1-78883-904-4 www.packtpub.com mapt.io Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career For more information, please visit our website Why subscribe? Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals Improve your learning with Skill Plans built especially for you Get a free eBook or video every month Mapt is fully searchable Copy and paste, print, and bookmark content PacktPub.com Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy Get in touch with us at service@packtpub.com for more details At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks Contributors About the author Imran Bashir has an M.Sc in Information Security from Royal Holloway, University of London, and has a background in software development, solution architecture, infrastructure management, and IT service management He is also a member of the Institute of Electrical and Electronics Engineers (IEEE) and the British Computer Society (BCS) Imran has sixteen years' of experience in the public and financial sectors He worked on large scale IT projects in the public sector before moving to the financial services industry Since then, he has worked in various technical roles for different financial companies in Europe's financial capital, London He is currently working for an investment bank in London as Vice President in the Technology department I would like to thank the talented team at Packt, including Ben Renow-Clarke, Suzanne Coutinho, Alex Sorrentino, Gary Schwartz, and Bhagyashree Rai, who provided prompt guidance and valuable feedback throughout this project I am also extremely thankful to the reviewer, Pranav Burnwal, who provided constructive and very useful feedback that helped me tremendously to improve the material in this book I thank my wife and children for putting up with my all-night and weekend-long writing sessions Above all, I would like to thank my parents, whose blessings have made everything possible for me Miscellaneous tools Some tools that have not been discussed previously are listed in the following subsections and introduced briefly to make readers aware of the myriad of development options available for blockchains This list includes platforms, utilities, and tools that can be used for blockchain development Solidity extension for Microsoft Visual Studio This extension provides IntelliSense, autocompletion, and templates for DApps, and works within the familiar Visual Studio IDE, making it easier for developers to familiarize themselves with Ethereum development You can download this extension from: https://marketplace.visualstudio.com/items?itemName=ConsenSys.Solidity MetaMask This is a DApp browser that is similar to Mist from a DApp browsing point of view but allows users to run Ethereum DApps within the browser without the requirement of running a full Ethereum node This is available from https://metamask.io/ and can be installed as a Chrome plugin Stratis This is a blockchain development platform that allows the creation of custom private blockchains and works in conjunction with the main Stratis blockchain (Stratis chain) for security reasons It allows provisioning of major blockchains such as Bitcoin, Ethereum, and Lisk easy Also, it allows development using C# NET technologies It is also available via Microsoft Azure as BaaS This is available at https://stratisplatform.com/ Embark This is a development framework for Ethereum which allows similar functionality to Truffle, which is discussed in Chapter 14, Introducing Web3 It allows automatic deployment of smart contracts, easier integration with JavaScript, and, especially, easier integration with IPFS This is a very feature-rich framework, and many more functionalities are available It can be installed via npm This framework is available at GitHub: https://github.com/iurimatias/embark-framework DAPPLE This is another framework for Ethereum that allows easier development and deployment of smart contracts by taking care of more complex tasks It can be used for package management, contract building, and deployment scripting This is also available via npm It is also available via GitHub at https://github.com/nexusdev/dapple Meteor This is a full-stack development framework for single-page applications It can be used for Ethereum DApp development There is a development environment available in meteor, and it allows easier and easy development of complex DApps It is available at https://www.meteor.com/ and Ethereum-specific DApp building information is available at m/ethereum/wiki/wiki/Dapp-using-Meteor https://github.co uPort This platform is built on Ethereum and provides a decentralized identity management system This allows users to have full control over their identity and personal information This is based on the idea of reputation systems enables users to attest each other and build trust This is available at https://www.uport.me/ INFURA This project aims to provide enterprise-level Ethereum and IPFS nodes INFURA consists of Ethereum nodes, IPFS nodes, and a service layer named Ferryman which provides routing and load balancing services Convergence with other industries Convergence of blockchain with IoT has been discussed at length in Chapter 18, Scalability and Other Challenges Briefly, it can be said that due to the authenticity, integrity, privacy, and shared nature of blockchains, IoT networks will benefit greatly from blockchain technology This can be realized in the form of an IoT network that runs on a blockchain and makes use of a decentralized mesh network for communication to facilitate Machine-to-Machine (M2M) communication in real time All this data which is generated as a result of M2M communication can be used in the machine learning process to augment the functionality of Artificially Intelligent DAOs or simple AAs AAs can act as agents in a Distributed Artificial Intelligence (DAI) environment provided by a blockchain and can learn over time using machine learning processes AI is a field of computer science that endeavors to build intelligent agents that can make rational decisions based on the scenarios and environment that they observe around them Machine learning plays a vital role in AI by making use of raw data as a learning resource A key requirement in AIbased systems is the availability of authentic data that can be used for machine learning and model building The explosion of data coming out IoT devices, smartphone's, and other data acquisition means that AI and machine learning is becoming more and more powerful There is, however, a requirement of authenticity of data Once consumers, producers, and other entities are on a blockchain, the data that is generated as a result of interaction between these entities can be readily used as an input to machine learning engines with a guarantee of authenticity This is where AI converges with blockchains It could be argued that if an IoT device is hacked, it can send malformed data to the blockchain This issue is mitigated because an IoT device is part of the blockchain (as a node) and has all security properties applied to it as a standard node in the blockchain network These properties include incentivization of good behavior, rejection of malformed transactions, and strict verification of transactions and various other checks that are part of blockchain protocol Therefore, even if an IoT device is somehow hacked, it would be treated as a Byzantine node by the blockchain network and would not cause any adverse impact on the network Moreover, the possibility of combining intelligent Oracles, intelligent, smart contracts, and AAs will give rise to Artificially Intelligent Decentralized Autonomous Organizations (AIDAOs) that can act on behalf of humans to run entire organizations on their own This is another side of AI that can become norm in the future However, more research is required to realize this vision Also, convergence of blockchain technology with other fields such as 3D printing, virtual reality, augmented reality, and the gaming industry is also envisaged For example, in a multiplayer online game, blockchain's decentralized approach allows for more transparency and can ensure that no central authority is gaining unfair advantage by manipulating the game rules All these topics are active areas of research currently and more interest and development are expected in these areas soon Future The year 2017 was predicted to be the year when blockchain technology is implemented in realworld production environments and move from the Proof of Concept (PoC) and theoretical stage of previous years It is true to some extent that companies have implemented some pilot projects but large-scale production implementations are yet to be seen It is expected that within year 2018 we will see some organization implementing full scale blockchain based projects In 2019, it is expected that almost 20% of central banks will be using blockchain Original research is available here https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3040224 In years to come, this trend is only expected to grow There are few careful predictions being made in the section that is based on the current advancement and speed of progress in the concerned field All of these predictions are likely to come true between the years 2020 and 2050: The IoT will run on multiple blockchains and will give rise to an M2M economy This can include energy devices, autonomous cars, and house hold accessories Medical records will be shared securely while preserving the privacy of patients between various private blockchains run by consortia of health providers It may well be a single private blockchain shared among all service providers including pharmacies, hospitals, and clinics Elections will be held via decentralized web applications with a backend of blockchains transparently and securely Financial institutions will be running many private blockchains to share data between participants and for internal processes Financial institutions will be making use of semiprivate blockchains that will provide identity information for AML and KYC functions and will be shared between many or all of the financial institutions around the world Immigration and border control related activities will be recorded on the blockchain and passport control will be conducted via a blockchain shared between all ports of entries and border agencies around the world Governments will run interdepartmental blockchain to provide government services such as pension disbursement, benefit disbursement, land ownership records, birth registrations and other citizen services This way auditability, trust and sense of security will develop among citizens Research in cryptography and distributed systems will reach new heights and universities, and educational establishment will offer dedicated courses on cryptoeconomics, cryptocurrencies, and blockchains Artificially Intelligent DAOs will prevail on blockchains that will make rational decisions on behalf of humans A publicly available regulated blockchain run by the government will be used on day-to-day basis by citizens to perform their day-to-day activities, for example tax payments, TV license registration and marriage registrations BaaS will be provided as standard to anyone who wishes to run their business or day-to-day transactions on a blockchain In fact, it could be envisaged that just like the Internet, blockchains will seamlessly integrate into our daily lives and people will be using them without knowing much about the underlying technology and infrastructure Blockchains will normally be used to provide Digital Rights Management (DRM) services for arts and media and can be used to deliver content to the consumers, enabling direct communication between consumer and the producer This will eliminate the need for any central party to govern the licensing and rights managing of valuable goods Existing cryptocurrencies such as Bitcoin will continue to grow in value, and with the availability of state channels and scalability efforts, this trend is only expected to grow Cryptocurrency investment will greatly increase, and a new cryptoeconomic society will emerge Bitcoin value will reach tens of thousands of dollars per coin Digital identities will be routinely managed on the blockchain, and different government functions such as voting, taxation, and funds disbursement will be conducted via blockchainenabled platforms Financial institutions and clearing houses will start to introduce blockchain-based solutions for their customers in 2018 Summary Blockchains are going to change the world The revolution has already started, and it is only expected to grow at an exponential scale This chapter has explored various projects and the current state of blockchain technology First, a few trends were discussed that are expected to continue as the technology progresses further There is deep research interest in blockchain technology by many researchers and organizations around the world, and some research topics have also been introduced in this chapter Furthermore, convergence with other fields such as the IoT and AI has also been discussed Finally, some predictions regarding the growth of blockchain technology have been made Most of these predictions are likely to come true within the next decade or so, while some may take a longer time Blockchain technology has the potential to change the world, and a few positive signs have already been seen in the form of successful PoC implementations and a growing number of enthusiasts and developers taking an interest in this technology Very soon, blockchains will be intertwined with our lives just as the Internet is now This chapter is just a modest overview of the vast and tremendous potential of blockchains, and in the near future, exponential growth and further adoption of this technology is expected Another Book You May Enjoy If you enjoyed this book, you may be interested in another book by Packt: Building Blockchain Projects Narayan Prusty ISBN: 978-1-78712-214-7 Walk through the basics of the Blockchain technology Implement Blockchain's technology and its features, and see what can be achieved using them Build DApps using Solidity and Web3.js Understand the geth command and cryptography Create Ethereum wallets Explore consortium blockchain Leave a review – let other readers know what you think Please share your thoughts on this book with others by leaving a review on the site that you bought it from If you purchased the book from Amazon, please leave us an honest review on this book's Amazon page This is vital so that other potential readers can see and use your unbiased opinion to make purchasing decisions, we can understand what our customers think about our products, and our authors can see your feedback on the title that they have worked with Packt to create It will only take a few minutes of your time, but is valuable to other potential customers, our authors, and Packt Thank you! ... Smart contracts Native contracts Summary 11 Further Ethereum Programming languages Runtime bytecode Opcodes and their meaning Arithmetic operations Logical operations Cryptographic operations Environmental... primitives Symmetric cryptography Stream ciphers Block ciphers Block encryption mode Electronic Code Book Cipher Block Chaining Counter mode Keystream generation mode Message authentication mode... Design of SHA-256 Design of SHA-3 (Keccak) OpenSSL example of hash functions Message Authentication Codes MACs using block ciphers Hash-based MACs Merkle trees Patricia trees Distributed Hash Tables

Ngày đăng: 06/03/2019, 10:35

Từ khóa liên quan

Mục lục

  • Title Page

  • Copyright and Credits

    • Mastering Blockchain Second Edition

  • Packt Upsell

    • Why subscribe?

    • PacktPub.com

  • Contributors

    • About the author

    • About the reviewer

    • Packt is searching for authors like you

  • Preface

    • Who this book is for

    • What this book covers

    • To get the most out of this book

      • Download the example code files

      • Download the color images

      • Conventions used

    • Get in touch

      • Reviews

  • Blockchain 101

    • The growth of blockchain technology

    • Distributed systems

    • The history of blockchain and Bitcoin

      • Electronic cash

      • Blockchain

        • Blockchain defined

          • Peer-to-peer

          • Distributed ledger

          • Cryptographically-secure

          • Append-only

          • Updateable via consensus

      • Generic elements of a blockchain

        • How blockchain works

        • How blockchain accumulates blocks

      • Benefits and limitations of blockchain

      • Tiers of blockchain technology

      • Features of a blockchain

    • Types of blockchain

      • Distributed ledgers

      • Distributed Ledger Technology

      • Public blockchains

      • Private blockchains

        • Semiprivate blockchains

        • Sidechains

        • Permissioned ledger

      • Shared ledger

      • Fully private and proprietary blockchains

      • Tokenized blockchains

      • Tokenless blockchains

    • Consensus

      • Consensus mechanism

      • Types of consensus mechanisms

      • Consensus in blockchain

    • CAP theorem and blockchain

    • Summary

  • Decentralization

    • Decentralization using blockchain

    • Methods of decentralization

      • Disintermediation

      • Contest-driven decentralization

    • Routes to decentralization

      • How to decentralize

      • The decentralization framework example

    • Blockchain and full ecosystem decentralization

      • Storage

      • Communication

      • Computing power and decentralization

    • Smart contracts

    • Decentralized Organizations

      • Decentralized Autonomous Organizations

      • Decentralized Autonomous Corporations

      • Decentralized Autonomous Societies

      • Decentralized Applications ⠀䐀䄀瀀瀀猀)

      • Requirements of a Decentralized Application

      • Operations of a DApp

        • DApp examples

          • KYC-Chain

          • OpenBazaar

          • Lazooz

    • Platforms for decentralization

      • Ethereum

      • MaidSafe

      • Lisk

    • Summary

  • Symmetric Cryptography

    • Working with the OpenSSL command line

    • Introduction

      • Mathematics

        • Set

        • Group

        • Field

        • A finite field

        • Order

        • An abelian group

        • Prime fields

        • Ring

        • A cyclic group

        • Modular arithmetic

      • Cryptography

      • Confidentiality

      • Integrity

      • Authentication

        • Entity authentication

        • Data origin authentication

      • Non-repudiation

      • Accountability

    • Cryptographic primitives

      • Symmetric cryptography

        • Stream ciphers

        • Block ciphers

          • Block encryption mode

          • Electronic Code Book

          • Cipher Block Chaining

          • Counter mode

          • Keystream generation mode

          • Message authentication mode

          • Cryptographic hash mode

      • Data Encryption Standard

      • Advanced Encryption Standard

        • How AES works

    • Summary

  • Public Key Cryptography

    • Asymmetric cryptography

      • Integer factorization

      • Discrete logarithm

      • Elliptic curves

    • Public and private keys

      • RSA

        • Encryption and decryption using RSA

        • Elliptic Curve Cryptography

          • Mathematics behind ECC

          • Point addition

          • Point doubling

      • Discrete logarithm problem in ECC

        • RSA using OpenSSL

        • RSA public and private key pair

          • Private key

          • Public key

          • Exploring the public key

        • Encryption and decryption

          • Encryption

          • Decryption

        • ECC using OpenSSL

          • ECC private and public key pair

          • Private key

          • Private key generation

      • Hash functions

        • Compression of arbitrary messages into fixed-length digest

        • Easy to compute

        • Preimage resistance

        • Second preimage resistance

        • Collision resistance

        • Message Digest

        • Secure Hash Algorithms

          • Design of Secure Hash Algorithms

          • Design of SHA-256

          • Design of SHA-3 ⠀䬀攀挀挀愀欀)

          • OpenSSL example of hash functions

          • Message Authentication Codes

          • MACs using block ciphers

          • Hash-based MACs

        • Merkle trees

        • Patricia trees

        • Distributed Hash Tables

        • Digital signatures

      • RSA digital signature algorithm

        • Sign then encrypt

        • Encrypt then sign

      • Elliptic Curve Digital Signature Algorithm

        • How to generate a digital signature using OpenSSL

        • ECDSA using OpenSSL

        • Homomorphic encryption

        • Signcryption

        • Zero-Knowledge Proofs

        • Blind signatures

        • Encoding schemes

    • Financial markets and trading

      • Trading

      • Exchanges

        • Orders and order properties

        • Order management and routing systems

        • Components of a trade

        • The underlying instrument

        • General attributes

        • Economics

        • Sales

        • Counterparty

      • Trade life cycle

      • Order anticipators

      • Market manipulation

    • Summary

  • Introducing Bitcoin

    • Bitcoin

      • Bitcoin definition

      • Bitcoin – a bird's-eye view

        • Sending a payment to someone

    • Digital keys and addresses

      • Private keys in Bitcoin

      • Public keys in Bitcoin

      • Addresses in Bitcoin

        • Base58Check encoding

        • Vanity addresses

          • Multisignature addresses

    • Transactions

      • The transaction life cycle

        • Transaction fee

        • Transaction pools

      • The transaction data structure

        • Metadata

        • Inputs

        • Outputs

        • Verification

        • The script language

        • Commonly used opcodes

      • Types of transactions

        • Coinbase transactions

        • Contracts

      • Transaction verification

        • Transaction malleability

    • Blockchain

      • The structure of a block

      • The structure of a block header

      • The genesis block

    • Mining

      • Tasks of the miners

      • Mining rewards

      • Proof of Work ⠀倀漀圀)

      • The mining algorithm

      • The hash rate

      • Mining systems

        • CPU

        • GPU

        • FPGA

        • ASICs

      • Mining pools

    • Summary

  • Bitcoin Network and Payments

    • The Bitcoin network

    • Wallets

      • Non-deterministic wallets

      • Deterministic wallets

      • Hierarchical Deterministic wallets

      • Brain wallets

      • Paper wallets

      • Hardware wallets

      • Online wallets

      • Mobile wallets

    • Bitcoin payments

    • Innovation in Bitcoin

      • Bitcoin Improvement Proposals ⠀䈀䤀倀猀)

      • Advanced protocols

      • Segregated Witness ⠀匀攀最圀椀琀)

      • Bitcoin Cash

      • Bitcoin Unlimited

      • Bitcoin Gold

      • Bitcoin investment and buying and selling bitcoins

    • Summary

  • Bitcoin Clients and APIs

    • Bitcoin installation

      • Types of Bitcoin Core clients

        • Bitcoind

        • Bitcoin-cli

        • Bitcoin-qt

      • Setting up a Bitcoin node

      • Setting up the source code

      • Setting up bitcoin.conf

      • Starting up a node in testnet

      • Starting up a node in regtest

      • Experimenting with Bitcoin-cli

      • Bitcoin programming and the command-line interface

    • Summary

  • Alternative Coins

    • Theoretical foundations

      • Alternatives to Proof of Work

        • Proof of Storage

        • Proof of Stake ⠀倀漀匀)

      • Various stake types

        • Proof of coinage

        • Proof of Deposit ⠀倀漀䐀)

        • Proof of Burn

        • Proof of Activity ⠀倀漀䄀)

        • Nonoutsourceable puzzles

      • Difficulty adjustment and retargeting algorithms

        • Kimoto Gravity Well

        • Dark Gravity Wave

        • DigiShield

        • MIDAS

    • Bitcoin limitations

      • Privacy and anonymity

        • Mixing protocols

        • Third-party mixing protocols

        • Inherent anonymity

      • Extended protocols on top of Bitcoin

        • Colored coins

        • Counterparty

      • Development of altcoins

        • Consensus algorithms

        • Hashing algorithms

        • Difficulty adjustment algorithms

        • Inter-block time

        • Block rewards

        • Reward halving rate

        • Block size and transaction size

        • Interest rate

        • Coinage

        • Total supply of coins

    • Namecoin

      • Trading Namecoins

      • Obtaining Namecoins

      • Generating Namecoin records

    • Litecoin

    • Primecoin

      • Trading Primecoin

      • Mining guide

    • Zcash

      • Trading Zcash

      • Mining guide

        • Address generation

        • GPU mining

          • Downloading and compiling nheqminer

      • Initial Coin Offerings ⠀䤀䌀伀猀)

      • ERC20 tokens

    • Summary

  • Smart Contracts

    • History

    • Definition

    • Ricardian contracts

      • Smart contract templates

      • Oracles

      • Smart Oracles

      • Deploying smart contracts on a blockchain

      • The DAO

    • Summary

  • Ethereum 101

    • Introduction

      • The yellow paper

        • Useful mathematical symbols

      • Ethereum blockchain

    • Ethereum – bird's eye view

    • The Ethereum network

      • Mainnet

      • Testnet

      • Private net

    • Components of the Ethereum ecosystem

      • Keys and addresses

      • Accounts

        • Types of accounts

      • Transactions and messages

        • Contract creation transaction

        • Message call transaction

        • Messages

        • Calls

        • Transaction validation and execution

        • The transaction substate

        • State storage in the Ethereum blockchain

        • The world state

        • The account state

        • Transaction receipts

      • Ether cryptocurrency / tokens ⠀䔀吀䌀 愀渀搀 䔀吀䠀)

      • The Ethereum Virtual Machine ⠀䔀嘀䴀)

        • Execution environment

        • Machine state

        • The iterator function

      • Smart contracts

        • Native contracts

    • Summary

  • Further Ethereum

    • Programming languages

      • Runtime bytecode

        • Opcodes and their meaning

        • Arithmetic operations

        • Logical operations

        • Cryptographic operations

        • Environmental information

        • Block information

        • Stack, memory, storage, and flow operations

        • Push operations

        • Duplication operations

        • Exchange operations

        • Logging operations

        • System operations

      • Blocks and blockchain

        • The genesis block

        • The block validation mechanism

          • Block finalization

        • Block difficulty

        • Gas

      • Fee schedule

        • Forks in the blockchain

        • Nodes and miners

          • The consensus mechanism

        • Ethash

          • CPU mining

          • GPU mining

          • Benchmarking

          • Mining rigs

          • Mining pools

        • Wallets and client software

          • Geth

          • Eth

          • Pyethapp

          • Parity

          • Light clients

          • Installation

          • Eth installation

          • Mist browser

          • Geth

          • The geth console

          • Funding the account with bitcoin

          • Parity installation

          • Creating accounts using the parity command line

        • APIs, tools, and DApps

          • Applications ⠀䐀䄀瀀瀀猀 愀渀搀 䐀䄀伀猀) developed on Ethereum

          • Tools

      • Supporting protocols

        • Whisper

        • Swarm

      • Scalability, security, and other challenges

      • Trading and investment

    • Summary

  • Ethereum Development Environment

    • Test networks

    • Setting up a private net

      • Network ID

      • The genesis file

      • Data directory

        • Flags and their meaning

        • Static nodes

    • Starting up the private network

      • Running Mist on private net

      • Deploying contracts using Mist

      • Block explorer for private net / local Ethereum block explorer

    • Summary

  • Development Tools and Frameworks

    • Languages

      • Compilers

        • Solidity compiler ⠀猀漀氀挀)

          • Installation on Linux

          • Installation on macOS

        • Integrated Development Environments ⠀䤀䐀䔀猀)

          • Remix

        • Tools and libraries

          • Node version 7

          • EthereumJS

        • Ganache

        • MetaMask

        • Truffle

          • Installation

        • Contract development and deployment

          • Writing

          • Testing

    • Solidity language

      • Types

        • Value types

          • Boolean

          • Integers

          • Address

        • Literals

          • Integer literals

          • String literals

          • Hexadecimal literals

        • Enums

        • Function types

          • Internal functions

          • External functions

        • Reference types

          • Arrays

          • Structs

          • Data location

          • Mappings

        • Global variables

        • Control structures

          • Events

          • Inheritance

          • Libraries

          • Functions

        • Layout of a Solidity source code file

          • Version pragma

          • Import

          • Comments

    • Summary

  • Introducing Web3

    • Web3

      • Contract deployment

      • POST requests

      • The HTML and JavaScript frontend

        • Installing web3.js

          • Example

          • Creating a web3 object

          • Checking availability by calling any web3 method

          • Contract functions

      • Development frameworks

        • Truffle

          • Initializing Truffle

          • Interaction with the contract

          • Another example

          • An example project – Proof of Idea

        • Oracles

        • Deployment on decentralized storage using IPFS

          • Installing IPFS

        • Distributed ledgers

    • Summary

  • Hyperledger

    • Projects under Hyperledger

      • Fabric

      • Sawtooth Lake

      • Iroha

      • Burrow

      • Indy

      • Explorer

      • Cello

      • Composer

      • Quilt

    • Hyperledger as a protocol

    • The reference architecture

      • Requirements and design goals of Hyperledger Fabric

        • The modular approach

        • Privacy and confidentiality

        • Scalability

        • Deterministic transactions

        • Identity

        • Auditability

        • Interoperability

        • Portability

        • Rich data queries

    • Fabric

      • Hyperledger Fabric

        • Membership services

        • Blockchain services

        • Consensus services

        • Distributed ledger

          • The peer to peer protocol

          • Ledger storage

          • Chaincode services

          • Components of the fabric

          • Peers

          • Orderer nodes

          • Clients

          • Channels

          • World state database

          • Transactions

          • Membership Service Provider ⠀䴀匀倀)

          • Smart contracts

          • Crypto service provider

          • Applications on blockchain

          • Chaincode implementation

          • The application model

          • Consensus in Hyperledger Fabric

          • The transaction life cycle in Hyperledger Fabric

      • Sawtooth Lake

        • PoET

        • Transaction families

        • Consensus in Sawtooth

        • The development environment – Sawtooth Lake

      • Corda

        • Architecture

          • State objects

          • Transactions

          • Consensus

          • Flows

        • Components

          • Nodes

          • The permissioning service

          • Network map service

          • Notary service

          • Oracle service

          • Transactions

          • Vaults

          • CorDapp

        • The development environment – Corda

    • Summary

  • Alternative Blockchains

    • Blockchains

      • Kadena

      • Ripple

        • Transactions

          • Payments related

          • Order related

          • Account and security-related

        • Interledger

          • Application layer

          • Transport layer

          • Interledger layer

          • Ledger layer

      • Stellar

      • Rootstock

        • Sidechain

        • Drivechain

      • Quorum

        • Transaction manager

        • Crypto Enclave

        • QuorumChain

        • Network manager

      • Tezos

      • Storj

      • MaidSafe

      • BigchainDB

      • MultiChain

      • Tendermint

        • Tendermint Core

        • Tendermint Socket Protocol ⠀吀䴀匀倀)

    • Platforms and frameworks

      • Eris

    • Summary

  • Blockchain – Outside of Currencies

    • Internet of Things

      • Physical object layer

      • Device layer

      • Network layer

      • Management layer

      • Application layer

      • IoT blockchain experiment

        • First node setup

        • Raspberry Pi node setup

          • Installing Node.js

        • Circuit

      • Government

        • Border control

        • Voting

        • Citizen identification ⠀䤀䐀 挀愀爀搀猀)

        • Miscellaneous

      • Health

      • Finance

        • Insurance

        • Post-trade settlement

        • Financial crime prevention

      • Media

    • Summary

  • Scalability and Other Challenges

    • Scalability

      • Network plane

      • Consensus plane

      • Storage plane

      • View plane

      • Block size increase

      • Block interval reduction

      • Invertible Bloom Lookup Tables

      • Sharding

      • State channels

      • Private blockchain

      • Proof of Stake

      • Sidechains

        • Subchains

        • Tree chains ⠀琀爀攀攀猀)

        • Block propagation

        • Bitcoin-NG

        • Plasma

    • Privacy

      • Indistinguishability Obfuscation

      • Homomorphic encryption

      • Zero-Knowledge Proofs

      • State channels

      • Secure multiparty computation

      • Usage of hardware to provide confidentiality

      • CoinJoin

      • Confidential transactions

      • MimbleWimble

      • Security

        • Smart contract security

          • Formal verification and analysis

          • Oyente tool

    • Summary

  • Current Landscape and What's Next

    • Emerging trends

      • Application-specific blockchains ⠀䄀匀䈀䌀猀)

      • Enterprise-grade blockchains

      • Private blockchains

      • Start-ups

      • Strong research interest

      • Standardization

      • Enhancements

      • Real-world implementations

      • Consortia

      • Answers to technical challenges

      • Convergence

      • Education of blockchain technology

      • Employment

      • Cryptoeconomics

      • Research in cryptography

      • New programming languages

      • Hardware research and development

      • Research in formal methods and security

      • Alternatives to blockchains

      • Interoperability efforts

      • Blockchain as a Service

      • Efforts to reduce electricity consumption

    • Other challenges

      • Regulation

      • Dark side

    • Blockchain research

      • Smart contracts

      • Centralization issues

      • Limitations in cryptographic functions

      • Consensus algorithms

      • Scalability

      • Code obfuscation

    • Notable projects

      • Zcash on Ethereum

      • CollCo

      • Cello

      • Qtum

      • Bitcoin-NG

      • Solidus

      • Hawk

      • Town-Crier

      • SETLCoin

      • TEEChan

      • Falcon

      • Bletchley

      • Casper

    • Miscellaneous tools

      • Solidity extension for Microsoft Visual Studio

      • MetaMask

      • Stratis

      • Embark

      • DAPPLE

      • Meteor

      • uPort

      • INFURA

    • Convergence with other industries

    • Future

    • Summary

  • Another Book You May Enjoy

    • Leave a review – let other readers know what you think

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan