Mastering Blockchain

Höfundur Imran Bashir

Útgefandi Packt Publishing

Snið ePub

Print ISBN 9781839213199

Útgáfa 3

Útgáfuár 2020

8.890 kr.

Description

Efnisyfirlit

  • Preface
  • Who this book is for
  • What this book covers
  • To get the most out of this book
  • Get in touch
  • Blockchain 101
  • The growth of blockchain technology
  • Progress toward maturity
  • Increasing interest
  • Distributed systems
  • The history of blockchain and Bitcoin
  • The events that led to blockchain
  • Electronic cash
  • Blockchain
  • Blockchain defined
  • Peer-to-peer
  • Distributed ledger
  • Cryptographically secure
  • Append-only
  • Updatable via consensus
  • Blockchain architecture
  • Blockchain by layers
  • Blockchain in business
  • Generic elements of a blockchain
  • How blockchain works
  • Benefits, features, and limitations of blockchain
  • Types of blockchain
  • Distributed ledgers
  • Distributed Ledger Technology
  • Public blockchains
  • Private blockchains
  • Semi-private 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
  • Decentralization framework example
  • Blockchain and full ecosystem decentralization
  • Storage
  • Communication
  • Computing power and decentralization
  • Pertinent terminology
  • Smart contracts
  • Autonomous agents
  • Decentralized organizations
  • Decentralized autonomous organizations
  • Decentralized autonomous corporations
  • Decentralized autonomous societies
  • Decentralized applications
  • Requirements of a DApp
  • Operations of a DApp
  • Design of a DApp
  • DApp examples
  • Platforms for decentralization
  • Ethereum
  • MaidSafe
  • Lisk
  • EOS
  • Innovative trends
  • Decentralized web
  • Web 1
  • Web 2
  • Web 3
  • Decentralized identity
  • Decentralized finance (DeFi)
  • Summary
  • Symmetric Cryptography
  • Working with the OpenSSL command line
  • Introduction
  • Cryptography
  • Confidentiality
  • Integrity
  • Authentication
  • Non-repudiation
  • Accountability
  • Cryptographic primitives
  • Keyless primitives
  • Random numbers
  • Hash functions
  • Secure Hash Algorithms
  • Symmetric cryptography
  • Message authentication codes (MACs)
  • Hash-based MACs (HMACs)
  • Stream ciphers
  • Block ciphers
  • Data Encryption Standard (DES)
  • Advanced Encryption Standard (AES)
  • How AES works
  • An OpenSSL example of how to encrypt and decrypt using AES
  • Summary
  • Public Key Cryptography
  • Mathematics
  • Modular arithmetic
  • Sets
  • Fields
  • Finite fields
  • Prime fields
  • Groups
  • Abelian groups
  • Rings
  • Cyclic groups
  • Order
  • Asymmetric cryptography
  • Integer factorization
  • Discrete logarithm
  • Elliptic curves
  • Public and private keys
  • RSA
  • Elliptic curve cryptography
  • Mathematics behind ECC
  • The discrete logarithm problem in ECC
  • RSA using OpenSSL
  • Encryption and decryption using RSA
  • ECC using OpenSSL
  • Digital signatures
  • RSA digital signature algorithms
  • The elliptic curve digital signature algorithm
  • How to generate a digital signature using OpenSSL
  • Cryptographic constructs and blockchain technology
  • Homomorphic encryption
  • Signcryption
  • Secret sharing
  • Commitment schemes
  • Zero-knowledge proofs
  • zk-SNARKs
  • zk-STARKs
  • Zero-knowledge range proofs—ZKRPs
  • Different types of digital signatures
  • Blind signatures
  • Multisignatures
  • Threshold signatures
  • Aggregate signatures
  • Ring signatures
  • Encoding schemes
  • Base64
  • Base58
  • Applications of cryptographic hash functions
  • Merkle trees
  • Patricia trees
  • Distributed hash tables
  • Summary
  • Consensus Algorithms
  • Introducing the consensus problem
  • The Byzantine generals problem
  • Fault tolerance
  • Types of fault-tolerant consensus
  • State machine replication
  • FLP impossibility
  • Lower bounds on the number of processors to solve consensus
  • Analysis and design
  • Model
  • Processes
  • Timing assumptions
  • Synchrony
  • Asynchrony
  • Partial synchrony
  • Classification
  • Algorithms
  • CFT algorithms
  • Paxos
  • Raft
  • BFT algorithms
  • Practical Byzantine Fault Tolerance
  • Istanbul Byzantine Fault Tolerance
  • Tendermint
  • Nakamoto consensus
  • Proof of stake (PoS)
  • HotStuff
  • Choosing an algorithm
  • Finality
  • Speed, performance, and scalability
  • Summary
  • Introducing Bitcoin
  • Bitcoin—an overview
  • The beginnings of Bitcoin
  • Egalitarianism versus authoritarianism
  • Bitcoin definition
  • Bitcoin—A user’s perspective
  • Sending a payment
  • Cryptographic keys
  • Private keys in Bitcoin
  • Public keys in Bitcoin
  • Addresses in Bitcoin
  • Base58Check encoding
  • Vanity addresses
  • Transactions
  • The transaction lifecycle
  • Transaction pool
  • Transaction fees
  • The transaction data structure
  • Metadata
  • Inputs
  • Outputs
  • Verification
  • The Script language
  • Types of scripts
  • Contracts
  • Coinbase transactions
  • Transaction validation
  • Transaction bugs
  • Transaction malleability
  • Value overflow
  • Blockchain
  • The genesis block
  • Stale and orphan blocks
  • Size of the blockchain
  • Network difficulty
  • 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
  • The Bitcoin Network and Payments
  • The Bitcoin network
  • Full client and SPV client
  • Bloom filters
  • 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 Bitcoin
  • Summary
  • Bitcoin Clients and APIs
  • Bitcoin client installation
  • Types of clients and tools
  • bitcoind
  • bitcoin-cli
  • bitcoin-qt
  • Setting up a Bitcoin node
  • Setting up the source code
  • Setting up bitcoin.conf
  • Starting up a node in the testnet
  • Starting up a node in regtest
  • Experimenting further with bitcoin-cli
  • Using the Bitcoin command-line tool – bitcoin-cli
  • Using the JSON RPC interface
  • Using the HTTP REST interface
  • Bitcoin programming
  • Summary
  • Alternative Coins
  • Introducing altcoins
  • Theoretical foundations
  • Alternatives to Proof of Work
  • Proof of Storage
  • Proof of Stake (PoS)
  • Various types of stake
  • Proof of Activity (PoA)
  • Non-outsourceable 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
  • Token versus cryptocurrency
  • Initial Coin Offerings (ICOs)
  • ERC20 standard
  • Summary
  • Smart Contracts
  • History
  • Definition
  • Ricardian contracts
  • Smart contract templates
  • Oracles
  • Software and network-assisted proofs
  • TLSNotary
  • TLS-N based mechanism
  • Hardware device-assisted proofs
  • Android proof
  • Ledger proof
  • Trusted hardware-assisted proofs
  • Types of blockchain oracles
  • Inbound oracles
  • Outbound oracles
  • Blockchain oracle services
  • Deploying smart contracts
  • The DAO
  • Summary
  • Ethereum 101
  • Ethereum – an overview
  • The yellow paper
  • Useful mathematical symbols
  • The Ethereum blockchain
  • Ethereum – a user’s perspective
  • The Ethereum network
  • The mainnet
  • Testnets
  • Private nets
  • Components of the Ethereum ecosystem
  • Keys and addresses
  • Accounts
  • Types of accounts
  • Transactions and messages
  • RLP
  • Contract creation transactions
  • Message call transactions
  • Messages
  • Transaction validation and execution
  • The transaction substate
  • State storage in the Ethereum blockchain
  • Transaction receipts
  • Ether cryptocurrency/tokens (ETC and ETH)
  • The Ethereum Virtual Machine (EVM)
  • Execution environment
  • The machine state
  • The iterator function
  • Smart contracts
  • Native contracts
  • The elliptic curve public key recovery function
  • The SHA-256-bit hash function
  • The RIPEMD-160-bit hash function
  • The identity/datacopy function
  • Big mod exponentiation function
  • Elliptic curve point addition function
  • Elliptic curve scalar multiplication
  • Elliptic curve pairing
  • Blake2 compression function ‘F’
  • Summary
  • Further Ethereum
  • Blocks and blockchain
  • The genesis block
  • The block validation mechanism
  • Block finalization
  • Block difficulty mechanism
  • Gas
  • Fee schedule
  • Wallets and client software
  • Wallets
  • Geth
  • Eth
  • Parity
  • Trinity
  • Light clients
  • Installation and usage
  • Geth
  • Ethereum account management using Geth
  • How to query the blockchain using Geth
  • Ethereum keystore
  • Eth installation
  • OpenEthereum installation
  • MetaMask
  • Installation
  • Creating and funding an account using MetaMask
  • Nodes and miners
  • The consensus mechanism
  • Forks in the blockchain
  • Ethash
  • CPU mining
  • GPU mining
  • Benchmarking
  • Mining rigs
  • Mining pools
  • ASICs
  • APIs, tools, and DApps
  • Applications (DApps and DAOs) developed on Ethereum
  • Tools
  • Geth JSON RPC API
  • Examples
  • Supporting protocols
  • Whisper
  • Swarm
  • Programming languages
  • Runtime bytecode
  • Opcodes
  • Summary
  • Ethereum Development Environment
  • Overview
  • Test networks
  • Components of a private network
  • Network ID
  • The genesis file
  • Data directory
  • Flags and their meaning
  • Static nodes
  • Starting up the private network
  • Mining on the private network
  • Remix IDE
  • MetaMask
  • Using MetaMask and Remix IDE to deploy a smart contract
  • Adding a custom network to MetaMask and connecting Remix IDE with MetaMask
  • Importing accounts into MetaMask using keystore files
  • Deploying a contract with MetaMask
  • Interacting with a contract through MetaMask using Remix IDE
  • Summary
  • Development Tools and Frameworks
  • Languages
  • Compilers
  • The Solidity compiler
  • Installation
  • Functions
  • Tools and libraries
  • Node.js
  • Ganache CLI
  • Ganache
  • Frameworks
  • Truffle
  • Drizzle
  • Embark
  • Brownie
  • Waffle
  • Etherlime
  • OpenZeppelin
  • Contract development and deployment
  • Writing smart contracts
  • Testing smart contracts
  • Deploying smart contracts
  • The layout of a Solidity source code file
  • Version pragma
  • Import
  • Comments
  • The Solidity language
  • Variables
  • Local variables
  • Global variables
  • State variables
  • Data types
  • Value types
  • Reference types
  • Control structures
  • Events
  • Inheritance
  • Libraries
  • Functions
  • Error handling
  • Summary
  • Introducing Web3
  • Exploring Web3 with Geth
  • Contract deployment
  • POST requests
  • Retrieving the list of accounts
  • Interacting with contracts via frontends
  • The HTML and JavaScript frontend
  • Installing Web3.js JavaScript library
  • Interacting with contracts via a web frontend
  • Creating an app.js JavaScript file
  • Creating a Web3 object
  • Calling contract functions
  • Development frameworks
  • Using Truffle to develop a decentralized application
  • Installing and initializing Truffle
  • Compiling, testing, and migrating using Truffle
  • Interacting with the contract
  • Using Truffle to test and deploy smart contracts
  • Deployment on decentralized storage using IPFS
  • Summary
  • Serenity
  • Ethereum 2.0—an overview
  • Goals
  • Main features
  • Roadmap of Ethereum
  • Development phases
  • Phase 0
  • The beacon chain
  • Beacon nodes
  • Validator nodes
  • Beacon and validator node comparison
  • Deposit contracts
  • Fork choice
  • P2P interface (networking)
  • ETH 2
  • Simple Serialize
  • BLS cryptography
  • Phase 1
  • Shard chains
  • Transitioning from Ethereum 1 to Ethereum 2
  • Phase 2
  • Phase 3
  • Architecture
  • Summary
  • Hyperledger
  • Projects under Hyperledger
  • Distributed ledgers
  • Fabric
  • Sawtooth
  • Iroha
  • Indy
  • Besu
  • Burrow
  • Libraries
  • Aries
  • Transact
  • Quilt
  • Ursa
  • Tools
  • Avalon
  • Cello
  • Caliper
  • Explorer
  • Domain-specific
  • Grid
  • Labs
  • Hyperledger reference architecture
  • Hyperledger design principles
  • Modular structure
  • Privacy and confidentiality
  • Identity
  • Scalability
  • Deterministic transactions
  • Auditability
  • Interoperability
  • Portability
  • Rich data queries
  • Hyperledger Fabric
  • Membership services
  • Blockchain services
  • Consensus services
  • Distributed ledger
  • The peer-to-peer protocol
  • Ledger storage
  • Smart contract services
  • APIs and CLIs
  • Components
  • Peers
  • 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 lifecycle in Hyperledger Fabric
  • Fabric 2.0
  • New chaincode lifecycle management
  • New chaincode application patterns
  • Enhanced data privacy
  • External chaincode launcher
  • Raft consensus
  • Better performance
  • Hyperledger Sawtooth
  • Core features
  • Modular design
  • Parallel transaction execution
  • Global state agreement
  • Dynamic and pluggable consensus algorithms
  • Multi-language support
  • Enhanced event mechanism
  • On-chain governance
  • Interoperability
  • Consensus in Sawtooth
  • PoET
  • PBFT
  • Raft
  • Transaction lifecycle
  • Components
  • Validator
  • REST API
  • Client
  • State
  • Transaction processors
  • Transaction families
  • REST API
  • Setting up a Sawtooth development environment
  • Prerequisites
  • Using PoET
  • Using PBFT
  • Setting up a Sawtooth network
  • Summary
  • Tokenization
  • Tokenization on a blockchain
  • Advantages of tokenization
  • Disadvantages of tokenization
  • Types of tokens
  • Fungible tokens
  • Non-fungible tokens
  • Stable tokens
  • Fiat collateralized
  • Commodity collateralized
  • Crypto collateralized
  • Algorithmically stable
  • Security tokens
  • Process of tokenization
  • Token offerings
  • Initial coin offerings
  • Security token offerings
  • Initial exchange offerings
  • Equity token offerings
  • Decentralized autonomous initial coin offering
  • Other token offerings
  • Token standards
  • ERC-20
  • ERC-223
  • ERC-777
  • ERC-721
  • ERC-884
  • ERC-1400
  • ERC-1404
  • Trading and finance
  • Financial markets
  • Trading
  • Exchanges
  • Orders and order properties
  • Order management and routing systems
  • Components of a trade
  • The underlying instrument
  • Trade lifecycle
  • Order anticipators
  • Market manipulation
  • DeFi
  • Trading tokens
  • Regulation
  • Building an ERC-20 token
  • Pre requisites
  • Building the Solidity contract
  • Solidity contract source code
  • Deploying the contract on the Remix JavaScript virtual machine
  • Adding tokens in MetaMask
  • Emerging concepts
  • Tokenomics/token economics
  • Token engineering
  • Token taxonomy
  • Summary
  • Blockchain – Outside of Currencies
  • The Internet of Things
  • Internet of Things architecture
  • Physical object layer
  • Device layer
  • Network layer
  • Management layer
  • Application layer
  • Benefits of IoT and blockchain convergence
  • Implementing blockchain-based IoT in practice
  • Setting up Raspberry Pi
  • Setting up the first node
  • Setting up the Raspberry Pi node
  • Building the electronic circuit
  • Government
  • Border control
  • Voting
  • Citizen identification (ID cards)
  • Health
  • Finance
  • Insurance
  • Post-trade settlement
  • Financial crime prevention
  • Payments
  • Decentralization
  • Faster settlement
  • Better resilience
  • Cross-border payments
  • Peer-to-peer loans
  • Media
  • Summary
  • Enterprise Blockchain
  • Enterprise solutions and blockchain
  • Success factors
  • Limiting factors
  • Slow performance
  • Lack of access governance
  • Lack of privacy
  • Probabilistic consensus
  • Transaction fees
  • Requirements
  • Privacy
  • Confidentiality
  • Anonymity
  • Performance
  • Scalability/speed
  • Access governance
  • Further requirements
  • Compliance
  • Interoperable
  • Integration
  • Ease of use
  • Monitoring
  • Secure off-chain computation
  • Better tools
  • Enterprise blockchain versus public blockchain
  • Use cases of enterprise blockchains
  • Enterprise blockchain architecture
  • Network layer
  • Protocol layer
  • Privacy layer
  • Governance layer
  • Integration layer
  • What is Apache Camel?
  • Application layer
  • Security, performance, scalability, monitoring
  • Designing enterprise blockchain solutions
  • TOGAF
  • Business architecture domain
  • Data architecture domain
  • Application architecture domain
  • Technology architecture domain
  • Architecture development method
  • Preliminary phase
  • Architecture vision
  • Business architecture
  • Information systems architecture
  • Technology architecture
  • Opportunities and solutions
  • Migration planning
  • Implementation governance
  • Architecture change management
  • Blockchain in the cloud
  • Currently available enterprise blockchains
  • Corda
  • Quorum
  • Fabric
  • Autonity
  • Comparison of main platforms
  • Enterprise blockchain challenges
  • Interoperability
  • Lack of standardization
  • Compliance
  • Business challenges
  • Corda
  • Architecture
  • Corda network
  • State objects
  • Transactions
  • Consensus
  • Flows
  • CorDapps
  • Components
  • Nodes
  • The permissioning service
  • Network map service
  • Notary service
  • Oracle service
  • Transactions
  • Vaults
  • Other tools
  • Transaction flow
  • Corda development environment
  • Quorum
  • Architecture
  • Enhanced P2P
  • Enhanced state (private and public)
  • Pluggable consensus
  • No transaction fees
  • Private transactions
  • Modified block generation mechanism
  • Modified block validation mechanism
  • Enhanced RPC API
  • Privacy manager
  • Transaction manager
  • Enclave
  • Cryptography used in Quorum
  • Privacy
  • Enclave encryption
  • Transaction propagation to transaction managers
  • Enclave decryption
  • Access control with permissioning
  • Performance
  • Pluggable consensus
  • Setting up Quorum with IBFT
  • Quorum Wizard
  • Installing Quorum Wizard
  • Running Quorum Wizard to create a new network
  • Cakeshop
  • Running a private transaction
  • Node 1
  • Node 2
  • Node 3
  • Node 4
  • Viewing the transaction in Cakeshop
  • Further investigation
  • Node 1
  • Node 2, which is privy to the transaction
  • Node 3, which is not privy to the transaction
  • Other Quorum projects
  • Remix plugin
  • Pluggable architecture
  • Summary
  • Scalability and Other Challenges
  • Scalability
  • Blockchain planes
  • Network plane
  • Consensus plane
  • Storage plane
  • View plane
  • Side plane
  • Methods for improving scalability
  • Layer 0 – network solutions
  • Layer 1 – on-chain solutions
  • Layer 2 – off-chain and multichain solutions
  • Privacy
  • Anonymity
  • Confidentiality
  • Techniques to achieve privacy
  • Layer 0
  • Layers 1 and 2
  • Security
  • Formal verification
  • Model checking
  • Verifying consensus mechanisms
  • Smart contract security
  • Static analysis in Remix IDE
  • Why3
  • Oyente
  • Other tools
  • Formal verification of smart contracts
  • Other challenges
  • Interoperability
  • Polkadot
  • Lack of standardization
  • Post-quantum resistance
  • Compliance and regulation
  • Summary
  • Current Landscape and What’s Next
  • Emerging trends
  • New implementations of blockchain technology
  • Application-specific blockchains
  • Start-ups
  • Technology improvements
  • Standardization
  • Consortia
  • Enhancements
  • Ongoing research and study
  • Cryptography
  • Cryptoeconomics
  • Hardware development
  • Formal methods and security
  • New programming languages
  • Education and employment within blockchain
  • Innovative blockchain applications
  • Blockchain as a Service
  • Convergence with other technologies
  • Alternatives to blockchains
  • Some debatable ideas
  • Public versus private on the blockchain
  • Central bank digital currency
  • Areas to address
  • Regulation
  • Illegal activity
  • Privacy or transparency
  • Blockchain research topics
  • Smart contracts
  • Cryptographic function limitations
  • Consensus algorithms
  • Scalability
  • Code obfuscation
  • Blockchain and AI
  • The future of blockchain
  • Summary
  • Index
Show More

Additional information

Veldu vöru

Rafbók til eignar

Aðrar vörur

0
    0
    Karfan þín
    Karfan þín er tómAftur í búð