Blockchain in Action
There’s a lot more to the blockchain than mining Bitcoin. This secure system for registering and verifying ownership and identity is perfect for supply chain logistics, health records, and other sensitive data management tasks. Blockchain in Action unlocks the full potential of this revolutionary technology, showing you how to build your own decentralized apps for secure applications including digital democracy, private auctions, and electronic record management.

Summary
There’s a lot more to the blockchain than mining Bitcoin. This secure system for registering and verifying ownership and identity is perfect for supply chain logistics, health records, and other sensitive data management tasks. Blockchain in Action unlocks the full potential of this revolutionary technology, showing you how to build your own decentralized apps for secure applications including digital democracy, private auctions, and electronic record management.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Blockchain is more than just the tech behind Bitcoin—much more! Combining impenetrable security, decentralized transactions, and independently verifiable supply chains, blockchain applications have transformed currency, digital identity, and logistics. Platforms such as Ethereum and Hyperledger make it easy to get started by using familiar programming languages.

About the book
Blockchain in Action teaches you how to design and build blockchain-based decentralized apps, and is written in a clear, jargon-free style. First, you’ll get an overview of how blockchain works. Next, you’ll code your first smart contract using Ethereum and Solidity, adding a web interface, trust validation, and other features until your app is ready for deployment. The only thing you need to get started is standard hardware and open source software.

What's inside

Blockchain compared with other distributed systems
Development in Solidity
Identity, privacy, and security
On-chain and off-chain data and operations

About the reader
For programmers who know JavaScript.

About the author
Bina Ramamurthy has thirty years of experience teaching distributed systems, data science, peer-to-peer networking, and blockchain.

Table of Contents

PART 1 - GETTING STARTED WITH BLOCKCHAIN PROGRAMMING

1 Blockchain basics

2 Smart contracts

3 Techniques for trust and integrity

4 From smart contracts to Dapps

PART 2 - TECHNIQUES FOR END-TO-END DAPP DEVELOPMENT

5 Security and privacy

6 On-chain and off-chain data

7 Web3 and a channel Dapp

8 Going public with Infura

PART 3 - A ROADMAP AND THE ROAD AHEAD

9 Tokenization of assets

10 Testing smart contracts

11 A roadmap to Dapp development

12 Blockchain: The Road ahead
1133658645
Blockchain in Action
There’s a lot more to the blockchain than mining Bitcoin. This secure system for registering and verifying ownership and identity is perfect for supply chain logistics, health records, and other sensitive data management tasks. Blockchain in Action unlocks the full potential of this revolutionary technology, showing you how to build your own decentralized apps for secure applications including digital democracy, private auctions, and electronic record management.

Summary
There’s a lot more to the blockchain than mining Bitcoin. This secure system for registering and verifying ownership and identity is perfect for supply chain logistics, health records, and other sensitive data management tasks. Blockchain in Action unlocks the full potential of this revolutionary technology, showing you how to build your own decentralized apps for secure applications including digital democracy, private auctions, and electronic record management.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Blockchain is more than just the tech behind Bitcoin—much more! Combining impenetrable security, decentralized transactions, and independently verifiable supply chains, blockchain applications have transformed currency, digital identity, and logistics. Platforms such as Ethereum and Hyperledger make it easy to get started by using familiar programming languages.

About the book
Blockchain in Action teaches you how to design and build blockchain-based decentralized apps, and is written in a clear, jargon-free style. First, you’ll get an overview of how blockchain works. Next, you’ll code your first smart contract using Ethereum and Solidity, adding a web interface, trust validation, and other features until your app is ready for deployment. The only thing you need to get started is standard hardware and open source software.

What's inside

Blockchain compared with other distributed systems
Development in Solidity
Identity, privacy, and security
On-chain and off-chain data and operations

About the reader
For programmers who know JavaScript.

About the author
Bina Ramamurthy has thirty years of experience teaching distributed systems, data science, peer-to-peer networking, and blockchain.

Table of Contents

PART 1 - GETTING STARTED WITH BLOCKCHAIN PROGRAMMING

1 Blockchain basics

2 Smart contracts

3 Techniques for trust and integrity

4 From smart contracts to Dapps

PART 2 - TECHNIQUES FOR END-TO-END DAPP DEVELOPMENT

5 Security and privacy

6 On-chain and off-chain data

7 Web3 and a channel Dapp

8 Going public with Infura

PART 3 - A ROADMAP AND THE ROAD AHEAD

9 Tokenization of assets

10 Testing smart contracts

11 A roadmap to Dapp development

12 Blockchain: The Road ahead
44.99 In Stock
Blockchain in Action

Blockchain in Action

by Bina Ramamurthy
Blockchain in Action

Blockchain in Action

by Bina Ramamurthy

Paperback

$44.99 
  • SHIP THIS ITEM
    In stock. Ships in 1-2 days.
  • PICK UP IN STORE

    Your local store may have stock of this item.

Related collections and offers


Overview

There’s a lot more to the blockchain than mining Bitcoin. This secure system for registering and verifying ownership and identity is perfect for supply chain logistics, health records, and other sensitive data management tasks. Blockchain in Action unlocks the full potential of this revolutionary technology, showing you how to build your own decentralized apps for secure applications including digital democracy, private auctions, and electronic record management.

Summary
There’s a lot more to the blockchain than mining Bitcoin. This secure system for registering and verifying ownership and identity is perfect for supply chain logistics, health records, and other sensitive data management tasks. Blockchain in Action unlocks the full potential of this revolutionary technology, showing you how to build your own decentralized apps for secure applications including digital democracy, private auctions, and electronic record management.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Blockchain is more than just the tech behind Bitcoin—much more! Combining impenetrable security, decentralized transactions, and independently verifiable supply chains, blockchain applications have transformed currency, digital identity, and logistics. Platforms such as Ethereum and Hyperledger make it easy to get started by using familiar programming languages.

About the book
Blockchain in Action teaches you how to design and build blockchain-based decentralized apps, and is written in a clear, jargon-free style. First, you’ll get an overview of how blockchain works. Next, you’ll code your first smart contract using Ethereum and Solidity, adding a web interface, trust validation, and other features until your app is ready for deployment. The only thing you need to get started is standard hardware and open source software.

What's inside

Blockchain compared with other distributed systems
Development in Solidity
Identity, privacy, and security
On-chain and off-chain data and operations

About the reader
For programmers who know JavaScript.

About the author
Bina Ramamurthy has thirty years of experience teaching distributed systems, data science, peer-to-peer networking, and blockchain.

Table of Contents

PART 1 - GETTING STARTED WITH BLOCKCHAIN PROGRAMMING

1 Blockchain basics

2 Smart contracts

3 Techniques for trust and integrity

4 From smart contracts to Dapps

PART 2 - TECHNIQUES FOR END-TO-END DAPP DEVELOPMENT

5 Security and privacy

6 On-chain and off-chain data

7 Web3 and a channel Dapp

8 Going public with Infura

PART 3 - A ROADMAP AND THE ROAD AHEAD

9 Tokenization of assets

10 Testing smart contracts

11 A roadmap to Dapp development

12 Blockchain: The Road ahead

Product Details

ISBN-13: 9781617296338
Publisher: Manning
Publication date: 11/03/2020
Series: In Action
Pages: 352
Product dimensions: 7.40(w) x 9.10(h) x 0.70(d)

About the Author

Bina Ramamurthy holds a Ph.D. in fault-tolerant distributed systems, and has thirty years of experience teaching cryptography, peer-to-peer networking, and distributed systems. She is the instructor and content creator for the University of Buffalo four-course specialization on blockchain technology on the Coursera MOOC platform, and the recipient of the 2019 SUNY Chancellor’s Award for Teaching Excellence.

Table of Contents

Preface xv

Acknowledgments xvii

About this book xviii

About the author xxii

About the cover illustration xxiii

Part 1 Getting Started with Blockchain Programming 1

1 Blockchain basics 3

1.1 From Bitcoin to blockchain 4

1.2 What is a blockchain? 6

1.3 Blockchain programming 8

Decentralized infrastructure 8

Distributed ledger technology 11

Disintermediation protocol 14

Trust enabler 15

1.4 Motivating scenarios 16

Automatic and consistent data collection 17

Timely information sharing 17

Verifiable compliance 18

Audi-table actions for provenance 18

Guidance for governance 18

Attribution of actions 18

Pandemic management 19

1.5 Retrospective 19

1.6 Summary 20

2 Smart contracts 22

2.1 The concept of a smart contract 23

Bitcoin transactions versus smart contract transactions 24

What does a smart contract do? 25

2.2 Design of a smart contract 25

A use case diagram for the counter 26

Data assets, peer participants, roles, rules, and transactions 27

From class diagram to contract diagram 28

2.3 Development of a smart contract code 30

Solidity language 30

Smart contract code for Counter 30

2.4 Deploying and testing the smart contract 32

The Remix IDE 32

Deployment and testing 34

Key takeaways 35

2.5 What makes a blockchain contract smart? 36

2.6 Decentralized airline system use case 38

ASK definition 38

Sequence of operations 39

2.7 Airlines smart contract 41

Peer participants, data assets, roles, rides, and transactions 42

Airlines smart contract code 44

ASK smart contract deployment and testing 46

2.8 Smart contract design considerations 52

2.9 Best practices 52

2.10 Summary 53

3 Techniques for trust and integrity 54

3.1 Essentials of trust and integrity 55

Trust 55

Integrity 57

3.2 Digital democracy problem 58

Designing a solution 58

Use case diagram 58

Incremental development of code 59

Users, assets, and transactions 60

Finite state machine diagram 62

Trust intermediation 64

Defining and using modifiers 65

Contract diagram including modifiers 66

Putting it all together 67

3.3 Testing 70

Positive tests 71

Negative tests 72

3.4 Using modifiers, require (), and revert() 73

3.5 Assert () declarations 74

3.6 Best practices 76

3.7 Retrospective 77

3.8 Summary 77

4 From smart contracts to Dapps 79

4.1 Dapp development using Truffle 81

The development process 82

Installing Truffle 82

Building the Dapp stack 84

4.2 Install Ganache test chain 85

4.3 Develop the smart contract 86

Create a project folder 87

Add smart contract and compile 89

Configure blockchain network 90

Deploy the smart contract 90

4.4 Develop and configure the web application 91

Develop ballot-app 92

Launch the ballot-app 94

Install MetaMask wallet 95

Interact with Ballot-Dapp 97

Connect web client to smart contract 99

4.5 Retrospective 100

4.6 Best practices 101

4.7 Summary 102

Part 2 Techniques for End-To-End Dapp Development 103

5 Security and privacy 105

5.1 Cryptography basics 107

Symmetric key cryptography 107

Asymmetric key cryptography 108

5.2 The relevance of public-key cryptography to blockchain 109

Generating Ethereum addresses 109

Transaction signing 110

Deploying smart contracts on Ropsten 110

Using the private key in mnemonic form 111

Populating a blockchain wallet 112

Deploying and transacting on Ropsten 113

5.3 Hashing basics 116

Digital signing of documents 117

Hashed data on distributed ledger 117

Hashes in Ethereum block header 117

Solidity hashing functions 118

5.4 Application of hashing 119

Blind auction design 119

Blind auction smart contract 120

Privacy and security aspects 121

Testing the Blind Auction contract 124

Test plan 125

5.5 Retrospective 127

5.6 Best practices 127

5.7 Summary 127

6 On-chain and off-chain data 129

6.1 On-chain data 131

6.2 Blind auction use case 133

On-chain event data 133

Blind auction with events 134

Testing with the web UI 138

Accessing on-chain data using the web3 API 144

6.3 Off-chain data: External data sources 145

6.4 ASK airline system 146

ASK concept 147

Airlines smart contract 150

ASK on-chain data 152

ASK off-chain data 153

ASK Dapp development process 153

ASK web user interface 154

Putting it all together 156

Interacting with ASK Dapp 156

6.5 Retrospective 159

6.6 Best practices 160

6.7 Summary 161

7 Web3 and a channel Dapp 162

7.1 Web3 API 163

Web3 in Dapp stack 163

Web3 packages 165

7.2 The channel concept 166

7.3 Micropayment channel 167

7.4 Micropayment channel use case 168

Traditional banking solution 169

Users and roles 172

On-chain and off-chain operations 173

MFC smart contract (MFC-contract) 175

MPC application development (MPC-app) 178

MPC sequence diagram 181

Demonstration of MPC execution 182

Accessing the web3 provider 187

Extensions of MPC 189

The relevance of the micropayment channel 190

Other web3 packages of interest 190

7.5 Retrospective 191

7.6 Best practices 191

7.7 Summary 192

8 Going public with Infura 193

8.1 Nodes and networks 194

8.2 Infura blockchain infrastructure 195

8.3 Going public with Infura 196

Blockchain node as a service 196

8.4 End-to-end process for public deployment 198

Account generation and management 199

Choosing a network and importing accounts 200

Collecting ether from faucets 201

Creating blockchain nodes on Infura 203

Installing HDWalletProvider 204

Configuring and deploying the smart-contract 204

Configuring and deploying the web application 205

8.5 Deploying Blind Auction-Dapp on Infura 206

Setting up the blind auction environment 206

Decentralized participants 207

Configure and deploy the beneficiary account 208

Configure and deploy bidders 211

Interact with deployed blind auction Dapp 212

8.6 Deploying MPC-Dapp on Infura 215

Setting up the MPC environment 215

Configure and deploy the organizer 217

Configure and deploy the worker 220

8.7 Retrospective 222

8.8 Best practices 222

8.9 Summary 223

Part 3 A Roadmap and the Road Ahead 225

9 Tokenization of assets 227

9.1 Ethereum standards 228

Ethereum improvement proposal 229

ERC20 token standard 229

Fungible and non-fungible tokens 231

9.2 RES4: Non-fungible real estate token 233

Use case diagram 233

Contract diagram 234

RES4 ERC721-compliant token 235

RES4 Dapp 237

Interaction with RES4 Dapp 239

9.3 Retrospective 246

9.4 Best practices 247

9.5 Summary 247

Testing smart contracts 249

10.1 Importance of testing smart contracts 250

Types of testing 250

Language choice for test programs 251

10.2 Testing counter smart contract 251

Writing counter test script 252

Positive and negative tests 255

Running the test script 255

10.3 Testing ballot smart contract 257

Writing the ballot test script 257

Executing the ballot test script 258

Describe() and it() test functions 259

10.4 Recap writing of test script 260

10.5 The blind auction test script 260

Analysis of described and it() code 262

Executing the blind auction test script 263

Full auction run 264

10.6 Retrospective 265

10.7 Best practices 265

10.8 Summary 266

11 A roadmap to Dapp development 267

11.1 Motivating scenario: Educational credentialing 268

11.2 The roadmap 269

11.3 Problem description 270

Context for the DCC application 270

Design choices 271

11.4 Analysis and design 272

Operation flow and finite state machine 272

Contract diagram 273

11.5 Developing the smart, contract 274

Data structures 274

Events 274

Modifiers 275

Functions 275

11.6 Local deployment 280

11.7 Automated testing using truffle 280

11.8 Developing the web application 282

UI design 283

Coding the app.js 285

11.9 Testing the DCC-Dapp 285

11.10 Public deployment 286

Deployment on Ropsten-Infura 287

Create web-client for distribution 289

11.11 Retrospective 290

11.12 Best practices 290

11.13 Summary 291

12 Blockchain: The road ahead 292

12.1 Decentralized identity 293

12.2 Self-managed identity 293

12.3 Consensus and integrity 296

Proof of work 297

Proof of stake 297

Byzantine fault-tolerant consensus 298

12.4 Scalability 298

12.5 Scalability solutions 299

Side channel 299

Block size 300

Network speed 300

12.6 Privacy 300

12.7 Public, private, and permissioned networks 300

12.8 Confidentiality 302

Open information 302

A solution 303

12.9 Security 303

12.10 Securing it with cryptocurrency 305

12.11 Accessing off-chain data (Oracles) 306

12.12 From foundations to practical systems 307

12.13 Looking ahead 309

12.14 Best practices 310

12.15 Retrospective 310

12.16 Summary 311

Appendix A UML blockchain design models 313

Appendix B Design principles 321

Index 323

From the B&N Reads Blog

Customer Reviews