Index

Please note that index links point to page beginnings from the print edition. Locations are approximate in e-readers, and you may need to page down one or more times after clicking a link to get to the indexed material.

A

ABI (application binary interface)

deploying sample betting application, 267–268, 272–274, 284–290

fast-track application tutorial, 136–137, 141

public functions listed on, 93–94

sample betting application, 240, 242, 244, 247–248

access, smart property and, 42–44

accessor functions, Solidity, 137

accounts, Ethereum, 105–110

addBetToTable helper function, 283

addBidToTable helper function, 282

addGameToTable helper function, 275

ADP (Automatic Data Processing), 7

AlphaPoint Distributed Ledger Platform, private blockchain, 176–177

Amdahl’s law, 230

American Revolution, Byzantine Generals Problem, 10–11

ANJ (Aragon Network Jurisdiction), DAO, 97–99

architecture

INFURA, 120–122

Web 3.0 technology stack, 72–73

Whisper layered, 71

Arizona Electronic Transactions Act (AETA), 86–88

ARPANET, 1970s, 55–56

Asor, Ohad, 68–69

asset management settlement use case, 38–39

asset ownership, Openchain, 214

automated testing, smart contracts, 171

Automatic Data Processing (ADP), 7

AWS (Amazon Web Services), deploying application to, 290

B

b-money (Wei Dai), 15

BaaS (Blockchain-as-a-Service), cloud platform, 13

bandwidth, Web 2.0, 57

Base58 encoded hash, IPFS objects as, 61

Berners-Lee, Tim, 57–58

best practices. See Ethereum application best practices

bets. See sample betting application; sample betting application deployment

BFT-SMaRt consensus protocol, Symbiont Assembly private blockchain, 215

BGL (block gas limit), 156–157, 235, 240, 242

BGP (Byzantine Generals Problem), 8–11

bids. See sample betting application; sample betting application deployment

Bitcoin (BTC)

blocksize and SegWit, 18–19

blocksize governance challenges, 218–220

bugs in core code, 221–222

Byzantine fault tolerance and, 10

designing, 11–13

incapable of hosting dapps, 233–234

as legal tender, 76–79

and merkle root, 19–20

and merkle trees, 21–22

mining, 17–18

overview of, 16

scripting, 22

and secure hashing, 20–21

state transition, 16–17

Bitcoin Cash, 220

Bitfury, 28

Bitland initiative, 82

BitLicense, Ripple, 22

Bitmessage, 70

BitTorrent Sync, 70

block gas limit (BGL), 156–157, 235, 240, 242

blockchain

business use cases. See business use cases

Byzantine Generals Problem vs., 9

categories of, 174–175

challenges. See challenges, blockchain; technical challenges

blockchain (cont.)

changing legal landscape, 76–79

defined, 1

fast tracking smart contract. See Ethereum, fast track application tutorial

legal ramifications of records, 81–82

mining in Ethereum, 107–108

model for IPFS, 62–63

obviating most evidentiary issues, 75

privacy laws and, 79–81

private. See private blockchain; private blockchain technology

sample application. See sample betting application

technologies, 147

technology use cases. See technology use cases

Blockchain Alliance, 30

Blockchain-as-a-Service (BaaS), cloud platform, 13

blockchain, introduction

Bitcoin. See Bitcoin (BTC)

in cloud computing, 32

collaborative implementations, 24–26

DAOs, 31–32

decentralized file storage, 30–31

Ethereum, 23–24

in financial technology space, 27

in gambling and betting, 32

and identity, 28–29

implementations, 15

as information technology, 6–8

Namecoin, 22

overview of, 1–6

and practice of law, 29–30

in real estate, 28

Ripple, 22–23

Satoshi Nakamoto breakthrough, 11–13

in sharing economy, 27–28

trust, Byzantine Generals Problem, 8–11

types of, 13–15

Blockchain Revolution (Tapscott), 29

blocks

Bitcoin fields for, 17–18

contract debugging and interaction, 244

Ethereum, 115

properties for Solidity, 132

public blockchain transaction flow, 1–2

blocksize, and Bitcoin, 18–19, 218–220

browser, running Ethereum dapps in, 138–139

BTC. See Bitcoin (BTC)

bugs, smart contract, 221–228

business use cases

currency and tokens, 33–35

digital tokens, 36–37

financial services. See financial services use cases

IoT protocol projects, 52–53

smart contracts, 46–52

C

Cakeshop, Quorum networks, 214

callable oracles, 153–154

callback, sample contract deployment, 243

cancelOpenBids private helper function, 252–253

categories, blockchain, 174–175

Cello, Hyperledger, 195

central intermediaries, removing in Web 3.0, 57

centralization bias, 108–109

centralization, Ethereum and, 110

centralized applications, dapps (decentralized applications) vs., 104

CFTC (Commodity Futures Trading Commission), 77

Chain Core, private blockchain, 177

challenges, blockchain

governance, 218–221

overview of, 217–218

technical. See technical challenges

Chaumian blinding cryptography, 15

cloud computing

blockchain and, 32

Ethereum Virtual Machine as, 147

rise of, 55

Swarm storage system, 64

trust issues with U.S., 56

Code and Other Laws of Cyberspace (Lessig), 76

code execution, EVM, 117–118, 147

“Code is law,” and blockchain, 76

coding limitations, smart contract legal issues, 87

Codius platform, Ripple, 171

collaborative implementations, blockchain, 24–26

collateral, using smart property as, 45–46

commodity, Bitcoin in U.S. deemed as, 77

communication

decentralized, 69–72

Ethereum using Whisper for, 120

compilers, Remix/browser Solidity, 140

components

Ethereum transaction, 110–111

smart contract, 83–84

Composer, Hyperledger, 195–196

concurrency, distributed computation systems, 66

confidential group communication, 69–72

consensus

Bitcoin mining, 17–18

Bitcoin state transition, 16–17

consortium blockchain and, 173

private blockchain and, 173, 175

solving trust problem, 48

consortium blockchain, 14, 174

constructor arguments, Solidity, 136–137

content addressing, IPFS nodes, 60

contract accounts, Ethereum, 105

contract addresses, handling persistent, 160–162

contract function, 138

contract-related functions, Solidity, 136

control and flow statements, Solidity, 127–128

control, smart property and, 42, 45–46

Corda, 25–26, 177

core code, bugs in Bitcoin, 221–222

CPA (cost per action/cost per acquisition), smart contract design, 88–96

CPC (cost per click), smart contract design, 88–96

createGame() function, 249–250, 268

cross-shard communication, technical challenges, 229

cryptocurrencies

blockchain as underpinning of Bitcoin, 13

definition of, 33–34

explosion of, 34

as legal tender, 76–79

role in replacing real cash, 34–35

and tokens, 33–35

top ten, 35

why blockchain works for, 33

cryptography

blockchain information technology, 6

blockchain using, 4–5

NSA deliberately weakening for spying, 56

Quorum use of, 214

Solidity and, 134–135

currency

Bitcoin advantages over fiat, 12

business use cases, 33–35

current state, Ethereum accounts in, 105

cycle time, smart contracts for faster, 40

D

DAO (decentralized autonomous organization)

blockchain in, 31–32

compliance with federal services regulation, 100

data as property and, 100

defined, 96

digital tokens, 104

and due diligence, 101

Ethereum fork and, 220

examples of, 96

and exiting contracts, 100

and intellectual property, 99–100

and jurisdiction, 97–99

legal issues, 96–97

liability, 99

overview of, 123–124

who/what is responsible and, 100

DAO hack, 220–224

dapp (decentralized application)

blockchain technology for, 148

create blockchain betting. See sample betting application

digital tokens for, 104

profile of Ethereum, 122–123

running in browser, 138–140

smart contracts implemented as, 104, 164

Swarm, 63

understanding, 233–234

Whisper use cases, 71

data

Know Your Customer use case, 37–38

layout of blockchain, 3–5

seeding in contract deployment, 266–271

data breaches

DAO legal issues, 96, 99

Web 2.0 issues, 57

data structures, 92–93, 245–247

data types/related functions, Solidity, 128–131

Date type, 138

DBM (decentralized business model), digital currency startups, 36

DCO (derivatives clearing organization) license, 77

debugging, smart contracts, 164–165

decentralized applications, using Ethereum, 122–123

decentralized autonomous organization. See DAO (decentralized autonomous organization)

decentralized communications, 69–72

decentralized digital currency. See also Bitcoin (BTC), 15

decentralized file storage, 30–31, 148

decentralized logic, smart contracts, 148

decentralized messaging, Whisper for, 148

decentralized name registration database, Namecoin, 22

“A Declaration of the Independence of Cyberspace” (Barlow), 55

Delaware, blockchain legislation, 81, 86

delegatecall, 169–170

denial-of-service. See DoS (denial-of-service) attacks

deployment

Monax tutorial, 202–212

sample application. See sample betting application deployment

smart contracts, 85, 240–243

derivatives clearing organization (DCO) license, 77

development environment, set up for blockchain betting dapp, 235

DGCL (Delaware General Corporation Law), 81

DHT (distributed hash table)

IPFS, 59, 63

Telehash, 70

digital currency startups, 36

digital fingerprint. See hashing (digital fingerprint)

digital signatures, 19, 87–88

digital tokens. See tokens

digitized passports, privacy protection, 79

directed acyclic graph (Merkle DAG), IPFS, 60–61, 177

directory structure

IPFS, 62

Truffle, 146

distributed computation, 2, 6–7, 66

distributed hash table. See DHT (distributed hash table)

distributed storage systems

InterPlanetary File System (IPFS), 59–62

overview of, 59

Storj, 64–65

Swarm, 62–64

DLT (distributed ledger technology)

blockchain details, 48–49

Corda as, 25–26

Hyperledger Fabric as, 24–25

legal ramifications of blockchain records, 81–82

potential of, 6

Ripple as advanced, 22–23

solving trust problem using, 48

Domus Tower, private blockchain, 177–178

DoS (denial-of-service) attacks

Bitcoin blocksize debate and, 218

blockchain technical challenges, 222–223

in Ethereum transactions, 111

IoT projects vulnerable to, 52

smart contract challenges, 171

Swarm resistance to, 64

VPN vulnerability to, 69

web 2.0 vulnerability to, 57

doSomething function, proxy contracts, 161–162

dry run using private nets, smart contracts, 167–169

due diligence, DAO and, 101

dynamically sized array types, layout of storage, 137–138

E

e-discovery software, litigation discovery, 75

ECPA (Electronic Communications Privacy Act of 1986), 55

electricity, sharing economy for, 28

Elements project, private blockchain technology, 178

encryption

Bitmessage, 70

Storj files, 65–66

enforceability, smart contract legal challenges, 86

Enigma cloud platform, 31

ENS (Ethereum Name Service) contract, bugs, 224–227

enterprise applications, smart contracts in, 164

EOAs (externally owned accounts), Ethereum, 105

EOS Project, 171

ERC20 token standard, Ethereum, 36

ether (ETH)

the cryptocurrency, 105–107

deploying to mainnet by obtaining, 266

as Ethereum tokens, 104

network fuel (gas) in Ethereum transactions, 111

Ethereum

blockchain development. See Truffle

blockchain support for Turing complete, 234

denial-of-service attacks on, 222–223

digital tokens, 36

Golem using transactions of, 67–68

governance challenges, 220–221

for smart contracts, 23–24

Swarm deep integration with, 62–64

Web 2.0 technology vs., 58

Whisper as part of, 70–72, 120, 148

Ethereum application best practices

autopsy of wallet bug, 169–170

blockchain development. See Ethereum blockchain development

debugging smart contract, 164–165

future and, 171–172

smart contract design, 154–162

smart contract interaction, 164

smart contract life cycle/migration, 163–164

smart contract validation, 165–169

Ethereum blockchain development

best practices, 146–147

blockchain technologies, 147

calling contracts from contracts, 149–150

handling events, 151–154

setting up environment for Truffle, 145–146

Solidity basics continued, 148–149

Ethereum Classic (ETC), 220

Ethereum, fast track application tutorial

developing simple smart contract, 140–143

overview of, 125

running dapps in browser, 138–140

Solidity basics, 126–127

Solidity block/transaction properties, 132

Solidity control/flow statements, 127–128

Solidity data types, 128–131

Solidity functions/parameters, 134–137

Solidity order of operation, 133

Solidity storage layout, 137–138

Solidity visibility specifiers, 131

Ethereum Foundation, 103

Ethereum Name Service (ENS) contract, bugs, 224–227

Ethereum technology

accounts, 105–110

Bitcoin vs., 103–104

block, 115

code execution, 117–118

decentralized applications, 122–123

decentralized autonomous organizations, 123–124

ether the cryptocurrency, 105–106

infrastructure, storage and communication, 120

INFURA, 120–122

messages, 111, 114–115

mining, 107–110

network fuel (gas), 111

obtaining ether, 106–107

scalability, 119–120

state transition function, 116–117

transactions, 110–111

Turing complete, 118–119

Ethereum Wallet, 139

events

debugging smart contracts using, 165

defining smart contract, 93

handling EVM, 151–154

sample betting application, 248

TransferOwnership, 149–150

evidence

blockchain data as, 75–76, 87–88

blockchain ledgers/systems as, 81

digital signatures as, 87–88

EVM (Ethereum Virtual Machine)

calling contracts from contracts, 149–150

denial-of-service attacks on, 222–223

halting contracts, 162

handling events, 151–154

Hyperledger Burrow as, 24–25

other blockchain technologies, 148

Solidity basics for, 148–149

understanding, 147

evolution, smart contract, 83–84

Explorer, Hyperleger, 196–197

external functions, Solidity, 131

externally owned accounts (EOAs), Ethereum, 105

F

Fabric, Hyperledger, 24–25, 180–194

Factom/Epigraph, 28

fast track application tutorial. See Ethereum, fast track application tutorial

fat clients, 56

fault tolerance

Byzantine, 2, 10–11

distributed computation systems, 66

Federal E-Sign Act, 87–88

Federal Rules of Criminal Procedure, Rule 41, 80

fees

mining in Ethereum using protection of, 109

smart contracts reducing, 41

fiat currencies, Bitcoin vs., 12

fields

Ethereum account, 105

Ethereum block, 115

Ethereum message, 114–115

Ethereum transaction, 110–111

IPFS objects, 60–61

fields, Bitcoin block, 17–18

file storage

blockchain decentralized, 30

Ethereum using Swarm for, 120

Filecoin, Swarm vs., 64

final state, Ethereum, 105

financial crisis of 2008, emergence of Bitcoin, 12

financial services

blockchain implementation trends, 7

blockchain technology in, 27

DAO compliance with regulations, 100

private blockchains in, 173

financial services use cases

asset management settlement, 38–39

global payments, 41–42

insurance claims processing, 38–40

Know Your Customer, 37–38

smart property, 42–43

trade finance, 40–41

transferring ownership of smart property, 43–44

using smart property as collateral, 45–46

flow statements, Solidity, 127–128

fog computing, 67

for statement, Solidity, 128

forking Bitcoin, 220

fraud, reducing, 40, 42

front-end user interface, deploying sample application, 271–280

functional tests, smart contract validation, 165

functions

creating game, sample betting application, 249–250

debugging smart contract, 164

defining smart contract, 92–95

handling events, 152

sample betting application, 250–259

Solidity parameters and, 134–137

Solidity visibility specifiers, 131

G

gambling, on blockchain, 32, 234–235

game. See sample betting application; sample betting application deployment

GameCreated event, 274–275

game_id, 251

GameScored event, 274–275

Garzick, Jeff, 221

gas

concept in EVM, 149–150

contract deployment, 242

Ethereum transactions, 111–114

single contract design, 156

testing smart contract, 167

gasPrice

concept in EVM, 149–150

contract debugging/interaction, 245

contract deployment, 242–243

Ethereum transactions, 111–114

Gaza Strip, blockchain land registry system, 82

GDPR (General Data Protection Regulation), EU, 79–80

getActiveGames function, 273

getGameById helper function, 251–252, 254

getGames function, 274–275, 280

Geth (Go Ethereum) command line client

application development environment, 235

deployment to mainnet, 266

DoS attacks on Ethereum and, 223

dry run using private nets, 167–169

getOpenBids contract function, 281–282

getTransactionReceipt(tx), 138, 245

GHOST (Greedy Heaviest Observed SubTree) protocol, 108–109

Git, Truffle development environment set up, 145

GitHub site, 126

global payments use case, financial services, 41–42

GNT (Golem Network Tokens), 68

Golem supercomputer, 67–68

Google Maps, immigration case, 81

governance

blockchain challenges, 218–221

DAO and jurisdiction, 97–99

law firms weak in information, 76

as risk of smart contracts, 85

use cases. See legal and governance use cases

Greek debt crisis, 12

H

Haiti, blockchain land registry system, 82

halting contracts, best practices, 162–163

halting problem, Ethereum Turing completeness and, 117–118

Hashcash puzzles, 15

hashing (digital fingerprint)

Bitcoin and Merkle tree, 19–20

Bitcoin and secure, 20–21

IPFS, 60–61

Health Insurance Portability and Accountability Act of 1996 (HIPAA/HITECH), and blockchain, 79

Hearn, Mike, 218–219

Hero of Alexandria, vending machine, 82–83

HIPAA/HITECH (Health Insurance Portability and Accountability Act of 1996), and blockchain, 79

HitPath. See smart contract design example

HydraChain, private blockchain technology, 179

Hyperledger frameworks

blockchain collaborative implementation, 24–25

blockchain support for Turing complete, 234

Hyperledger Burrow, 24–25

Hyperledger Cello, 195

Hyperledger Composer, 195–196

Hyperledger Explorer, 196–197

Hyperledger Fabric, 24–25, 180

Hyperledger Fabric tutorial, 180–194

Hyperledger Iroha, 25, 194

Hyperledger Sawtooth, 24–25, 195

overview of, 179–180

private blockchain technology, 179

reference architecture, 25

I

ICO (initial coin offering), 36, 156–157

identity

blockchain and, 28–29

Know Your Customer use case, 37–38

transferring smart property ownership, 43–44

if-then-else statement, Solidity, 127

illegal monetary transactions, and Bitcoin, 78, 79

implementations, blockchain

Bitcoin. See Bitcoin (BTC)

collaborative, 24–26

Ethereum, 23–24

Namecoin, 22

Ripple, 22–23

trends, 7–8

incentive system, Swarm, 64

index.html, 271–276

information technology, blockchain, 7–8

infrastructure, Ethereum, 120

INFURA, 120–122, 138

inherited functions, Solidity, 131

init helper function, wallet bug, 170

initial coin offering (ICO), 36, 156–157

initialization, Monax tutorial, 198

initWallet, wallet bug, 169–170

input element, Bitcoin transactions, 19

insurance claims processing use case, 38–40

Interbit, private blockchain technology, 197

interface

front-end user, 271–276

smart contract design, 154

intermediate layer(s), overcoming scalability, 228

internal functions, Solidity, 131

Internet, Web 1.0 and Web 2.0, 56–57

interoperability, smart contract challenges, 85

IoT (Internet of Things), 24–25, 52–53

IOTA project, future of smart contracts, 171

IP (intellectual property), DAO and, 99–100

IPFS (InterPlanetary File System)

blockchain decentralized file storage, 30

as distributed storage system, 59–62

IPNS, IPFS naming system, 60

Iroha, Hyperledger, 25, 194

IRS, 77–78

J

Jaguar supercomputer, 67

JUMP instruction, Ethereum Turing completeness, 118

JUMPI instruction, Ethereum Turing completeness, 118

jurisdiction

DAO and, 97–99

smart contract legal challenges, 86–87

K

kill function

contract debugging and interaction, 244

creating killable contract, 238–239

killable contract, code, 238–239

Kraken supercomputer, 67

KYC (Know Your Customer)

banking regulations require banks to, 28–29

financial services use case, 37–38

L

land registry system, blockchain, 82

large files, IPFS, 62

law

blockchain and practice of, 29–30

blockchain development challenges, 217

Electronic Communications Privacy Act of 1986, 55

lawyers, blockchain changing operations of, 74–76

layout, storage, 137–138

La`Zooz, 27–28

ledger of transactions

blockchain as distributed, 2

blockchain information technology, 6–8

public banking systems vs. Bitcoin, 12

legal and governance use cases

beginning of autonomous law. See smart contracts

blockchain and privacy laws, 79–81

blockchain changing legal landscape, 76

blockchain development challenges, 217

cryptocurrencies as legal tender, 76–79

DAOs, 96–101

overview of, 75–76

ramifications of blockchain records, 81–82

legal challenges

DAO, 96

smart contracts, 85–87

liability

DAO and, 96, 99

smart contracts and, 87

libraries, sample contract deployment, 241

life cycle

blockchain development, 7

smart contract migration, 163–164

smart contract validation, 165

Lightning Network (for Bitcoin), 228

link fields, IPFS objects, 60–61

linked contracts, 156–157, 160

locktimes, contract deployment, 267, 268

log function, proxy contracts, 160–161

logs

events, sample betting application, 248

retrieving bets from blockchain, 282–283

looping, 117–118, 167

lotteries, on blockchain, 234–235

M

mainnet, deploying to, 266, 290

majority voting, conensus in Quorum, 214

mapping, layout of storage, 137–138

memory, EVM code execution, 117

Merkle DAG (directed acyclic graph), 60–61, 177

Merkle tree

Bitcoin and, 19–20

for long-term sustainability, 21–22

Patricia tree combined with, 108

messages, 111–114

MetaMask

betting application user interface, 272–273, 276

deploying sample betting application to AWS, 290

developing contract, 139–140

development environment, sample betting dapp, 235

installing, 139

placing bets in betting application, 284–287

using browser for decentralized web via, 138

migration, smart contract life cycle, 163–164

mining

Bitcoin, 17–18

in Ethereum, 107–110, 221

pools, attacks against Bitcoin, 78

as validation/verification/committing process, 34

Mist browser, 235, 284

MLATs (Mutual Legal Assistance Treaties), 79–80

modules, smart contract design best practices, 154

Monax, private blockchain technology, 197–213

monetary policy, Bitcoin, 77

money laundering, 78–79

money transfers, Ripple for, 23

money, using blockchain for, 5

MongoDB, bugs in Bitcoin core code, 222

MultiChain, private blockchain technology, 213

Mutual Legal Assistance Treaties (MLATs), 79–80

N

Nakamoto, Satoshi, 11–13, 16, 218

name registration database, Namecoin as decentralized, 22

Namecoin, 22

National Security Agency (NSA), wiretaps on user data, 55–56

Nebulae supercomputer, 67

negotiation rights, smart property, 42–43

Netflix, 40 percent of all Internet traffic, 55

Nethereum package monitoring, EVM events, 151–152

Netscape browser, Web 1.0, 56

network fuel (gas), Ethereum transactions, 111–114

network-of-blockchain solutions, scalability challenges, 228–229

NodeJS, 145, 152, 235

nodes

Bitcoin and Merkle tree, 19–20

IPFS, 59–60

scalability of Ethereum platform, 119–120

syncing Ethereum, sample betting dapp, 235–236

nonce (random number)

Ethereum transactions, 111

transferring ownership for smart property, 43–44

normal accounts, Ethereum, 105

normal life cycle flow tests, smart contract validation, 165

notHalted modifier, halting contracts, 162

NPM package, 235, 243–245

NSA (National Security Agency), wiretaps on user data, 55–56

O

ObjectTech, 79–81

Onename, 28

The Onion Router (TOR), 70, 80–81

open source revolution, blockchain vs., 7–8

Openchain, private blockchain technology, 214

OpenZeppelin module, smart contract design, 154

operations

blockchain has only two, 1

order of Solidity, 132–133

oracles (data providers), 38, 153–154

output element, Bitcoin transactions, 19

overflow attacks, smart contract validation, 166

Ownable pattern, 148–149, 155

ownership

DAO legal issues, 96

legal ramifications of blockchain records, 81–82

smart property and, 42–46

Solidity best practices for Ethereum, 148–149

P

p2p (peer-to-peer) technology

Bitcoin/Ethereum and, 56

defined, 4

emergence of Bitcoin, 12

lodging sites, 28

public blockchain as, 4

swarm, IPFS content addressing, 60

pages, front-end user interface, 271

parameters, game, 250

Parity, 167–170

parseBids helper function, 269–270, 281–282

passwords

contract debugging/interaction, 244

no central authority managing in blockchain, 4

sample contract deployment, 242–243

seeding data in contract deployment, 269

Patricia tree, 108, 253

payable functions, sample betting application, 249

payments infrastructure, Stellar, 215

payouts, betting sample application, 259–260

PC (personal-computer) revolution, 55

performance, smart contracts and, 85

persistence, Swarm for, 120

persistent contract addresses, best practices, 160–162

Place Bet button, 283–284

Pneumatika (Hero of Alexandria), vending machine, 83

POE (“proof of existence”), and blockchain, 29

Poloniex, Ethereum DAO fork and, 220

portability, 197

PoS (proof-of-stake) mining algorithm, 16, 120, 221

post-genesis block, ether (ETH) issuance model, 106–107

PoW (proof-of-work)

emergence of Bitcoin, 12

Ethereum scalability and, 120

HydraChain and, 179

overview of, 16

PPSS (private peer sampling service), Whisper, 72

privacy

driving blockchain design, 217

future of smart contracts for absolute, 171

Interbit private blockchain technology, 197

laws, and blockchain, 79–81

private blockchain advantages, 175

private blockchain

creating/configuring for development, 237–238

overview of, 14–15, 173–176

private blockchain technology

AlphaPoint Distributed Ledger Platform, 176–177

Chain Core, 177

Corda, 177

Domus Tower, 177–178

Elements Core, 178

HydraChain, 179

Hyperledger, 179

Hyperledger Fabric tutorial, 180–194

Hyperledger frameworks, 179–180

Hyperledger Iroha, 194

Hyperledger Sawtooth, 195

Hyperledger tools, 195–197

Interbit, 197

Monax, 197–198

Monax tutorial, 198–213

MultiChain, 213

Openchain, 214

Quorum, 214

Stellar, 215

Symbiont Assembly, 215

private functions, Solidity, 131

private key, cryptography, 4–5

private peer sampling service (PPSS), Whisper, 72

promises, 272–274

“proof of existence” (POE), and blockchain, 29

proof-of-stake (PoS) mining algorithm, 16, 120, 221

proof-of-work. See POW (proof-of-work)

properties, Solidity block/transaction, 132

property

DAO data as, 100

virtual currencies taxed as, 77

Provenance, 29

proxy contracts, 160–162

public blockchain

comparing blockchains, 14–15

defined, 174

overview of, 13

scalability challenge of, 228

transaction flow, 1–2

what is different about, 3–4

public functions, 131, 248–250

public key cryptography, 60, 70

Q

Qm, all hashes begin with, 61

Quorum, private blockchain technology, 214

R

Raiden Network, 171, 228

random sampling, blockchain security, 231–232

read permission, private blockchain use cases, 175

reading, sample betting application, 261–263, 266

real cash, cryptocurrencies replacing, 34–35

real estate, blockchain and, 28

recording transactions, and scalability, 228

records, legal ramifications of blockchain, 81–82

recursive calls, 117, 166–167

reentrancy exploit, 166–167

registration, Monax tutorial, 198

regulations

challenges of blockchain development, 217

DAO compliance with financial services, 100

reinjection vulnerability, DAO hack, 223

Remix Solidity IDE, 140, 164

Republic of Georgia, blockchain land registry, 82

resource sharing, distributed computation systems, 66

responsibility, liability of DAOs, 100

“right to be forgotten” laws, European privacy laws, 79

Ripple (XRP), 22–23, 42, 171

risk

DAO liability for, 99

legal contract, 5–6

smart contract, 85

Ropsten test network, 130

S

S3 console, deploying sample application to AWS, 290

sample betting application

bidding, 250–259

compiling contract, 240

contract debugging/interaction, 243–246

creating/configuring private development chain, 237–238

creating game, 249–250

creating killable contract, 238–239

defining data structures, 246–247

deploying contract, 240–243

deployment. See sample betting application deployment

development environment set up, 236

enumerables, 247

events, 248

lotteries/betting/gambling, 234–235

overview of, 233, 248–249

reading bids, 261–263

reading games, 261

scoring games and payouts, 259–260

storage variables, 247–248

syncing Ethereum Node, 236–237

understanding dapp, 233–234

withdrawing, 260–261

sample betting application deployment

bet page markup, 277–280

deploying full contract, 265–266

deploying to AWS, 290

deploying to mainnet, 266

displaying bets, 282–283

displaying game information, 280

displaying open bids, 281–282

front-end user interface, 271–276

placing bids/bets, 283–287

scoring games, 287–288

seeding data, 266–271

withdrawing money, 288–289

Sawtooth, Hyperledger, 24–25, 195

scalability

Bitcoin/Merkle tree and, 21–22

blockchain challenges, 228–229

distributed computation systems and, 66

Ethereum challenges, 119–120, 221

Interbit private blockchain technology and, 197

SegWit improving Bitcoin, 19

scalability (cont.)

smart contract challenges, 85, 171

Web 2.0 issues, 57

schema, Bitcoin blockchain, 17–18

scoring games, 259–260, 279–280, 287–288

SCP (Stellar Consensus Protocol), 215

scripting

Bitcoin, 22

contract debugging/interaction, 243–245

seeding data in contract deployment, 266–271

SDLC (software development life cycle), and separate ledgers, 173

SEC (Securities and Exchange Commission), sale of DAO tokens, 96–97

second-layer solutions, scalability, 228

secure hash algorithm (SHA), 19–21

secure hashing, and Bitcoin, 20–21

Securities and Exchange Commission (SEC), and DAO tokens, 96–97

Securities and Exchange Commission (SEC) v. W. J. Howey Co (1946), 36–37

security

blockchain design driven by, 217

bugs in core code, 221–222

cryptography for, 4–5

DAO and jurisdiction, 97–99

denial-of-service attacks and, 222–223

distributed computation systems, 66

issues on VPN gateways, 69–70

smart contract, 84, 155–156, 223–228

Storj advantages, 65–66

via random sampling, 231–232

Web 2.0 issues, 57

seeding data, contract deployment, 266–271

SegWit (Segregated Witness), 18–19, 178

self-sovereign identity, digitized passports, 79

selfdestruct function, killable contracts, 239

semantic Web, Web 3.0, 57–59

server monitor, as oracle, 153–154

service-level liability, DAO, 99

setGameResult function, 287–288

SHA (secure hash algorithm), 19–21

ShapeShift.io, 29

sharding

blockchain challenges, 229–231

Ethereum challenges to allow, 221

storing encrypted Storj files, 65–66

sharing economy, blockchain in, 27–28

simplified payment verification (SPV) nodes, Ethereum scalability, 120

single contract design

difficulting of managing, 156

linked contracts vs., 156–157

small files, IPFS, 61–62

smart contract design, best practices

halting contracts, 162–163

handling persistent contract addresses, 160–162

linked contracts, 156–157

modules and interfaces, 154

security and roles, 155–156

single contract design, 156

user-specific contracts, 158–160

smart contract design example

defining data structures, 92–93

events, 93

functions, 93–95

overview of, 88–89

in practice, 95–96

using blockchain for advertiser payment application, 89–92

smart contract mediator (SCM), 29

smart contracts

blockchain and practice of law, 29–30

blockchain details, 48–49

blockchain for decentralized logic, 148

DAO and. See DAO (decentralized autonomous organization)

defined, 6

deploying to test chain. See sample betting application deployment

deployment, 141–142

developing simple, 140–141

development steps for writing. See sample betting application

in Ethereum, 103, 104

example of, 50–52

fast-tracking to Ethereum blockchain. See Ethereum, fast track application tutorial

insurance claim processing use case, 39–40

monitoring changes with events, 151

sample application. See sample betting application

security, 223–224

smart property extending, 42–46

trade finance (supply chain) use case, 40–41

trust problem with, 46–48

using Ethereum for, 23–24

validating, 142–143

smart contracts, best practices

debugging, 164–165

interaction with uses/enterprise applications, 164

life cycle/migration, 163–164

validation, 165–169

smart contracts, legal use cases

as beginning of autonomous law, 82–83

benefits of, 84

blockchain as evidence/digital signatures, 87–88

challenges of, 85

components, 83–84

design example, 88–95

evolution of, 83–84

legal challenges of, 85–87

in practice, 95–96

risks of, 85

smart property, 42–46

Snowden, Edward, 55

Society for Worldwide Interbank Financial Telecommunication (SWIFT), 28–29

software development life cycle (SDLC), and separate ledgers, 173

Solidity compiler, sample betting application, 234–236, 240

Solidity events, 93, 248

Solidity programming language

basics, 126–127

block and transaction properties, 132

contract debugging and interaction, 244

control and flow statements, 127–128

creating killable contract, 238–239

data types, 128–131

defining data structures, 245–247

Ethereum application best practices, 148–149

functions and parameters, 134–137

order of operation, 133

storage layout, 137–138

visibility specifiers, 131

writing smart contracts with, 125

spacecraft, 10

SpaceX Dragon flight system, 10

Split DAO() function, DAO hack, 223–224

SPV (simplified payment verification) nodes, Ethereum scalability, 120

stack, EVM code execution, 117

stack structure, bids, 254–259

stale blocks, using GHOST for, 108–109

state channels, scalability, 228

state, Ethereum and, 105, 107–108

state transition function (STF), Ethereum, 116–117

state transition system, Bitcoin, 16–18

Stellar Consensus Protocol (SCP), 215

Stellar, private blockchain technology, 215

STF (state transition function), Ethereum, 116–117

storage

distributed. See distributed storage systems

Ethereum technology for, 120

EVM code execution, 117

layout in Ethereum, 137–138

variables, sample betting application, 247–248

Storj, distributed storage system, 65–66

supercomputers, 67–69

Swarm, 62–64, 120, 148

SWIFT (Society for Worldwide Interbank Financial Telecommunication), 28–29

Sybil attacks, proof-of-work preventing, 16

Symbiont Assembly, private blockchain technology, 215

Szabo, Nick, 82

T

taxation, virtual currencies and, 77–78

technical challenges

bugs in core code, 221–222

denial-of-service attacks, 222–223

scalability, 228–229

security in smart contracts, 223–228

sharding, 229–231

technology

Ethereum. See Ethereum technology

information, 6–8

technology use cases

decentralized communications, 69–72

distributed computation, 66

distributed storage systems. See distributed storage systems

Golem, 67–68

overview of, 55–56

Web 1.0 and 2.0, 56–57

Web 3.0, 57–59

Web 3.0 technology stack, 72–73

Zennet, 68–69

Telehash, 70

testing

full contract, 265–266

Monax tutorial, 202–212

sample appliction deployment, 285–288

smart contract validation, 165–169

smart contracts lagging in automated, 171

TestRPC, Truffle development environment set up, 146

“The Truth About Blockchain,” (Iansiti/Lakhani), 101

third parties, 8, 35

throw keyword, 252

time, global blockchain payment technologies and, 41

timestamps, transaction, 12

title searching, blockchain and real estate, 28

tokens

Ethereum using ether, 104

Golem Network Tokens, 68

legal issues on sale of DAO, 96–97

overview of, 36–37

why blockchain works for, 33

tools, Hyperledger, 195–197

TOR (The Onion Router), 70, 80–81

trade finance (supply chain) use case, 40–41

transaction-based state machine, Ethereum as, 105

transaction list, mining in Ethereum, 107–108

transactions

Bitcoin and Merkle tree, 19–20

Bitcoin blocksize and fees for, 218–220

Bitcoin pseudonymous, 78

transactions (cont.)

elements of Bitcoin, 18–19

Ethereum, 110–114

flow of Bitcoin, 16–17

flow of blockchain, 1–2

programming ledger to trigger automatic, 2

properties for Solidity, 132

transferring ownership for smart property, 43–44

transfer function, smart contract life cycle/migration, 163–164

TransferOwnership event, 149–151

transferOwnership function, Solidity, 148–149

transparency

of distributed computation systems, 66

of global blockchain payment technologies, 41

legal challenge of smart contracts, 86

trigger-based oracles, 153–154

Truffle, 143, 145–146

trust

Byzantine Generals Problem and, 8–11

smart contracts and, 46–48, 163–164

U.S. cloud industry and, 55

Turing complete language

blockchains supporting dapps and, 234

EVM is, 103–104, 147

overview of, 118–119

Solidity is, 126

U

Uber, La`Zooz vs., 27–28

underBids array, sample betting application, 253–255

underflow attacks, smart contracts, 166

United States v. Lizarraga-Tirado, 81

UNIX timestamp, 138

“upload and disappear,” Swarm, 64

use cases

business. See business use cases

legal and governance. See legal and governance use cases

private blockchains, 175–176

technology. See technology use cases

user interface, deploying sample betting contract, 271–273

users

smart contract interaction with, 164

user-specific contracts, 158–160

UTXOs (unspent transaction outputs), Bitcoin, 16–17, 21–22

V

Vagrant installation, Monax tutorial, 198–213

validation

sample betting application, 255

smart contract, 85, 165–169

value, concept in EVM environment, 149–150

Value field, Ethereum transactions, 111

variables

sample betting application, 247–248

specifying in function definition, 249

visibility in Solidity, 131

VDice, decentralized gambling platform, 31

vending machines, smart contracts and, 82–83

versioned file systems, IPFS, 62

view transaction, blockchain processing, 1

visibility specifiers, Solidity, 131

Voorhees, Erik, 11–12

VPNs (virtual private networks), 69, 80

vulnerability tests, smart contract validation, 165

W

wallet address

deploying to mainnet by creating, 266

placing bets in betting application, 283–285

seeding data in contract deployment, 268

withdrawing money in betting application, 289

Washington, George, 10–11

WCL (Whisper communication layer), 71–72

Web 1.0, 56–58

Web 2.0, 56–58

Web 3.0

data storage challenges. See distributed storage systems

enabling decentralized web, 138

evolution of Web to, 57–59

solving trust problem, 47

technology stack, 72–73

web services, 58–59, 164

web3.js, 241–243

while statement, Solidity, 127

Whisper, decentralized communications, 70–72, 120, 148

whitelisted addresses, smart contract design, 155

withdraw.html, sample betting application, 271–273

withdrawing money, sample betting application, 260–261, 288–289

Wright, Craig Steven, 12

X

XRP (Ripple), 22–23, 42, 171

Y

Yellen, Janet, 76

Z

Zamfir, Vlad, 221

Zennet, 68–69

“zero-client” gateway, 138

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.165.62