Download as pdf or txt
Download as pdf or txt
You are on page 1of 69

Cryptocurrencies and Blockchain

Technology Applications Gulshan


Shrivastava
Visit to download the full and correct content document:
https://ebookmass.com/product/cryptocurrencies-and-blockchain-technology-applicati
ons-gulshan-shrivastava/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Regulation of Cryptocurrencies and Blockchain


Technologies - National and International Perspectives,
2nd Edition Rosario Girasa

https://ebookmass.com/product/regulation-of-cryptocurrencies-and-
blockchain-technologies-national-and-international-
perspectives-2nd-edition-rosario-girasa/

Biodiesel Technology and Applications Inamuddin

https://ebookmass.com/product/biodiesel-technology-and-
applications-inamuddin/

Handbook Of Research On Blockchain Technology 1st


Edition Edition Saravanan Krishnan

https://ebookmass.com/product/handbook-of-research-on-blockchain-
technology-1st-edition-edition-saravanan-krishnan/

Polymers Coatings: Technology and Applications 1st


Edition Inamuddin

https://ebookmass.com/product/polymers-coatings-technology-and-
applications-1st-edition-inamuddin/
Photoplethysmography Technology Signal Analysis and
Applications John Allen

https://ebookmass.com/product/photoplethysmography-technology-
signal-analysis-and-applications-john-allen/

Cryptocurrencies in Public and Private Law David Fox


(Editor)

https://ebookmass.com/product/cryptocurrencies-in-public-and-
private-law-david-fox-editor/

Coastal Reservoir: Technology and Applications 1st


Edition Shu-Qing Yang

https://ebookmass.com/product/coastal-reservoir-technology-and-
applications-1st-edition-shu-qing-yang/

Advanced Sensor Technology: Biomedical, Environmental,


and Construction Applications Ahmed Barhoum

https://ebookmass.com/product/advanced-sensor-technology-
biomedical-environmental-and-construction-applications-ahmed-
barhoum/

Handbook of Essential Oils: Science, Technology, and


Applications – Ebook PDF Version

https://ebookmass.com/product/handbook-of-essential-oils-science-
technology-and-applications-ebook-pdf-version/
Cryptocurrencies and Blockchain
Technology Applications
Scrivener Publishing
100 Cummings Center, Suite 541J
Beverly, MA 01915-6106

Publishers at Scrivener
Martin Scrivener (martin@scrivenerpublishing.com)
Phillip Carmical (pcarmical@scrivenerpublishing.com)
Cryptocurrencies and Blockchain
Technology Applications

Edited by
Gulshan Shrivastava
National Institute of Technology Patna, India

Dac-Nhuong Le
Haiphong University, Haiphong, Vietnam

Kavita Sharma
National Institute of Technology, Kurukshetra, India
This edition first published 2020 by John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USA
and Scrivener Publishing LLC, 100 Cummings Center, Suite 541J, Beverly, MA 01915, USA
© 2020 Scrivener Publishing LLC
For more information about Scrivener publications please visit www.scrivenerpublishing.com.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or other-
wise, except as permitted by law. Advice on how to obtain permission to reuse material from this title
is available at http://www.wiley.com/go/permissions.

Wiley Global Headquarters


111 River Street, Hoboken, NJ 07030, USA

For details of our global editorial offices, customer services, and more information about Wiley prod-
ucts visit us at www.wiley.com.

Limit of Liability/Disclaimer of Warranty


While the publisher and authors have used their best efforts in preparing this work, they make no rep­
resentations or warranties with respect to the accuracy or completeness of the contents of this work and
specifically disclaim all warranties, including without limitation any implied warranties of merchant-­
ability or fitness for a particular purpose. No warranty may be created or extended by sales representa­
tives, written sales materials, or promotional statements for this work. The fact that an organization,
website, or product is referred to in this work as a citation and/or potential source of further informa­
tion does not mean that the publisher and authors endorse the information or services the organiza­
tion, website, or product may provide or recommendations it may make. This work is sold with the
understanding that the publisher is not engaged in rendering professional services. The advice and
strategies contained herein may not be suitable for your situation. You should consult with a specialist
where appropriate. Neither the publisher nor authors shall be liable for any loss of profit or any other
commercial damages, including but not limited to special, incidental, consequential, or other damages.
Further, readers should be aware that websites listed in this work may have changed or disappeared
between when this work was written and when it is read.

Library of Congress Cataloging-in-Publication Data

ISBN 978-1-119-62116-4

Cover image: Pixabay.Com


Cover design by Russell Richardson

Set in size of 11pt and Minion Pro by Manila Typesetting Company, Makati, Philippines

Printed in the USA

10 9 8 7 6 5 4 3 2 1
Dedicated to our friends
and family for their
constant support during the
course of this book
Contents

List of Figures xv
List of Tables xix
Forewordxxi
Prefacexxiii
Acknowledgmentsxxix
Acronymsxxxi
Part I Cryptocurrencies and Blockchain Technology
1 Blockchain: A New Era of Technology 3
Gururaj H L, Manoj Athreya A, Ashwin A Kumar, Abhishek M Holla,
Nagarajath S M, Ravi Kumar V
1.1 Introduction to Web 3.0 6
1.1.1 Web 1.0 6
1.1.2 Web 2.0 6
1.1.3 Web 3.0 7
1.2 Blockchain 7
1.2.1 Hash Cryptography 8
1.2.2 Immutability 9
1.2.3 Distributed P2P Network 10
1.2.4 Mining 11
1.2.5 Consensus Protocol 11
1.3 Bitcoin 12
1.4 Ethereum 12
1.4.1 Ethereum Network 13
1.4.2 Interfacing with Ethereum 13
1.4.3 Ethereum Account 14
1.4.4 Ethereum Network Transactions 15
1.5 InterPlanetary File System (IPFS) 15
1.6 Decentralized Applications (DApps) 16
1.7 Case Study: FIR 17
1.7.1 Project Description 18
1.7.2 Tools Used 18
1.7.3 Project Workings 20

vii
viii Contents

1.8 Conclusion 22
References 23
2 Blockchain: A Path to the Future 25
Avinash Kaur, Anand Nayyar, Parminder Singh
2.1 Introduction 26
2.2 Blockchain Architecture 27
2.2.1 Block 27
2.2.2 Digital Signature 28
2.2.3 Main Attributes of Blockchain 29
2.3 Types of Blockchain Systems 29
2.4 Consensus Algorithms 30
2.4.1 Proof of Work (PoW) 30
2.4.2 Pure Stake-Based Consensus 34
2.4.3 Leased Proof of Stake (LPoS) 34
2.4.4 Delegated Proof of Stake (DPOS) 34
2.4.5 Hybrid Form of PoS and PoW 35
2.4.6 Practical Byzantine Fault Tolerance (PBFT) 35
2.4.7 Ripple 35
2.4.8 Tendermint 35
2.4.9 Proof of Elapsed Time 36
2.4.10 Proof of Activity (PoA) 36
2.4.11 Proof of Burn (PoB) 36
2.5 Blockchain Applications That Are Transforming Society 37
2.6 Future Scope 38
References 39
3 Blockchain in 5G 43
C. Mageshkumar, J. Rajeshkumar, L. Godlin Atlas, P. Hamsagayathri
3.1 Introduction 44
3.1.1 What Is Blockchain Technology? 45
3.1.2 Blockchain in Real-Time World 45
3.1.3 Working Process of Blockchain 47
3.2 Data Economy of Blockchain and 5G 47
3.3 Combination of Blockchain Technology and 5G Mobile Connection 50
3.4 How to Use 5G and Blockchain Together 50
3.5 Applications of Blockchain and 5G 52
3.5.1 Smart Contracts 52
3.5.2 Data Management 52
3.5.3 Supply Chain Auditing 52
3.5.4 Entertainment and Multimedia 52
3.5.5 Smart Home 53
3.5.6 Logistics and Shipping 53
3.5.7 Drone Operation 53
3.6 Conclusion 53
References 53
Contents ix

4 Blockchain in Social Networking 55


T. Poongodi, R. Sujatha, D. Sumathi, P. Suresh, B. Balamurugan
4.1 Overview of Blockchain and Social Networking Platform 56
4.1.1 Basic Structure of Blockchain 57
4.1.2 Review of Social Networking Platform 58
4.1.3 Relationship between Social Media and Blockchain 60
4.2 Decentralized Online Social Network 60
4.2.1 Distributed Online Social Network Architecture 60
4.2.2 Social Data Representation 61
4.2.3 Security Issues 63
4.3 Trusted Social Network with Blockchain Technology 63
4.3.1 Rumor Spreading Model 65
4.3.2 Blockchain Protocols for Rumor Spreading 66
4.3.3 Comparison of SIR and Blockchain-Based SIR 67
4.4 Privacy-Preserving Services for Social Network 69
4.4.1 Blockchain-Based Social Media 70
4.4.2 Impact of Blockchain in Social Media 71
4.5 Issues and Challenges of Blockchain in Social Network 72
4.6 Conclusion 73
References 73
5 Integrating Blockchain with CACC for Trust and Platoon Management 77
Pranav Kumar Singh, Roshan Singh, Sunit Kumar Nandi, Sukumar Nandi
5.1 Introduction 78
5.2 Literature Review 80
5.3 Background 81
5.3.1 CACC Platooning 81
5.3.2 Blockchain 82
5.3.3 Smart Contracts 82
5.3.4 Ethereum 82
5.4 Consensus in Blockchain 83
5.4.1 Proof-of-Work (PoW) 83
5.4.2 Proof-of-Authority (PoA) 84
5.5 Proposed Framework 84
5.5.1 Blockchain at the Vehicular Plane for Intra-platoon
Communications 84
5.5.2 Blockchain at the RSU Plane for Trust and Reputation
Management 89
5.6 Experiments 91
5.6.1 Experiment 1: Blockchain for Intra-platoon Communication and
Platoon Management 91
5.6.2 Experiment 2: Blockchain for Trust and Reputation Management 91
5.7 Results and Discussion 92
5.8 Conclusion 94
References 95
x Contents

6 Impact of Blockchain for Internet of Things Security 99


Bhawana Rudra
6.1 Introduction 100
6.2 Challenges and Issues in IoT 101
6.2.1 Attacks on IoT 101
6.3 Blockchain 106
6.3.1 Features 107
6.3.2 Blockchain Types 110
6.4 IoT Blockchain Approaches 110
6.4.1 Blockchain Platforms for IoT 111
6.4.2 Applications 114
6.5 Research Challenges 119
6.6 Conclusion 121
References 121
7 Chaos Control Dynamics of Cryptovirology in Blockchain 129
Rashmi Bhardwaj and Saureesh Das
7.1 Introduction 130
7.2 Mathematical Modeling and Stability Analysis 132
7.2.1 Fixed-Point Analysis 134
7.2.2 Phase Space Analysis 137
7.2.3 Time Series Analysis 138
7.2.4 Bifurcation Analysis 139
7.3 Lyapunov Exponent and Chaos 142
7.4 Controlling of Chaos 144
7.5 Conclusion 145
References 146
8 Blockchain and Bitcoin Security 149
K. Murugeswari, B. Balamurugan and G. Ganesan
8.1 Introduction 150
8.2 Security Threats to Bitcoin 151
8.3 Working Idea of Bitcoin 151
8.4 Case Study for Analyzing the Reason for Fall in Bitcoin Value 152
8.4.1 Security Threats to Bitcoin Protocol 152
8.4.2 Security Threats to Bitcoin Services 152
8.4.3 Security Threats by Other Factors 152
8.5 Analyzed Report 152
8.6 Rise of Bitcoin Value 154
8.7 Conclusion 154
References 154

Part II Cryptocurrencies and Blockchain Applications


9 Applications with Blockchain Technique 159
L. Godlin Atlas, C. Magesh Kumar, Rajakumari, P. Hamsagayathi
9.1 Introduction 160
Contents xi

9.1.1 Overview 160


9.1.2 Decentralization 161
9.1.3 Immutability 163
9.2 Applications of Blockchain Technology 164
9.2.1 Blockchain Technology in the Food Industry 164
9.2.2 Cybersecurity 165
9.2.3 Voting 167
9.2.4 Land Registry 169
9.2.5 Blockchain Applications in Healthcare 170
9.2.6 Blockchain Applications in Internet of Things (IoT) 173
9.2.7 Vehicle Industries 176
9.2.8 Smart Appliances 176
9.2.9 Supply Chains 177
9.3 Conclusion 177
References 177
10 Impact of Application of Big Data on Cryptocurrency 181
Sandeep Kr. Sharma, Rajiv Kumar Modanval, N. Gayathri, S. Rakesh Kumar
and C. Ramesh
10.1 Introduction 182
10.2 Related Studies 183
10.3 Cryptocurrency 183
10.3.1 How Does a Cryptocurrency Transaction Work? 184
10.3.2 The Cryptocurrency Market 185
10.3.3 Future of Cryptocurrency in a Country Like India 185
10.4 Blockchain 186
10.5 Big Data 187
10.5.1 Introduction 187
10.5.2 Importance of Big Data 188
10.6 Coexistence of Big Data and Blockchain 189
10.6.1 Ensuring Data Quality Using Blockchain and Big Data 190
10.6.2 Where Can Cryptocurrency with Big Data Be Used? 191
10.7 Future Aspects of Cryptocurrency with Big Data 192
10.8 Conclusion 193
References 193
11 A Neoteric Smart and Sustainable Farming Environment
Incorporating Blockchain 197
M. Afshar Alam, Abdul Ahad, Sherin Zafar, Gautami Tripathi
11.1 Introduction 198
11.2 Artificial Intelligence Technology and Its Impact on Agriculture 200
11.2.1 Future of Artificial Intelligence in Agriculture 200
11.2.2 AI vs. Grasshoppers 201
11.3 Blockchain Technology (BCT) and Its Impact on Agriculture 201
11.3.1 Types of Blockchain 202
11.3.2 Generations of Blockchain Technology 202
11.3.3 Blockchain in Agriculture: A Boost to Smart Agriculture 203
xii Contents

11.4 A Neoteric Smart and Sustainable Farming Environment Incorporating


Blockchain-Based Artificial Intelligence Approach 206
11.5 Conclusion and Future Work 211
References 211
12 Theories of Cryptocurrency, Blockchain and Distributed Systems
and Environmental Implications 215
P. Mary Jeyanthi
12.1 Introduction 216
12.2 Literature Review 218
12.3 Theories of Cryptocurrency, Blockchain and Distributed Systems 219
12.3.1 The Theory of Blockchains 219
12.3.2 Definition of Blockchains 220
12.3.3 Distributed Ledger Technology (DLT) vs. Blockchain 220
12.3.4 Evolving Terminology with Evolved Technology:
Decentralized vs. Distributed 221
12.3.5 Main Bitcoin Properties: A Peer-to-Peer Electronic Cash System 224
12.4 Environmental Implications of the Cryptocurrency Market 232
12.4.1 Key Stats 232
12.4.2 Energy Consumption 234
12.4.3 What’s Next? 235
12.5 Conclusion 236
References
236
13 Blockchain Technology: A Paradigm Shift in Investment Banking 239
R. Vedapradha, Hariharan Ravi, Arockia Rajasekar
13.1 Introduction 240
13.1.1 Evolution of Technology 240
13.1.2 Scope of Applications 240
13.1.3 Merits of Blockchain Technology in Banks 242
13.1.4 Investment Banks 243
13.1.5 Theoretical Framework 243
13.1.6 Investment Banking Operational Levels 244
13.1.7 Conceptual Framework 247
13.1.8 Challenges 248
13.2 Literature Review 249
13.3 Statement of the Problem 250
13.3.1 Objectives 250
13.3.2 Hypothesis 251
13.3.3 Sampling 251
13.3.4 Data Collection and Source 251
13.3.5 Variables and Statistical Tools Used 251
13.3.6 Limitations 251
13.4 Results 251
13.5 Discussion of Findings 256
Contents xiii

13.6 Conclusion 257


References 257
14 Trading Energy as a Digital Asset: A Blockchain-Based Energy Market 261
Claudia Pop, Marcel Antal, Tudor Cioara, Ionut Anghel
14.1 Introduction 262
14.2 Blockchain-Based P2P Energy Market 263
14.3 Distributed Ledger for Energy Tracking 265
14.3.1 Energy Provenance and Immutability 266
14.3.2 Energy Transactions Privacy 268
14.4 Self-Enforcing Smart Contracts for Energy Market Management 271
14.4.1 Prosumers Registration and Permission Control 271
14.4.2 Prosumers Energy Trading 273
14.5 Conclusion 277
References 277
15 Application View towards Blockchain: Demystifying the Myths 281
Utkarsh Chitranshi and Sunil Kumar Chawla
15.1 Introduction 282
15.1.1 Problems in the Present System 282
15.1.2 Definitions 283
15.2 What Blockchain Does Not Replace 286
15.3 Mining Mechanism 287
15.4 Various Participants of Blockchain System 287
15.5 Organized Use Cases 288
15.6 Hyperledger 289
15.7 Steps to Creating Your Own App 289
15.8 Advertising Industry 290
15.9 Present Day Implementation 291
15.10 Versatile Use Cases 292
15.11 Myths 293
15.12 Conclusion 294
References 294
List of Figures

1.1 Sectors of blockchain. 5


1.2 Cryptographically linked blocks. 8
1.3 Hash function. 9
1.4 Immutability of blockchain. 9
1.5 P2P network of blockchain. 10
1.6 Process of mining. 11
1.7 Ethereum network. 13
1.8 Interfacing with Ethereum. 14
1.9 Transaction in Ethereum network. 15
1.10 Index page of the application. 20
1.11 Fields for a complaint. 20
1.12 Submitting the complaint. 21
1.13 Fetching complaint by ID. 21
1.14 Fetching recent complaint. 22
2.1 Continuous sequence of blocks in blockchain. 26
2.2 Block structure. 27
2.3 Digital signature. 28
2.4 Blockchain branches scenario. 31
2.5 Double-spending attack script. 32
2.6 Technique for choosing main chain when fork appears. 33
3.1 Blockchain { the invisible technology. 44
3.2 Transaction cycle of blockchain. 45
3.3 Collaboration of Blockchain with 5G. 49
3.4 The fusion of Blockchain and 5G. 51
4.1 An example of blockchain. 57
4.2 Block structure. 58
4.3 Popular social networks as of April 2019. 59
4.4 Data generated every single minute (Courtesy of Domo, Inc.). 60
4.5 DOSN architecture. 61
4.6 Hierarchical organization of social content. 62
4.7 An instance of an object structure. 63
4.8 Architecture of blockchain-based information exchange. 64
4.9 Comparison of SIR and Blockchain-based SIR model. 68
4.10 Blockchain technology market size. 72
5.1 CACC platooning variants. 81
5.2 Blockchain. 82

xv
xvi List of Figures

5.3 Blockchain in the platoon for intra-platoon communication and platoon


management. 85
5.4 Periodic self-status update in a smart contract by vehicle. 86
5.5 Operations performed by the initial vehicles (validator nodes) in the
CACC platoon. 86
5.6 Operations performed by non-initial platoon members. 87
5.7 Blockchain for trust and reputation management at RSU plane. 90
5.8 Testbed setup for the CACC platoon of vehicular plane. 92
5.9 Testbed setup for maintaining blockchain at the RSU plane. 92
5.10 CPU utilization of blockchain node (vehicle) when running the PoA
blockchain consensus mechanism. 93
5.11 System performance of blockchain node (RSU) when idle. 93
5.12 System performance of blockchain node (RSU) when mining. 94
7.1 Schematic diagram of the VVP model. 133
7.2 The different dynamic states observed in 2D phase space. 138
7.3 Combined time series plots for different dynamic states. 138
7.4 Bifurcation diagram for variation in b1 parameter. 141
7.5 Lyapunov exponent plot for different dynamic states. 144
7.6 Synchronization in Case 1 and synchronization with chaos control of chaos
in Case 2 on activation of Controller 1 and Controller 2 at t = 1000. 145
8.1 Understanding a Bitcoin transaction. 150
8.2 Average percentage of the Bitcoin value drop. 153
8.3 Bitcoin price prediction. 154
9.1 Linked list. 160
9.2 Hash function. 161
9.3 Simplified Bitcoin blockchain. 161
9.4 Client-Server model. 161
9.5 Peer-to-peer connection. 162
9.6 Centralized vs. Decentralized downloading. 162
9.7 Photo showing the effects of the ban on spinach due to the E. coli
outbreak. 164
9.8 Flow of supply process. 165
9.9 Representation of cybersecurity. 166
9.10 Representation of voting technology using blockchain. 167
9.11 Representation of voting system. 168
10.1 Growth of big data from GBs to ZBs. 183
10.2 Expected growth of bitcoins based on past data. 184
10.3 Schematic of how a blockchain works. 187
10.4 Growth of big data research studies by various people in different formats. 188
10.5 Digital transformations in Industry 4.0 using Big Data. 189
10.6 Use of blockchain and big data in health facilities. 190
11.1 Farmers across various states caught in the cycle of agricultural debt. 199
11.2 Types of blockchain. 202
11.3 Major components of the global agricultural blockchain. 203
11.4 Challenges facing blockchain methodology. 205
List of Figures xvii

11.5 Artificial intelligence approach to revolutionize farming methodology into


sustainable farming and e-agriculture. 206
11.6 Potential benefits and opportunities provided through blockchain in
e-agriculture. 207
11.7 Different stages of the agricultural supply chain in which the proposed
work can be hashed into a block forming a blockchain. 209
12.1 Bitcoin energy consumption index. 217
12.2 Photographic depiction of the relation between cryptocurrencies and the
environment. 217
12.3 The environmental impacts of Bitcoin. 218
12.4 Simple blockchain model. 220
12.5 Distributed ledger technology (DLT). 221
12.6 Distributed communications networks. 221
12.7 Blockchain structure. 222
12.8 How blockchain works. 223
12.9 Diagram of the combined technological advancements of Bitcoin. 224
12.10 The November 1, 2008 online post of Satoshi Nakamoto announcing the
white paper that became Bitcoin. 224
12.11 Digital signatures. 225
12.12 How a blockchain works. 226
12.13 Published blockchain and private blockchain. 227
12.14 The threat of double-spending. 230
12.15 What is blockchain technology? 231
12.16 Blockchain: A blockchain is a linked list that is built with hash pointers
instead of pointers. 232
12.17 Environmental implications of the cryptocurrency market. 233
12.18 Steps to determine Bitcoin’s energy consumption. 235
13.1 Applications of blockchain technology. 241
13.2 Blockchain technology for better customer experience. 242
13.3 Theoretical framework of investment banks. 243
13.4 Process in front-end operations. 245
13.5 Process in middle operations. 246
13.6 Process in back-end operations. 247
13.7 Flowchart representation of a conceptual framework. 248
13.8 Path diagram with standardized estimates displayed based on the
regulatory framework in investment banks. 252
14.1 Blockchain-based P2P energy market. 263
14.2 Example of P2P network distributed ledger [26]. 265
14.3 Energy transactions registered in blockchain. 266
14.4 Merkle tree for storing multiple energy transactions and Merkle path. 267
14.5 Private transaction for energy tokens using zero-knowledge proofs. 271
14.6 Smart contract controlling prosumers registration in the energy market. 273
14.7 Energy token based on ERC-721 contract (left) and token metadata (right). 274
14.8 Prosumer-level smart contracts for defining energy bids (left) and offers
(right). 275
xviii List of Figures

14.9 Smart contract for market session management. 275


14.10 Smart contract for market session financial settlement. 276
15.1 Parts of a block in a blockchain. 286
15.2 The market capital of the main cryptocurrencies; the total market capital
presently is $323.43 billion. 288
List of Tables

1.1 Difference between Client-Server and P2P. 10


1.2 Difference between bitcoin, ethereum, and hyperledger. 17
2.1 Classification of blockchain systems. 29
2.2 Consensus algorithms comparison. 37
4.1 Issues and techniques related to different areas of social media. 70
5.1 Testbed details. 91
8.1 Bitcoin value changes against the U.S. dollar and their reasons. 153
11.1 Generations of blockchain. 203
12.1 Bitcoin energy consumption. 234
13.1 Model fit summary of the structural equation model of adaptability of
blockchain technology in investment banks. 252
13.2 Confirmatory factor analysis of the impact of the adoption of technology
on the performance based on the SEM model. 253
13.3 Regulatory framework and performance on the adaptability of the blockchain. 254
13.4 Model fit summary of the multiple linear regression model. 255
13.5 The performance predictors in the regression model. 255
14.1 Generator functions for zero-knowledge proofs. 270
14.2 Prover and verifier functions for zero-knowledge proofs. 271
14.3 Public vs. private blockchain for energy marketplace implementation. 272
15.1 Famous cryptocurrencies around the world. 282
15.2 List of some key players in the advertising industry. 291
15.3 List of some successful startups using blockchain around the world and
their basic field of work. 292
15.4 The list of some successful Indian startups and their basic application and
product. 293

xix
Foreword

The concept of blockchain recently came into the limelight when the hype around Bitcoin
and other cryptocurrencies gained momentum. Blockchain is the underlying principle
behind cryptocurrencies. At the center of blockchain is a distributed ledger that records all
the transactions that take place in the network. A blockchain network is usually described
as decentralized because it is replicated across many network participants, each of which
collaborates in its maintenance. In addition to being decentralized and collaborative, the
information recorded on the blockchain is also immutable, which guarantees that once a
transaction has been added to the ledger, it cannot be modified. This property of immuta-
bility assures the participants that their information is safe and secure.
The technology itself holds much more promise in various areas such as time stamping,
logging of critical events in a system, recording of transactions, trustworthy e-governance,
etc. With blockchain technology in the financial sector, participants can interact directly
and can make transactions across the Internet without the interference of a third party.
Such transactions through blockchain will not share any personal information regarding
participants and it creates a transaction record by encrypting the identifying informa-
tion. The most exciting feature of blockchain is that it greatly reduces the possibilities of
a data breach. In contrast with the traditional processes, in blockchain there are multi-
ple shared copies of the same database which makes it challenging to wage a data breach
attack or cyber-attack. With all the fraud resistant features, the blockchain technology holds
the potential to revolutionize various business sectors and make processes smarter, more
secure, more transparent, and more efficient compared to traditional business processes.
Many researchers are working on multiple uses such as decentralized public key infra-
structure, self-sovereign identity management, registry maintenance, health record man-
agement, decentralized authentication, decentralized DNS, etc. Also, corporations, such
as IBM and Microsoft, are developing their own applications in diverse fields such as the
Internet of Things (IoT), etc., even enabling blockchain platforms on the cloud.
With all the best available expertise and knowledge, the editors provide a complete
and comprehensive collection of chapters that address the various aspects of blockchain
technology such as decentralization computing, automation of content extraction and an
assortment of business applications in blockchain using machine learning, evolutionary
algorithms and other techniques.
By the end of the book, the reader will know everything one needs to know about block-
chain technology and be ready use that information for future applications and investments.

Professor Nguyen Thanh Thuy


VNU University of Engineering and Technology, Vietnam
April 2020
xxi
Preface

Blockchain is in its early phase of development where experiments are performed on exist-
ing systems by developers working on reducing the cost and making user activities faster.
Their support is limited in terms of computing power and the number of nodes within
the network being small. The current situation is that solutions are usually designed to
address where the decentralized system makes decisions. Coin offerings made by block-
chain technology implemented using smart contract can deliver high proposition value to
the solution over a decentralized network where each node will have equal importance and
control over the decisions made by the system. In the future, real power is empowered by
smart contract where advanced technologies will enable transactions at a faster rate. Satoshi
Nakamoto published his paper titled “Bitcoin: A Peer-to-Peer Electronic Cash System” in
October 2008 and released it in January 2009, which was a clear sign of the disruption of
the financial and banking sectors to come. Since it is a practical solution with limiting tech-
nology, it seemed very unlikely to have drawbacks to its success and full-fledged implemen-
tation. With the exception of financial sectors, healthcare, supply chains, and governments
look forward to implementing game-changing results. Companies acting as a middleman
to conduct business can be eliminated using this technology. Thus, they are looking forward
to utilizing blockchain technology to remove central authority over the network. It enables
us to achieve transformative change but will take time to solve existing challenges with user
scalability and complexity of transaction. Thus, the blockchain technology can be imagined
as the ozone layer in the atmosphere where with its presence we can stop many malicious
activities in the field of computer technology, where it acts as a protective shield to the users’
data against attackers.
Objective of the Book
This book covers the latest cryptocurrencies and blockchain technologies and their appli-
cations. It discusses blockchain and cryptocurrencies related issues and also explains how
to provide the security differently through algorithms, frameworks, approaches, techniques
and mechanisms. This book explores blockchain in relation to other technologies like IoT,
big data, artificial intelligence, etc.
Organization of the Book
This book consists of 15 chapters which are organized into two sections. The first sec-
tion of the book contains eight chapters focusing mainly on blockchain technology and its
impact on IoT and social networks. The second section consists of seven chapters that con-
centrate mostly on the cryptocurrencies and blockchain applications. A brief description of
each of the chapters follows:

xxiii
xxiv Preface

• Section 1: Cryptocurrencies and Blockchain Technologies (Chapters 1-8)

– Chapter 1: In this chapter, the author discusses how the advent of Blockchain
Technology has changed the lives of people, giving them a new dimension. It has
changed the perspective of viewing things on the web and has been more user-
centric and user-friendly. Blockchain, with its wide range of technology, has pro-
vided more data security. The hashing algorithms used security parameters that
have a wide diversity in controlling the cybercrimes occurring in the world and
also solve the problem of data breach and money, and property-related issues.
With this, sectors like digital advertising, cybersecurity, forecasting, supply chain
management, IoT, and networking have a fantastic future. It has a comprehensive
perspective of the new occupation industry. In a client-server architecture, users
experience a single point of failure and even it is prone to attackers to provide a
better solution. The use of distributed network improves the efficiency of the sys-
tem and provides more security to the system. The transactional activities can be
performed much faster and can be efficiently used. The blockchain technology pro-
vides a sustainable and efficient method to the existing service structures where
some are underperforming and have unreliable security. The authors discuss that
the blockchain technology is going to be used in many more sectors in the future,
such as in government systems, as these systems are slow, dense, and likely to be
affected by corruption. Implementing blockchain technology in government sys-
tems can make their operations much more secure and efficient.
– Chapter 2: In this chapter, the author discusses the blockchain technology archi-
tecture with the consensus algorithms involved in it. Also, the type of blockchain
systems and applications, such as those in reputation systems and the internet of
things (IoT), are discussed. Future directions in the field of blockchain are also
discussed.
– Chapter 3: In this chapter, the author discusses the ability of blockchain to
reduce business costs, simplifying various processes and interactions with oth-
ers. Blockchain can provide its users with a faster and safer way to verify essential
information and establish trust. With the advent of 5G technology, which provides
faster speed and faster communication, its impact can be seen everywhere. This
chapter also discusses how blockchain makes supply chains trustful and trackable.
Because of the enormous potential of blockchain, it can be thought of as the oper-
ating system of the future. It also helps in streamlining processes and removing
intermediaries.
– Chapter 4: This chapter discusses various blockchain-based social media platforms.
Today’s primary concern is social media platform security and privacy. Blockchain-
based social media provides more benefits than just security and privacy. It assists
in gaining control over the user’s content and enables e-commerce, crowd-funding
transactions as well as smart apps and contracts. This chapter also highlights the
research challenges and issues facing the blockchain social network.
– Chapter 5: In this chapter, the rapid advancement in connected and automated vehi-
cle technologies are discussed. Cooperative adaptive cruise control (CACC)-based
Preface xxv

platooning is used as a case study. The CACC-based platooning can enhance safety
and driving comfort, increase traffic throughput, and reduce fuel consumption
and pollutant emissions. Various platooning maneuvers, such as merge, split, lane
change, leave, etc., have been integrated with CACC-based platooning to meet the
objectives mentioned above. In such a platooning, a platoon leader plays a crucial
role in the execution of various functions such as synchronization, collision avoid-
ance, coordination, and better route planning. However, if a malevolent vehicle
becomes the leader, it may put the entire platoon in danger. Thus, vehicles must
elect a trusted and reputed leader to lead the platoon. The unencrypted broad-
cast inter-vehicle communication of CACC exposes vehicles to several security
threats. Establishing trust among vehicles is a critical challenge. The author states
that the core features of the blockchain of decentralization, immutability, security,
and high availability turn out to be a strong contender for addressing the challenge.
Introduction of blockchain platforms supporting smart contracts helps build trust
among untrusted parties and enhances the decision-making processes.
– Chapter 6: In this chapter, the author discusses various applications of IoT, fol-
lowed by security and privacy issues. The internet of things (IoT) plays a signif-
icant role in the industry and is encouraging research to come up with various
applications by bringing economic and social benefits to society. The impact of
IoT can be seen in various environments like mission-critical applications, health,
transport systems, video surveillance, banking, etc. The chapter discusses chal-
lenges for secure IoT followed by an introduction to blockchain technology along
with various advantages of blockchain for IoT. The author discusses the application
domains of blockchain technology in IoT, classification of threat models that are
considered by blockchain protocols for IoT networks, and comparison of state-
of-art secure models concerning blockchain. The IoT objects are interconnected
to each other, but the functions of these vary from each other, which yield better
results of security with the conventional approaches. To address the security and
privacy concerns, the central server concept is eliminated and blockchain technol-
ogy is introduced as a part of IoT, blockchain, which is used to provide security in
a peer-to-peer network which is similar to IoT technology.
– Chapter 7: In this chapter, the author discusses the dynamics of worm propaga-
tion in cryptovirology. A nonlinear epidemic model is applied to study the viral
propagation of worm in the cyber network system and the effect of rate of worm
infection on the dynamics of the model is analyzed. In this chapter, the author
discusses how the internet is used as a powerful tool for communication, cyber
transactions and cyber networks; most computers are interconnected through the
same operating software. Also, in the present era, the internet becomes the primary
medium for cybercrime. Cybercrimes are committed by developing malicious
codes or programs which invade private and public computers, gathering informa-
tion and posing security threats. The highest risks faced by computer networks is
from viral malware or worm propagation which target the software vulnerability.
Like in cryptovirology, cryptography is used to design powerful malicious soft-
ware. The security of critical networks is targeted and chaotic or erratic behavior
is introduced in their performance, leading to disruption in the complete system.
xxvi Preface

Also, in recent times, blockchain security vulnerabilities have become an issue of


distributed ledger technology.
– Chapter 8: In this chapter, the author shows the strength of Bitcoin value, even
though it has many security threats. With the help of a case study, the major con-
tributing security breach which caused a drop in the value of Bitcoin is identified.
Also, there is a focus on the prediction of the future value of the Bitcoin. Bitcoin is
the world’s first virtual currency.

• Section 2: Cryptocurrencies and Blockchain Applications (Chapter 9-15)

– Chapter 9: In this chapter, the blockchain technologies are discussed that could
be used to develop a lot of applications, which is similar to the internet. The infor-
mation recorded on a blockchain can take on any form, whether it is denoting
a transfer of money, ownership, a transaction, someone’s identity, an agreement
between two parties, or even how much electricity a light bulb has used. It can be
done by getting confirmation from several devices such as the computer on the
network. The data cannot be removed or altered by anyone without the knowledge
and permission of those who made that record, as well as the wider community.
In blockchain technology, rather than keeping information in one central point,
as is done by traditional recording methods, multiple copies of the same data are
stored in different locations and on different network devices, such as computers or
printers, which is called peer-to-peer network. If one point of storage is damaged or
lost, multiple copies remain safe and secure elsewhere and if one piece of informa-
tion is changed without the agreement of the rightful owners, there are countless
other examples in existence where the information is right, making the false record
obsolete. Blockchain owes its name to the manner in which it works and where data
is stored, that means the information is packed into blocks, which link to form a
chain with similar blocks. Usually, each block contains the data it is recording. It
also includes a digital signature linked to the account that made the recording and
a unique identifying link, in the form of a hash (think of it as a digital fingerprint),
to the previous block in the chain. It is this link that makes it impossible for any
of the information to be altered or for a block to be inserted between two existing
blocks. In order to do so, all the following blocks would need to be edited too. As
a result, each block strengthens the previous block and the security of the entire
blockchain because it means more blocks would need to be changed to tamper
with any information. When combined, all of these create unquestionable storage
of information which cannot be disputed or declared to be untrue. This chapter
discusses the working of blockchain technology.
– Chapter 10: This chapter provides an outlook on big data and blockchain individually
with viewpoints of various situations in which both Big Data and Blockchain coexist
to ensure data quality in various sectors, including web, health, education and gov-
ernment through diagrams, working and inner implementations. The importance of
Blockchain-Big Data in the national development with its various aspects in Industry
4.0 and some other future aspects that need to be addressed are also discussed. This
chapter is designed to give insights into various facets of cryptocurrency, blockchain
Preface xxvii

and big data, which are combined to perform certain operations pertaining to the
task of any organization or institution that may be private or public.
– Chapter 11: In this chapter, the author proposes a smart farming environment
based on artificial intelligence (AI) and blockchain technology. Artificial intel-
ligence can be harnessed to automate and manage agricultural and related tasks
while blockchain technology can help in intensifying agriculture food and supply
chains. A sensational AI-based approach helps in developing the smart farming
environment that can efficiently gather and monitor data for real-time monitoring
to address the uncertain issues faced by the agricultural community. Because of
the rapid increase in global population, there will be an increase of nearly 70% in
the agricultural production by 2050 to meet the ever-increasing demands of peo-
ple. To develop cost-effective agricultural solutions, 90% intensification is required
on technological farming for achieving agricultural inputs and market demands.
Today, the agricultural sector is affected by various factors like increased labor
costs, increased population, crop failures, unpredictable yields, extreme weather,
climate change, market fluctuations, etc. All these factors have directly or indirectly
affected the socioeconomic status of farmers. With such a large number of challenges
and increasing demands, there is a need to implement an artificial intelligence-
based approach for developing the smart farming environment for real-time moni-
toring and management of agricultural issues. Blockchain can handle issues related
to the increased demands for agricultural products with transparency and trust. It
accompanies a variety of certification schemes on branded agricultural products
that face issues related to claims, labels and adulterations. Blockchain can prove to
be an efficient solution for agricultural products safety, quality and sustainability.
Blockchain ensures the permanency of records during data sharing. ICT in the
agricultural sector provides more efficient solutions for effective water and land
usage, resulting in maximum agricultural yields. The author proposes a neoteric
smart and sustainable farming environment incorporating the blockchain-based
artificial intelligence approach.
– Chapter 12: In this chapter, the author states that many countries have quantified
their purpose to create an ecosystem in which businesses can grow, which can only
mean the continued growth of the sector in the predictable future. Simultaneously,
it reduces the friction of making payments and transfers in fiat currency, facilitated
by e-money. This has raised the bar of virtual currency and the cryptocurrency
market. Bill Gates opined that “Banking is essential, banks are not.” The early 21st
century has seen a proliferation of financial technology and analytics firms, provid-
ing a wide and varied array of services, from payments and local and international
money transmission to financing through P2P lending and crowdfunding. Venture
capital funding in the U.K. for financial technology-related business increased to
more than US$500 million in 2014, while the sector is estimated to contribute more
than GBP 20 billion to the economy. Cryptocurrencies have come a long way from
their relatively ambiguous origins. Even though the financial institutions have con-
cerns about digital currencies as tools for criminals, terrorists or rebellious individ-
uals frustrated with traditional money, the industry has significantly progressed in
establishing their potential legitimacy.
xxviii Preface

– Chapter 13: In this chapter, the author discusses how blockchain technology can
create ramifications across the investment banking ecosystem due to their cryp-
tographic distributed ledger. The author evaluates the adaptation feasibility and
predicts performance for a regulatory framework when investment banks apply
blockchain technology. Random sampling is used with a sample size of 50 respon-
dents from investment banks operating in urban Bangalore based on the primary
data collected. Statutory impact (SI), compliance policy (CP), fiscal policy (FP),
competitive edge (CE) and service-level agreement (SLA) are the variables. The
statistical software used to test structural equation model (SEM) with confirmatory
factor analysis (CFA), multiple linear regression analysis and one-way ANOVA
(analysis of variance) are SPSS and SPSS AMOS. SI is the most influential variable
and has a more significant impact on acceptability with beta value 0.899 at 0.001
percent significant level with Chi-square value of 3.14 and the estimated reliability
post-adoption of 81 per cent. SI, CP, SLA, and CE are the significant predictors of
performance with a higher association between the performance of the banks and
regulatory framework indicators with significance at 0.01 percent level. The author
discusses how technology can reduce the middle- and back-end operating cost and
improves transparency.
– Chapter 14: In this chapter, the author discusses how blockchain technology
could facilitate and help to implement a market, allowing the transformation of
energy in a digital asset which could be tracked and traded. The author discusses
the smart energy grid decentralization problem by proposing a blockchain-based
energy market allowing the energy to be traded among prosumers in a peer-to-
peer fashion. The main advantages brought by the blockchain technology, such as
energy provenance, transaction privacy and immutability, are discussed and details
on their implementation in our envisioned energy market are provided. To imple-
ment the energy market management operations, such as prosumers registration
and permission control, bids and offers matching and financial settlement self-
enforcing smart contracts are used. At the same time, the prosumers level smart
contract is used to automatize the bids and offers registration and monitor their
energy generation and demand.
– Chapter 15: In this chapter, the author discusses blockchain from an application
point of view, throwing some light on mining mechanism, participants of the
blockchain system, and organized and versatile use cases, while demystifying the
related myths. Blockchain is an eccentric technology, in addition to being the most
vaunted, least understood and most disrupting technology of the current era.

Gulshan Shrivastava
National Institute of Technology Patna, India
Dac-Nhuong Le
Hai Phong University, Hai Phong, Vietnam
Kavita Sharma
National Institute of Technology, Kurukshetra, India
Acknowledgments

First of all, we would like to thank the authors for contributing their excellent chapters to
this book. Without their contributions, this book would not have been possible. Thanks to
all our friends for sharing our happiness at the start of this project and following up with
their encouragement when it seemed too difficult to complete.
We would like to acknowledge and thank the most important people in our life, our
parents, and finally, give thanks to god. This book has been a long-cherished dream of ours
which would not have been turned into reality without the support and love of our families,
who encouraged us despite not giving them the proper time and attention.

Gulshan Shrivastava
National Institute of Technology Patna, India
Dac-Nhuong Le
Hai Phong University, Hai Phong, Vietnam
Kavita Sharma
National Institute of Technology, Kurukshetra, India

xxix
Acronyms

5G The next (5th) Generation


AI Artificial Intelligence
ACC Adaptive Cruise Control
AMOS Analysis of Moment Structure
ANOVA Analysis of Variance
AGFI Adjusted Goodness of Fit Index
API Application Programming Interface
AWS Amazon Web Services
ADEPT Autonomous Decentralized Peer-to-Peer Telemetry
BCT Blockchain Technology
BG Byzantine Generals
CA Certificate Authority
CACC Cooperative Adaptive Cruise Control
CE Competitive Edge
CFA Confirmatory Factor Analysis
CFI Comparative Fit Index
CP Compliance Policy
C-DAC Center for Development of Advanced Computing
CSS Cross-Site Scripting
CP Compliance Policy
CPU Central Processing Unit
CoAP Constrained Application Protocol
DApp Decentralized Application
DHT Distributed Hash Table
DPoS Delegated Proof of Stake
dBFT Delegated Byzantine Fault Tolerance
DLT Distributed Ledger Technology
DNS Domain Name System
DOSN Distributed Online Social Network
DoS Denial of Service
DDoS Distributed Denial of Service
DTSL Datagram Transport Layer Security
DSRC Dedicated Short-Range Communications
EVM Ethereum Virtual Machine
ECDSA Elliptic Curve Digital Signature Algorithm
EHR Electronic Health Record

xxxi
xxxii Acronyms

ERP Enterprise Resource Planning


EMR Electronic Medical Record
FIR First Information Report
FP Fiscal Policy
GFI Goodness of Fit Index
GUID Global Unique Identification
HDAC Hyundai Digital Access Currency
HTTP Hypertext Transfer Protocol
HTML Hypertext Markup Language
HD High Definition
IANA Internet Assigned Numbers Authority
IB Investment Banks
ICT Information and Communications Technology
IoT Internet of Things
IPFS InterPlanetary File System
I2V Infrastructure-to-Vehicle
IP Internet Protocol
IPv6 Internet Protocol version 6
IT Information Technology
ICO Initial Coin Offering
IoV Internet of Value
IPO Initial Public Offering
JSP Java Server Pages
KYC Know Your Customer
LPoS Leased Proof-of-Stake
LoWPAN Low-Power Wireless Personal Area Networks
LWM2M Lightweight M2M
M2M Machine to Machine
MBD Misbehavior Detection
MQTT Message Queuing Telemetry Transport
NAV Net Asset Value
NIFTY National Stock Exchange Index
NFI Normed Fit Index
NHTSA National Highway Transportation Safety Agency
NSA National Security Agency
OBC Open Blockchain
OS Operating System
OBM Original Brand Manufacturing
PKI Public Key Infrastructure
PHP Hypertext Preprocessor
PC Personal Computer
P2P Peer to Peer
PoW Proof of Work
PoS Proof of Stake
PBFT Practical Byzantine Fault Tolerance
PoET Proof of Elapsed Time
Acronyms xxxiii

PoA Proof of Activity


PoB Proof of Burn
PL Platoon Leader
RMSEA Root Mean Square Error of Approximation
RMR Root Mean Square Residential
RF1 Statutory Impact
RF2 Compliance policy
RF3 Competitive edge
RF4 Fiscal Policy
RF5 Service Level agreement
RFW Regulatory Framework
REST Representational State Transfer
RPC Remote Procedure Call
RSU Road-Side Units
RAT Radio Access Technology
RPL Routing Protocol for Low-Power and Lossy Networks
RFID Radio Frequency Identification
RBAC Role-Based Access Management
SIS Susceptible, Infected, Susceptible Model
SEIR Susceptible, Exposed, Infected and Recovered
SEI Susceptible Exposed Infected
SC Smart Contract
SCMS Security Credential Management System
SIR Susceptible, Infected, Recovered
SI Statutory Impact
SLA Service Level Agreement
S&P Standard & Poor’s (Index)
SEM Structural Equation Model
SQL Structured Query Language
SSL Secure Sockets Layer
SCP Stellar Consensus Protocol
SO Social Overlay
SHA Secure Hash Algorithm
TA Trusted Authority
TCS Tata Consultancy Service
TSL Transport Layer Security
TCP Transmission Control Protocol
UGV Unmanned Ground Vehicle
UI User Interaction
URL Uniform Resource Locator
UTXO Unspent Transaction Output
UNL Unique Node List
VANET Vehicular Ad-Hoc Networks
VVP Virus-Vulnerable and Protected
V2X Vehicle-to-Everything
V2V Vehicle-to-Vehicle
xxxiv Acronyms

V2I Vehicle-to-Infrastructure
XHTML Extensible Hypertext Markup Language
XMPP Extensible Messaging and Presence Protocol
XAMP X-Cross Platform
XSS Cross-Site Scripting
W3C World Wide Web Consortium
WAVE Wireless Access in Vehicular Environment
WSN Wireless Sensor Network
PART I

CRYPTOCURRENCIES AND
BLOCKCHAIN TECHNOLOGY
CHAPTER 1

BLOCKCHAIN: A NEW ERA OF


TECHNOLOGY
Gururaj H L,∗ Manoj Athreya A, Ashwin A Kumar, Abhishek M Holla,
Nagarajath S M, Ravi Kumar V
Vidyavardhaka College of Engineering, Mysuru, India


Corresponding author: gururaj1711@vvce.ac.in

Abstract
As the whole world is moving towards digital payments, ethers and transaction meth-
ods with quick payment, information is stored in a blockchain in a distributed network.
The distributed network is a network system through which data, software and computer
programming are spread across more than one node (computers) and these nodes are de-
pendent on each other. It is nothing but a peer-to-peer network which eliminates a single
point of failure. The blockchain is a growing list of records called blocks that are linked
using cryptography. It is a decentralized, distributed and immutable ledger to store digital
transactions. Its databases are managed using a peer-to-peer network where all the nodes
in a network are equal and are the major concern in the types of network architecture. The
consensus protocol is used for transacting and communicating between the nodes. In this
chapter, an approach for storing data in a blockchain is investigated and reported whereby
the record is kept safe and secure, preventing it from being manipulated by others. With
the help of the above blockchain technology we are able to achieve data that is secure from
manipulators.
Keywords: Blockchain, inter-planetary file system, Ethereum, Web 3.0, consensus pro-
tocol, mining, distributed P2P network, Ethereum transaction, SHA-256 algorithm, decen-
tralized application

Cryptocurrencies and Blockchain Technologies and Applications. 3


c 2020 Scrivener Publishing
Edited by Gulshan Shrivastava et al. Copyright 
4 BLOCKCHAIN: A NEW ERA OF TECHNOLOGY

Blockchain is one of the booming words in the field of computer technology, which
has the power to change the lives of people as the Internet did in the past twenty years.
Blockchain is ready to make a big impact on the lives of people if we adhere to this tech-
nology. It is a fundamental and parallel part to the Internet and not just a use case like
emails, e-commerce, etc. When people hear the term blockchain many come to a conclu-
sion that it deals mainly with cryptocurrency and Bitcoin but it is not all about that. The
cryptocurrency and Bitcoin can be compared to email where the backbone technology be-
hind it is the internet. As such, blockchain is a technology. Blockchain can be broadly
described as a digital form of the ledger where you can store whatever data you want and
then later access it through the hash value you received. It’s just like the acknowledgment
number you get when you produce some documents. Consider a scenario where some per-
son x needs to send money to person y who lives in a different country; it takes at least
5-6 working days to transfer the money because we have middle parties like banks which
require time to process it. When it comes to blockchain we have an immutable universal
ledger where it stores transaction details of all the individuals in a block. When a trans-
action is made it adds a new block into the existing set of blocks in the system which is
authenticated by everyone. When it comes to security it uses the best cryptographic al-
gorithms and is difficult to hack. It uses the SHA-256 algorithm to keep the hash value
secured. When a hacker tries to hack a blockchain system, first of all, he needs compu-
tation power of more than 50% of the supercomputer in the word and he also needs to
change all the blocks because they are cryptographically linked to each other; moreover,
the blocks reside in a distributed node and every time it checks with other nodes to see
whether they possess the same details which are based on the consensus protocol. As it
is a collection of chained blocks you can trace back to the transactions that have occurred
by going back block by block. They also have originated smart contracts which are the
logic built into most blockchains, where when an event happens it triggers another event.
Finally, all the blocks are not owned by anyone like a bank or any trusted authority. The
blockchain is owned by all of us and to maintain it we need resources, electricity, comput-
ing power, time, money, etc. So for the people who maintained all these resources, in 2008
Satoshi Nakamoto introduced the concept of Bitcoins to give them as incentives, and the
persons who looked after the blockchain mined it and hence they were called miners. In
this blockchain the word TRUST plays an important role. Consider an example of a party
where ten people put in a thousand rupees each and draw one name from the box; this
lucky person will get the entire amount. Here, it is the trust between all ten people which
works like a blockchain and brings the trust from a centralized to decentralized platform.
The blockchain works on the following four major features:
1. Consensus
2. Security
3. Provenance
4. Trust
The countries which use this technology are Japan, Canada, Dubai, Estonia and many
more. Dubai is transforming itself as the world’s first blockchain-powered government. Es-
tonia is being called Ethereum Island. When it comes to India we have certain blockchain
information such as:
1. State Bank of India partnered with BankChain and Intel to develop blockchain solu-
tions.
5

2. West Bengal and Andhra Pradesh is transitioning to using blockchain software for
solving land property issues.

3. The Centre for Development of Advanced Computing (C-DAC) Hyderabad is work-


ing on blockchain projects.

4. Blockchain patents are claimed by the Indians and many more.

Some of the recent blockchain technology being hyped in the current industry are as
follows:

1. Google is bringing blockchain technology to its cloud services.

2. Facebook has plans for blockchain-based authentication.

3. Microsoft Azure allows the development, testing, and deployment of secure blockchain
apps.

4. IBM is now delivering blockchain service around the world.

5. Walmart has partnered with IBM to create a blockchain for tracking food globally
through its supply chain.

6. Mastercard has started to build their own blockchain-based payment gateways.

7. Huawei’s blockchain technology offers mobile carriers superb opportunities to sub-


scribers.

Figure 1.1 shows the different sectors in which blockchain technology is being used.

Figure 1.1 Sectors of blockchain.


6 BLOCKCHAIN: A NEW ERA OF TECHNOLOGY

Blockchain is making its way into many sectors like agriculture, power production,
education, banking, voting and many more. Consider the example of power production
where if you have solar panels installed in your home and if you produce electricity, the
excess can be sent to others and in turn you get money through Blockchain; and where we
can have the IoT also being used with it. Basically, blockchain comes into the picture when
you can prevent data hoaxes and establish trust in the distributed network. The internet
has solved many more problems like information searches (Google, Yahoo), distribution
(YouTube, Amazon Prime, Netflix) and communication (email, chat applications) but it
has not solved two major problems, which are trust and intermediation. On the internet,
we find fake news and fake profiles which are not to be trusted; and in intermediaries, the
big companies like Google, Amazon, Facebook, etc., have acquired the market and are
not open to all, which means there is a middleman between producer and consumer. But
with the advent of Blockchain, we can solve all these problems and bring back a trusted
environment.

1.1 Introduction to Web 3.0

With the web entering a new phase of evolution, Web 3.0 is lined up to be the next big thing
marking a fundamental change in how developers create websites and how people inter-
act with those websites. Internet experts claim that these changes will make the internet
smarter, thereby making our lives easier [2].

1.1.1 Web 1.0

This is referred to as the first generation of the web, invented by Tim Berners-Lee. It is
often referred to as the read-only web as few people created content for the rest of the
customers. Commonly used technologies are HTTP, XHTML, HTML, CSS, etc. It sup-
ports both server-side scripting (like JSP, PHP, etc.) and client-side scripting (JavaScript,
VBScript, etc.) [3].
Web 1.0 has a lot of vulnerabilities, some of them are:
1. It is extremely slow.
2. Each time new content is pushed onto the webpage, it needs to be refreshed.
3. It doesn’t support two-way communication as it can be initiated only by the client
(HTTP).

1.1.2 Web 2.0

This is also referred to as the read-write web as the users can interact with websites that
have predetermined behaviors according to the inputs. With the emergence of blogs in the
20th century, widgets and other instant and universal authorizing tools and sites are always
ready to accept the content. These have played a substantial role in the democratization of
the web. Commonly used technologies are Ajax, DOM, REST, etc. [6].
Web 2.0 has a lot of vulnerabilities, some of them are:
1. SQL Injection
2. Information Leakage
BLOCKCHAIN 7

3. Cross-Site Request Forgery


4. Authentication and Authorization Flaws
5. Cross-Site Scripting

1.1.3 Web 3.0

This term was coined by the reporter John Markoff of The New York Times in 2006. It al-
lows online applications to receive information from the web and provide new information
(results) to the users [4].
Web 3.0 is made up of these 4 basic properties:
Semantic Web: This deals with the meaning or the emotion conveyed by the data.
3D graphics: This is being used to provide a realistic feel to the websites.
Universal: This will allow accessing the content/service on the web from anywhere.
Artificial intelligence: This will allow websites to filter and present users the best data
possible.

1.2 Blockchain

The concept of blockchain was first introduced by Stuart Haber and W. Scott Stornetta
while they were trying to build a system in which document timestamps could not be
modified.
This was later implemented in the year 2008 by Satoshi Nakamoto, whose real identity
is still unknown.
Blockchain can be defined as a growing list of records called blocks, which are linked
and stored using cryptography. The first block of the chain is referred to as the genesis
block [11].
Each and every block will have the following details in it:
1. Data: String of characters stored.
2. Nonce: A unique number related to mining.
3. Previous hash: Hash value of a block that came before the current block. This field
establishes the cryptographic link with the subsequent block.
4. Hash: Fingerprint of some amount of data stored in the block.
As shown in Figure 1.2, the hash value of a block is calculated using all of the other
three fields, i.e., data, nonce and the previous hash field.
The concept of blockchain can be understood with the help of the following:
1. Hash Cryptography
2. Immutable Ledger
3. Distributed P2P Network
4. Mining
5. Consensus Protocol
8 BLOCKCHAIN: A NEW ERA OF TECHNOLOGY

Figure 1.2 Cryptographically linked blocks.

1.2.1 Hash Cryptography

Each and every human being in this world will have a unique fingerprint and there exists a
very minimal chance, i.e., one in 60 million, for this to be the same. Similarly, the digital
document like an operating system, video, etc., can be identified uniquely with the hash
value calculated using the SHA-256 algorithm [5]. This was first developed by the National
Security Agency (NSA) and the expansion is as follows:

SHA stands for secure hash algorithm.

256 is the total number of bits consumed in the memory.

The requirements for any hash algorithm are as stated below:

1. One-way: Every digital document will have a hash value associated with it. This can
be retrieved through the digital document but the reverse cannot be achieved.

2. Deterministic: Every digital document will have a unique hash value generated by a
hashing algorithm which will remain the same until the file content is not changed.

3. Fast computation: The hash value generation should be instantaneous and must not
be sluggish.

4. Avalanche effect: Any change in the input file causes a radical change in the hash
value generated previously.

5. Must withstand collisions: If a hash function generates the same value for two digital
documents, this is referred to as collisions. Data integrity makes it obligatory that
such collisions are prevented.

Figure 1.3 shows the conversion of message to hash value using SHA-256 algorithm
where for each character change it generates a different hash value. The important feature
is that we cannot obtain the message from hash value.
BLOCKCHAIN 9

Figure 1.3 Hash function.

1.2.2 Immutability

Immutability refers to anything and everything that cannot be changed once recorded. For
example, a mail sent to a bunch of people cannot be reversed. An additional field called
timestamp is stored inside the block when a transaction is approved and appended onto the
blockchain. If anyone tries to alter the data in a block the cryptographic link is broken [7].
This helps us to recognize the precise section of the chain where the data is manipulated.
Thus, one has to compute the previous hash value of the entire chain again to restore the
link. It requires a lot of computational power in order to do so. Therefore, making sure
that the data stored is resistant to any kind of alterations. This feature is not available in
the earlier databases which only provide an option to delete or modify records. Moreover,
blockchains sustain the entire history and data path of any application. This acts as a
backbone for any auditing process. Preserving a full historical record is not only a blessing
for auditing, but also provides new chances in the query, analytics, and overall business
processes [9].
Figure 1.4 shows the immutability feature of blockchain.

Figure 1.4 Immutability of blockchain.


10 BLOCKCHAIN: A NEW ERA OF TECHNOLOGY

1.2.3 Distributed P2P Network

The backbone of blockchain methodology is formed by P2P network architecture. This


policy authorizes us to remove the dependency on a central decision-making source called
a server [12]. The user has to completely trust networks and hope they don’t have a back-
door to quietly read or manipulate the reports. Also, one should hope that they don’t go out
of business and shut down their servers. The nodes comprising tablets, routers, etc., inter-
act and share data directly with one another; thus, distributing all the data across all nodes
in the grid rather than using a server. All the nodes in the network will have a copy of the
blockchain, thereby making it completely impossible for anyone to modify any value in the
chain [10]. Hypothetically, all these nodes are joined via a path. None of the nodes have
precise knowledge about the network topology and merely reroute messages to the des-
ignated node. Members of the P2P network share the resources between other members,
including bandwidth, disk storage, etc. This is accomplished with the help of minimum
resource contribution threshold defined for all peers in the network. The peer-to-peer net-
work enables us to solve all the obstacles faced in client-server architecture, i.e., single
source of failure and scalability, efficiently [13]. Table 1.1 below shows the contrasting
characteristics of both the architectures.

Table 1.1 Difference between Client-Server and P2P.

Figure 1.5 P2P network of blockchain.


BLOCKCHAIN 11

1.2.4 Mining

This term picked up steam due to the recent surge of Bitcoin. It can be defined as the
process of adding new transactions to the distributed system by predicting the value of
the nonce such that the hash value generated is less than the target range. Miners compete
against each other to figure out a hash value by solving a mathematical problem and receive
a reward in terms of tokens or transaction fees. One of the solutions or mining algorithm
used is proof-of-work [15]. This acts like a testament that the miner spent a substantial bulk
of time and resources to figure out the solution to the problem. The miner needs to wait
a while before his transaction is confirmed and added to the block. Afterward, the reward
is credited to the miner. Going by the trend, the amount associated with a block mined
decreases by half every 210,000 blocks. The decrease in the amount credited is evened up
by the increase in the transaction fees. Subsequently, no new coins are generated or issued.

Figure 1.6 Process of mining.

1.2.5 Consensus Protocol

Blockchain consensus protocol creates an indisputable system of understanding between


various nodes across a distributed network. This permits us to keep all the nodes on the
grid synchronized with one another [16]. As a result of a distributed system, it becomes
mandatory to maintain the same state of blockchain across the network. This is being
challenged by two main factors:
a) Attackers: This nature of attack is prevalent when an attacker wants to disrupt the
distributed chain by brute-force method. There are two probable ways in which the
attacker can do it:
1. Adding a new block between the chain: Suppose the attacker adds a new block in
between the blocks of the chain, then the entire cryptographic link will be broken.
The chain on distribution will perceive that the chain that it contains is different
from all the other copies in the network. Instantly, the node will recognize the
same and replace the entire copy of the chain, thereby integrating the data across
the grid.
2. Adding a new vicious block at the end of the chain: Each and every node performs
a series of checks on the newly mined blocks before confirming it to the miner.
12 BLOCKCHAIN: A NEW ERA OF TECHNOLOGY

During this process, if some node feels that the block is malicious, it will soon
bring it to the notice of the network and necessary actions will be taken against it.
b) Competing chains: This problem arises when two nodes mine a block into the chain at
approximately the same time. With a large number of nodes present in the distributed
network, a conflict crops up with the development of two competing chains and it
thereby becomes imperative to make a call [17]. The solution to this dilemma is
achieved with the help of a simple notion, i.e., to accept the chain which will add the
next block. Now, a lot depends on the hashing power of the nodes and whichever set
of nodes has the higher power will have a greater possibility of mining the next block.
The entire copy of the accepted chain among the competing chains is now relayed
across the network to retrieve what is known as the orphan blocks. These are mostly
blocks (enclosing the miner’s reward) now no longer a part of the chain [18].

This forms the core of the blockchain technology to exist and function methodically.

1.3 Bitcoin

Bitcoin, launched under the name Satoshi Nakamoto in 2008, is a digital currency which
overcomes the inefficiency and greed of banks. Bitcoin’s nature is resilient to the en-
croachment of banks and governments. It uses P2P technology that operates under no
central adversaries where transactions are approved mutually by the network participants
[22]. Here, a private key protects the access to the money of an individual account, which
is contradictory in the case of fiat currency. Additionally, the number of bitcoins minted
is limited to 21 million, unlike traditional currency minted by authorized central banking
agencies. Blockchain is the underlying technology that stores each transaction on Bitcoin
network globally in a shared ledger which is verifiable, accessible and constantly updated
by a global fleet of computers. Once a transaction is done, its details are globally recorded,
which provides no means to reverse the transaction. At the same time, Bitcoin requires
no identity of one’s personal information for participating in a network, thus it cannot be
traced back to an individual until and unless he/she wishes to reveal it.

1.4 Ethereum

Ethereum is a decentralized, open-source, dynamic service that works on the properties of


the blockchain. It was first introduced in 2013 through a white paper by Vitalik Buterin.
This was obtained from the Bitcoin project which is primarily a tool intended towards
monitoring transactions among people. He himself was an enthusiast of the Bitcoin project
but firmly felt that this technology can be applied to diverse varieties of transactions [20].
The core of Ethereum largely revolves around smart contracts. They are small blocks of
code that reside in the blockchain meant for accomplishing a specific task. This system
went online in July 2015 and continues to thrive even today. Its main aim is to develop
a platform which runs on DApps in order to create a more global, free and more mature
internet, Web 3.0. Their intention is to give users and creators more control in developing
their apps rather than the conglomerate. It runs on the same protocol as that of Bitcoin,
proof of work (PoW), but the disadvantages are a 51% danger of attack and the enormous
energy consumption required for the security. Thus, proof of stake [19] came into existence
which works akin to PoW. Instead of nodes approval in the network, it makes use of token
ETHEREUM 13

holders. N% of a block reward is received for N% of tokens (computing power in the case
of PoW) for accounting on the network [21].
The concept of Ethereum can be understood with the help of the following:
1. Ethereum Network
2. Interfacing with Ethereum
3. Ethereum Account
4. Transaction

1.4.1 Ethereum Network

The infrastructure of a decentralized network is made up of an assortment of nodes interact-


ing with each other. The Ethereum network is largely related to the transfer of money and
storage of data, thus permitting us to build diverse exciting applications. This is achieved
with the help of a cryptocurrency called ether. This is similar to bitcoin and is responsible
for fueling the Ethereum ecosystem. There exist many Ethereum networks, some of which
are:
1. Main Network: Production applications are deployed here so that they can be used by
the user. It is in this network that ether coins have real value and can be turned into
U.S. dollars.
2. Rinkeby, Kovan, Ropsten Test Network: These provide us with free ether coins to test
code and contracts before deploying them to the main network.
3. JSON RPC API: This allows us to connect to the local Ethereum test network which
runs at “localhost” on port 8445.
Figure 1.7 depicts the organization of the Ethereum network.

Figure 1.7 Ethereum network.

1.4.2 Interfacing with Ethereum

Interfacing refers to the process of interacting with the network. This can be accomplished
in two ways:
1. Web3 library: This is an API predominantly used by the developers to interact with
the network. It enables the performance of numerous operations like creating smart
contracts, sending ethers, etc. It communicates with the blockchain through JSON
14 BLOCKCHAIN: A NEW ERA OF TECHNOLOGY

RPC and ensures that it is communicating with only one node in the distributed P2P
network.

2. MetaMask: This is a browser extension used by users to interface with the network.
Normally, it is preferred by users who do not have previous knowledge of Ethereum.

Figure 1.8 depicts the interfacing with Ethereum.

Figure 1.8 Interfacing with Ethereum.

1.4.3 Ethereum Account

MetaMask creates two distinct sorts of accounts:

1. Externally owned accounts: These are generated and managed by private keys and
will have the following:

a) No associated code
b) Ether balance
c) Help in triggering contract code
d) Ether transfer

2. Contract accounts: These are generated and regulated by code and will have the fol-
lowing:

a) Associated code
b) Ether balance
c) Code implementation is triggered by transactions

Ignoring the kind of account created, the following four essential elements are:

1. Balance: The amount of Wei possessed by this address.

2. Nonce: In case of externally owned accounts, it depicts the number of transactions


carried out from a specific account address; whereas, in a contract account, it illus-
trates the number of contracts generated by the account.

3. CodeHash: The hash of the EVM code of this account. These codes are stored in the
database supporting the respective hash value for future retrieval.

4. StorageRoot: A 256-bit value representing the encoded version of the data stored in
the chain.
INTERPLANETARY FILE SYSTEM (IPFS) 15

1.4.4 Ethereum Network Transactions

Any sort of transaction in the Ethereum network should possess a MetaMask account and
some ethers in it. If the user makes an order, they will automatically be redirected to a
payment gateway to confirm and pay with ethers. Upon confirmation, their balance is
checked in the back-end server to confirm whether it meets the appropriate requirements
or not. If the requirements are met then the transaction of ethers will take place. When
the user pushes the submit button, it sends the ethereum address to the back-end server for
validation. Then the back-end server uses the web3 library to create a transaction object.
For demo purposes, the researchers use the test networks while in the real world it is done
in the main network. After a successful transaction, the back-end server pushes the success
message onto the user screen. The user needs to wait for a few seconds as the transaction
object generated needs to be added to the network. This will be approved by the miners by
randomly generating a nonce value and is added as a new block in the network. The block
will have a unique hash value assigned to it and thus data integrity is ensured.
Figure 1.9 below shows all the steps followed throughout this process in detail.

Figure 1.9 Transaction in Ethereum network.

1.5 InterPlanetary File System (IPFS)

The HTTP fails to merge with the modern file distribution techniques recently invented.
Without affecting the current network the upgrades are nearly impossible because of the
large involvement of the present HTTP model and the web. To overcome these challenges,
IPFS network works on distributed peer-to-peer network which has a similar file data struc-
ture called Merkle DAG. IPFS works in a manner similar to BitTorrent where bitswap
protocol is used. Clients can set their own Bitswap strategies using Bitswap protocol.
A Bitswap strategy tells a node how it should request and send blocks to/from its peers.
Through the collective use of distributed technologies, IPFS enables a unique file and data
sharing in a decentralized fashion. IPFS has its file-system or directories mounted glob-
ally and provides high performance and cluster persistence, which is enough to store and
organize the world’s information [23].
IPFS as the distributed web also offers features like:
16 BLOCKCHAIN: A NEW ERA OF TECHNOLOGY

1. Content Addressing: The addressing data in IPFS is performed by addressing the con-
tent of the file or document in the network rather than addressing location where the
addressing is different, which is performed using IP addresses. The IPFS address re-
solves the IPFS objects, the entities present which contain a list of links and content
data which is being addressed. When the large files are added to IPFS, the file is de-
composed into much smaller representation of data and stored into an array of links
that points to the broken pieces of the original data. This type of addressing ensures
that a particular address will always result in querying the same file. Content address-
ing also has an advantage over the content hosted by a node where the content can be
retrieved from the IPFS network as long as the file is hosted in the network. Thus, a
single copy of a file is enough to retrieve a file from the network.

2. Distributed Hash Table (DHT): The DHT is the database distributed over a network
which can be used to store data in terms of key/value pairs in a peer-to-peer network
consisting of nodes. The distributed hash table has the mechanism of fault tolerance
triggered when key/value pairs are duplicated or not accessible in the network. To
evenly share the information across the network, DHT uses the concept of hashing
where a hash function that serves as a randomized function accepts keys. Since DHT
nodes don’t store all the data, routing layer has to perform the necessary function
which enables a client to contact other peers in the network that stores the certain key
which then can be used to retrieve the value and access the content. The two routing
protocols that are significantly used in the routing layer in DHT are iterative lookup
and recursive lookup, which are classified on the manner in which they process a
complete request.

3. Versioned File System: IPFS allows a versioned file system that is made use of in
Git versioning which enables maintaining different versions of the same file and can
be easily traced to the original file using commit objects. The commit object in the
versioned file system has links to name ID which points to last committed object,
and also the link which contains the object which points to the globally mounted file
directory which is started by that commit.

1.6 Decentralized Applications (DApps)

Decentralized applications are completely open-source applications that work entirely on


the smart contract code run on the blockchain. They are a type of software program de-
signed to exist in such a way that is not controlled by any single entity but instead controlled
by blocks of code known as smart contracts. DApps uses decentralized storage to store data
and code. Decentralized application is a blockchain-based app, where the smart contract is
what allows it to connect to the blockchain [1].
The main difference between Satoshi Nakamoto’s bitcoin and Vitalik Buterin’s ethereum
is given in Table 1.2.
Another random document with
no related content on Scribd:
For tis not styles far-fetched from Greece or Rome,
But just the Fireside, that can make a home;
None of your spindling things of modern style,
Like pins stuck through to stay the card-built pile,
It rose broad-shouldered, kindly, debonair,
Its warm breath whitening in the October air,
While on its front a heart in outline showed
The place it filled in that serene abode.

“When first I chanced the Eagle to explore,


Ezra sat listless by the open door;
One chair careened him at an angle meet,
Another nursed his hugely-slippered feet;
Upon a third reposed a shirt-sleeved arm,
And the whole man diffused tobacco’s charm.
'Are you the landlord?' 'Wahl, I guess I be,'
Watching the smoke, he answered leisurely.
He was a stoutish man, and through the breast
Of his loose shirt there showed a brambly chest;
Streaked redly as a wind-foreboding morn,
His tanned cheeks curved to temples closely shorn;
Clean-shaved he was, save where a hedge of gray
Upon his brawny throat leaned every way
About an Adam’s-apple, that beneath
Bulged like a boulder from a brambly heath.
The Western World’s true child and nursling he,
Equipt with aptitudes enough for three:
No eye like his to value horse or cow,
Or gauge the contents of a stack or mow;
He could foretell the weather at a word,
He knew the haunt of every beast and bird,
Or where a two-pound trout was sure to lie,
Waiting the flutter of his home-made fly;
Nay, once in autumns five, he had the luck
To drop at fair-play range a ten-tined buck;
Of sportsmen true he favored every whim,
But never cockney found a guide in him;
A natural man, with all his instincts fresh,
Not buzzing helpless in Reflection’s mesh,
Firm on its feet stood his broad-shouldered mind,
As bluffly honest as a northwest wind;
Hard-headed and soft-hearted, you’d scarce meet
A kindlier mixture of the shrewd and sweet;
Generous by birth, and ill at saying 'No,'
Yet in a bargain he was all men’s foe,
Would yield no inch of vantage in a trade,
And give away ere nightfall all he made.

“'Can I have lodging here?' once more I said.


He blew a whiff, and, leaning back his head,
'You come a piece through Bailey’s woods, I s’pose,
Acrost a bridge where a big swamp-oak grows?
It don’t grow, neither; it’s ben dead ten year,
Nor th' ain’t a livin' creetur, fur nor near,
Can tell wut killed it; but I some misdoubt
’Twas borers, there’s sech heaps on ’em about.
You did n' chance to run ag’inst my son,
A long, slab-sided youngster with a gun?
He’d oughto ben back more ’n an hour ago,
An' brought some birds to dress for supper—sho!
There he comes now. 'Say, Obed, wut ye got?
(He’ll hev some upland plover like as not.)
Wal, them’s real nice uns, an’ll eat A 1,
Ef I can stop their bein' over-done;
Nothin' riles me (I pledge my fastin' word)
Like cookin' out the natur' of a bird;
(Obed, you pick ’em out o' sight an' sound,
Your ma’am don’t love no feathers cluttrin' round;)
Jes' scare ’em with the coals,—thet’s my idee.'
Then, turning suddenly about on me,
'Wal, Square, I guess so. Callilate to stay?
I’ll ask Mis' Weeks; ’bout thet it’s hern to say.'

“Well, there I lingered all October through,


In that sweet atmosphere of hazy blue,
So leisurely, so soothing, so forgiving,
That sometimes makes New England fit for living.
I watched the landscape, erst so granite glum,
Bloom like the south side of a ripening plum,
And each rock-maple on the hillside make
His ten days' sunset doubled in the lake;
The very stone walls draggling up the hills
Seemed touched, and wavered in their roundhead wills.
Ah! there’s a deal of sugar in the sun!
Tap me in Indian summer, I should run
A juice to make rock-candy of,—but then
We get such weather scarce one year in ten.

“There was a parlor in the house, a room


To make you shudder with its prudish gloom.
The furniture stood round with such an air,
There seemed an old maid’s ghost in every chair,
Which looked as it had scuttled to its place
And pulled extempore a Sunday face,
Too smugly proper for a world of sin,
Like boys on whom the minister comes in.
The table, fronting you with icy stare,
Strove to look witless that its legs were bare,
While the black sofa with its horse-hair pall
Gloomed like a bier for Comfort’s funeral.
Each piece appeared to do its chilly best
To seem an utter stranger to the rest,
As if acquaintanceship were deadly sin,
Like Britons meeting in a foreign inn.
Two portraits graced the wall in grimmest truth,
Mister and Mistress W. in their youth,—
New England youth, that seems a sort of pill,
Half wish-I-dared, half Edwards on the Will,
Bitter to swallow, and which leaves a trace
Of Calvinistic cholic on the face.
Between them, o’er the mantel, hung in state
Solomon’s temple, done in copperplate;
Invention pure, but meant, we may presume,
To give some Scripture sanction to the room
To give some Scripture sanction to the room.
Facing this last, two samplers you might see,
Each, with its urn and stiffly-weeping tree,
Devoted to some memory long ago
More faded than their lines of worsted woe;
Cut paper decked their frames against the flies,
Though none e’er dared an entrance who were wise,
And bushed asparagus in fading green
Added its shiver to the franklin clean.

“When first arrived, I chilled a half-hour there,


Nor dared deflower with use a single chair;
I caught no cold, yet flying pains could find
For weeks in me,—a rheumatism of mind.
One thing alone imprisoned there had power
To hold me in the place that long half-hour:
A scutcheon this, a helm-surmounted shield,
Three griffins argent on a sable field;
A relic of the shipwrecked past was here,
And Ezra held some Old-World lumber dear.
Nay, do not smile; I love this kind of thing,
These cooped traditions with a broken wing,
This freehold nook in Fancy’s pipe-blown ball,
This less than nothing that is more than all!
Have I not seen sweet natures kept alive
Amid the humdrum of your business hive,
Undowered spinsters shielded from all harms,
By airy incomes from a coat of arms?”

He paused a moment, and his features took


The flitting sweetness of that inward look
I hinted at before; but, scarcely seen,
It shrank for shelter ’neath his harder mien,
And, rapping his black pipe of ashes clear,
He went on with a self-derisive sneer:
“No doubt we make a part of God’s design,
And break the forest-path for feet divine;
To furnish foothold for this grand prevision
Is good and yet to be the mere transition
Is good, and yet—to be the mere transition,
That, you will say, is also good, though I
Scarce like to feed the ogre By-and-by.
Raw edges rasp my nerves; my taste is wooed
By things that are, not going to be, good,
Though were I what I dreamed two lustres gone,
I’d stay to help the Consummation on,
Whether a new Rome than the old more fair,
Or a deadflat of rascal-ruled despair;
But my skull somehow never closed the suture
That seems to knit yours firmly with the future,
So you ’ll excuse me if I’m sometimes fain
To tie the past’s warm nightcap o’er my brain;
I’m quite aware ’tis not in fashion here,
But then your northeast winds are so severe!

“But to my story: though ’tis truly naught


But a few hints in Memory’s sketchbook caught,
And which may claim a value on the score
Of calling back some scenery now no more.
Shall I confess? The tavern’s only Lar
Seemed (be not shocked!) its homely-featured bar.
Here dozed a fire of beechen logs, that bred
Strange fancies in its embers golden-red,
And nursed the loggerhead whose hissing dip,
Timed by nice instinct, creamed the mug of flip
That made from mouth to mouth its genial round,
Nor left one nature wholly winter-bound;
Hence dropt the tinkling coal all mellow-ripe
For Uncle Reuben’s talk-extinguished pipe;
Hence rayed the heat, as from an in-door sun,
That wooed forth many a shoot of rustic fun.
Here Ezra ruled as king by right divine;
No other face had such a wholesome shine,
No laugh like his so full of honest cheer;
Above the rest it crowed like Chanticleer.

“In this one room his dame you never saw,


Wh i db t ld S li l
Where reigned by custom old a Salic law;
Here coatless lolled he on his throne of oak,
And every tongue paused midway if he spoke.
Due mirth he loved, yet was his sway severe;
No blear-eyed driveller got his stagger here;
'Measure was happiness; who wanted more,
Must buy his ruin at the Deacon’s store;'
None but his lodgers after ten could stay,
Nor after nine on eves of Sabbath-day.
He had his favorites and his pensioners,
The same that gypsy Nature owns for hers:
Loose-ended souls, whose skills bring scanty gold,
And whom the poor-house catches when they ’re old;
Rude country-minstrels, men who doctor kine,
Or graft, and, out of scions ten, save nine;
Creatures of genius they, but never meant
To keep step with the civic regiment.
These Ezra welcomed, feeling in his mind
Perhaps some motions of the vagrant kind;
These paid no money, yet for them he drew
Special Jamaica from a tap they knew,
And, for their feelings, chalked behind the door
With solemn face a visionary score.
This thawed to life in Uncle Reuben’s throat
A torpid shoal of jest and anecdote,
Like those queer fish that doze the droughts away,
And wait for moisture, wrapt in sun-baked clay;
This warmed the one-eyed fiddler to his task,
Perched in the corner on an empty cask,
By whose shrill art rapt suddenly, some boor
Rattled a double-shuffle on the floor;
'Hull’s Victory' was, indeed, the favorite air,
Though 'Yankee Doodle' claimed its proper share.

“'Twas there I caught from Uncle Reuben’s lips,


In dribbling monologue ’twixt whiffs and sips,
The story I so long have tried to tell;
The humor coarse, the persons common,—well,
From Nature only do I love to paint,
Whether she send a satyr or a saint;
To me Sincerity’s the one thing good,
Soiled though she be and lost to maidenhood.
Quompegan is a town some ten miles south
From Jethro, at Nagumscot river-mouth,
A seaport town, and makes its title good
With lumber and dried fish and eastern wood.
Here Deacon Bitters dwelt and kept the Store,
The richest man for many a mile of shore;
In little less than everything dealt he,
From meeting-houses to a chest of tea;
So dextrous therewithal a flint to skin,
He could make profit on a single pin;
In business strict, to bring the balance true
He had been known to bite a fig in two,
And change a board-nail for a shingle-nail.
All that he had he ready held for sale,
His house, his tomb, whate’er the law allows,
And he had gladly parted with his spouse.
His one ambition still to get and get,
He would arrest your very ghost for debt.
His store looked righteous, should the Parson come,
But in a dark back-room he peddled rum,
And eased Ma’am Conscience, if she e’er would scold,
By christening it with water ere he sold.
A small, dry man he was, who wore a queue,
And one white neckcloth all the week-days through,—
On Monday white, by Saturday as dun
As that worn homeward by the prodigal son.
His frosted earlocks, striped with foxy brown,
Were braided up to hide a desert crown;
His coat was brownish, black perhaps of yore;
In summer-time a banyan loose he wore;
His trousers short, through many a season true,
Made no pretence to hide his stockings blue;
A waistcoat buff his chief adornment was,
Its porcelain buttons rimmed with dusky brass
Its porcelain buttons rimmed with dusky brass.
A deacon he, you saw it in each limb,
And well he knew to deacon-off a hymn,
Or lead the choir through all its wandering woes
With voice that gathered unction in his nose,
Wherein a constant snuffle you might hear,
As if with him ’twere winter all the year.
At pew-head sat he with decorous pains,
In sermon-time could foot his weekly gains,
Or, with closed eyes and heaven-abstracted air,
Could plan a new investment in long-prayer.
A pious man, and thrifty too, he made
The psalms and prophets partners in his trade,
And in his orthodoxy straitened more
As it enlarged the business at his store;
He honored Moses, but, when gain he planned,
Had his own notion of the Promised Land.

“Soon as the winter made the sledding good,


From far around the farmers hauled him wood,
For all the trade had gathered ’neath his thumb.
He paid in groceries and New England rum,
Making two profits with a conscience clear,—
Cheap all he bought, and all he paid with dear.
With his own mete-wand measuring every load,
Each somehow had diminished on the road;
An honest cord in Jethro still would fail
By a good foot upon the Deacon’s scale,
And, more to abate the price, his gimlet eye
Would pierce to cat-sticks that none else could spy;
Yet none dared grumble, for no farmer yet
But New Year found him in the Deacon’s debt.

“While the first snow was mealy under feet,


A team drawled creaking down Quompegan street.
Two cords of oak weighed down the grinding sled,
And cornstalk fodder rustled overhead;
The oxen’s muzzles, as they shouldered through,
Were silver fringed; the driver’s own was blue
Were silver-fringed; the driver s own was blue
As the coarse frock that swung below his knee.
Behind his load for shelter waded he;
His mittened hands now on his chest he beat,
Now stamped the stiffened cowhides of his feet,
Hushed as a ghost’s; his armpit scarce could hold
The walnut whipstock slippery-bright with cold.
What wonder if, the tavern as he past,
He looked and longed, and stayed his beasts at last,
Who patient stood and veiled themselves in steam
While he explored the bar-room’s ruddy gleam?

“Before the fire, in want of thought profound,


There sat a brother-townsman weather-bound:
A sturdy churl, crisp-headed, bristly-eared,
Red as a pepper; ’twixt coarse brows and beard
His eyes lay ambushed, on the watch for fools,
Clear, gray, and glittering like two bay-edged pools;
A shifty creature, with a turn for fun,
Could swap a poor horse for a better one,—
He’d a high-stepper always in his stall;
Liked far and near, and dreaded therewithal.
To him the in-comer, 'Perez, how d’ye do?'
'Jest as I’m mind to, Obed; how do you?'
Then, his eyes twinkling such swift gleams as run
Along the levelled barrel of a gun
Brought to his shoulder by a man you know
Will bring his game down, he continued, 'So,
I s’pose you’re haulin' wood? But you’re too late;
The Deacon’s off; Old Splitfoot couldn’t wait;
He made a bee-line las' night in the storm
To where he won’t need wood to keep him warm.
’Fore this he’s treasurer of a fund to train
Young imps as missionaries; hopes to gain
That way a contract that he has in view
For fireproof pitchforks of a pattern new.
It must have tickled him, all drawbacks weighed,
To think he stuck the Old One in a trade;
His soul, to start with, wasn’t worth a carrot,
And all he’d left ’ould hardly serve to swear at.'

“By this time Obed had his wits thawed out,


And, looking at the other half in doubt,
Took off his fox-skin cap to scratch his head,
Donned it again, and drawled forth, 'Mean he’s dead?'
'Jesso; he’s dead and t’other d that follers
With folks that never love a thing but dollars.
He pulled up stakes last evening, fair and square,
And ever since there’s been a row Down There.
The minute the old chap arrived, you see,
Comes the Boss-devil to him, and says he,
“What are you good at? Little enough, I fear;
We callilate to make folks useful here.”
“Well,” says old Bitters, “I expect I can
Scale a fair load of wood with e’er a man.”
“Wood we don’t deal in; but perhaps you’ll suit,
Because we buy our brimstone by the foot:
Here, take this measurin'-rod, as smooth as sin,
And keep a reckonin' of what loads comes in.
You’ll not want business, for we need a lot
To keep the Yankees that you send us hot;
At firin' up they’re barely half as spry
As Spaniards or Italians, though they’re dry;
At first we have to let the draught on stronger,
But, heat ’em through, they seem to hold it longer.”

“'Bitters he took the rod, and pretty soon


A teamster comes, whistling an ex-psalm tune.
A likelier chap you wouldn’t ask to see,
No different, but his limp, from you or me'—
'No different, Perez! Don’t your memory fail?
Why, where in thunder was his horns and tail?'
'They’re only worn by some old-fashioned pokes;
They mostly aim at looking just like folks.
Sech things are scarce as queues and top-boots here;
’Twould spoil their usefulness to look too queer.
p q
Ef you could always know ’em when they come,
They’d get no purchase on you: now be mum.
On come the teamster, smart as Davy Crockett,
Jinglin' the red-hot coppers in his pocket,
And clost behind, ('twas gold-dust, you’d ha' sworn,)
A load of sulphur yallower’n seed-corn;
To see it wasted as it is Down There
Would make a Friction-Match Co. tear its hair!
“Hold on!” says Bitters, “stop right where you be;
You can’t go in athout a pass from me.”
“All right,” says t’other, “only step round smart;
I must be home by noon-time with the cart.”
Bitters goes round it sharp-eyed as a rat,
Then with a scrap of paper on his hat
Pretends to cipher. “By the public staff,
That load scarce rises twelve foot and a half.”
“There’s fourteen foot and over,” says the driver,
“Worth twenty dollars, ef it’s worth a stiver;
Good fourth-proof brimstone, that’ll make ’em squirm,—
I leave it to the Headman of the Firm;
After we masure it, we always lay
Some on to allow for settlin' by the way.
Imp and full-grown, I’ve carted sulphur here,
And given fair satisfaction, thirty year.”
With that they fell to quarrellin' so loud
That in five minutes they had drawed a crowd,
And afore long the Boss, who heard the row,
Comes elbowin' in with “What’s to pay here now?”
Both parties heard, the measurin'-rod he takes,
And of the load a careful survey makes.
“Sence I’ve bossed the business here,” says he,
“No fairer load was ever seen by me.”
Then, turnin' to the Deacon, “You mean cus,
None of your old Quompegan tricks with us!
They won’t do here: we’re plain old-fashioned folks,
And don’t quite understand that kind o' jokes.
I know this teamster, and his pa afore him,
And the hard working Mrs D that bore him;
And the hard-working Mrs. D. that bore him;
He wouldn’t soil his conscience with a lie,
Though he might get the custom-house thereby.
Here, constable, take Bitters by the queue,
And clap him into furnace ninety-two,
And try this brimstone on him; if he’s bright,
He’ll find the masure honest afore night.
He isn’t worth his fuel, and I’ll bet
The parish oven has to take him yet!” ’

“This is my tale, heard twenty years ago


From Uncle Reuben, as the logs burned low,
Touching the walls and ceiling with that bloom
That makes a rose’s calyx of a room.
I could not give his language, wherethrough ran
The gamy flavor of the bookless man
Who shapes a word before the fancy cools,
As lonely Crusoe improvised his tools.
I liked the tale,—’twas like so many told
By Rutebeuf and his brother Trouvères bold;
Nor were the hearers much unlike to theirs,
Men unsophisticate, rude-nerved as bears.
Ezra is gone and his large-hearted kind,
The landlords of the hospitable mind;
Good Warriner of Springfield was the last;
An inn is now a vision of the past;
One yet-surviving host my mind recalls,—
You’ll find him if you go to Trenton Falls.”

THE ORIGIN OF DIDACTIC POETRY.


When wise Minerva still was young
And just the least romantic,
Soon after from Jove’s head she flung
That preternatural antic,
’Tis said, to keep from idleness
Or flirting, those twin curses,
She spent her leisure, more or less,
In writing po——, no, verses.

How nice they were! to rhyme with far


A kind star did not tarry;
The metre, too, was regular
As schoolboy’s dot and carry;
And full they were of pious plums,
So extra-super-moral,—
For sucking Virtue’s tender gums
Most tooth-enticing coral.

A clean, fair copy she prepares,


Makes sure of moods and tenses,
With her own hand,—for prudence spares
A man-(or woman-)-uensis;
Complete, and tied with ribbons proud,
She hinted soon how cosy a
Treat it would be to read them loud
After next day’s Ambrosia.

The Gods thought not it would amuse


So much as Homer’s Odyssees,
But could not very well refuse
The properest of Goddesses;
So all sat round in attitudes
Of various dejection,
As with a hem! the queen of prudes
Began her grave prelection.

At the first pause Zeus said, “Well sung!—


I k Ph b h k ”
I mean—ask Phœbus,—he knows.”
Says Phœbus, “Zounds! a wolf’s among
Admetus’s merinos!
Fine! very fine! but I must go;
They stand in need of me there;
Excuse me!” snatched his stick, and so
Plunged down the gladdened ether.

With the next gap, Mars said, “For me


Don’t wait,—naught could be finer,
But I’m engaged at half past three,—
A fight in Asia Minor!”
Then Venus lisped, “I’m sorely tried,
These duty-calls are vip’rous;
But I must go; I have a bride
To see about in Cyprus.”

Then Bacchus,—“I must say good bye,


Although my peace it jeopards;
I meet a man at four, to try
A well-broke pair of leopards.”
His words woke Hermes. “Ah!” he said,
“I so love moral theses!”
Then winked at Hebe, who turned red,
And smoothed her apron’s creases.

Just then Zeus snored,—the Eagle drew


His head the wing from under;
Zeus snored,—o’er startled Greece there flew
The many-volumed thunder.
Some augurs counted nine, some, ten;
Some said ’twas war, some, famine,
And all, that other-minded men
Would get a precious——.

Proud Pallas sighed, “It will not do;


Against the Muse I’ve sinned, oh!”
And her torn rhymes sent flying through
Ol ’ b k i d
Olympus’s back window.
Then, packing up a peplus clean,
She took the shortest path thence,
And opened, with a mind serene,
A Sunday-school in Athens.

The verses? Some in ocean swilled,


Killed every fish that bit to ’em;
Some Galen caught, and, when distilled,
Found morphine the residuum;
But some that rotted on the earth
Sprang up again in copies,
And gave two strong narcotics birth,
Didactic verse and poppies.

Years after, when a poet asked


The Goddess’s opinion,
As one whose soul its wings had tasked
In Art’s clear-aired dominion,
“Discriminate,” she said, “betimes;
The Muse is unforgiving;
Put all your beauty in your rhymes,
Your morals in your living.”

THE FLYING DUTCHMAN.

Don’t believe in the Flying Dutchman?


I’ve known the fellow for years;
My button I’ve wrenched from his clutch, man:
I shudder whenever he nears!

He’s a Rip van Winkle skipper,


A Wandering Jew of the sea,
Who sails his bedevilled old clipper
In the wind’s eye, straight as a bee.

Back topsails! you can’t escape him;


The man-ropes stretch with his weight,
And the queerest old toggeries drape him,
The Lord knows how long out of date!

Like a long-disembodied idea,


(A kind of ghost plentiful now,)
He stands there; you fancy you see a
Coeval of Teniers or Douw.

He greets you; would have you take letters:


You scan the addresses with dread,
While he mutters his donners and wetters,—
They’re all from the dead to the dead!

You seem taking time for reflection,


But the heart fills your throat with a jam,
As you spell in each faded direction
An ominous ending in dam.

Am I tagging my rhymes to a legend?


That were changing green turtle to mock:
No, thank you! I’ve found out which wedge-end
Is meant for the head of a block.

The fellow I have in my mind’s eye


Plays the old Skipper’s part here on shore,
And sticks like a burr, till he finds I
Have got just the gauge of his bore.

This postman ’twixt one ghost and t’other,


With last dates that smell of the mould,
I have met him (O man and brother,
Forgive me!) in azure and gold.

In the pulpit I’ve known of his preaching,


Out of hearing behind the time,
Some statement of Balaam’s impeaching,
Giving Eve a due sense of her crime.
I have seen him some poor ancient thrashing
Into something (God save us!) more dry,
With the Water of Life itself washing
The life out of earth, sea, and sky.

O dread fellow-mortal, get newer


Despatches to carry, or none!
We’re as quick as the Greek and the Jew were
At knowing a loaf from a stone.

Till the couriers of God fail in duty,


We sha’n’t ask a mummy for news,
Nor sate the soul’s hunger for beauty
With your drawings from casts of a Muse.

CREDIDIMUS JOVEM REGNARE.

O days endeared to every Muse,


When nobody had any Views,
Nor, while the cloudscape of his mind
By every breeze was new designed,
Insisted all the world should see
Camels or whales where none there be!
O happy days, when men received
From sire to son what all believed,
And left the other world in bliss,
Too busy with bedevilling this!

Beset by doubts of every breed


In the last bastion of my creed,
With shot and shell for Sabbath-chime,
I watch the storming-party climb,
Panting (their prey in easy reach),
To pour triumphant through the breach
In walls that shed like snowflakes tons
Of missiles from old-fashioned guns,
B t bl ’ th th t th t
But crumble ’neath the storm that pours
All day and night from bigger bores.
There, as I hopeless watch and wait
The last life-crushing coil of Fate,
Despair finds solace in the praise
Of those serene dawn-rosy days
Ere microscopes had made us heirs
To large estates of doubts and snares,
By proving that the title-deeds,
Once all-sufficient for men’s needs,
Are palimpsests that scarce disguise
The tracings of still earlier lies,
Themselves as surely written o’er
An older fib erased before.

So from these days I fly to those


That in the landlocked Past repose,
Where no rude wind of doctrine shakes
From bloom-flushed boughs untimely flakes;
Where morning’s eyes see nothing strange,
No crude perplexity of change,
And morrows trip along their ways
Secure as happy yesterdays.
Then there were rulers who could trace
Through heroes up to gods their race,
Pledged to fair fame and noble use
By veins from Odin filled or Zeus,
And under bonds to keep divine
The praise of a celestial line.
Then priests could pile the altar’s sods,
With whom gods spake as they with gods,
And everywhere from haunted earth
Broke springs of wonder, that had birth
In depths divine beyond the ken
And fatal scrutiny of men;
Then hills and groves and streams and seas
Thrilled with immortal presences,
Not too ethereal for the scope
Of human passion’s dream or hope.

Now Pan at last is surely dead,


And King No-Credit reigns instead,
Whose officers, morosely strict,
Poor Fancy’s tenantry evict,
Chase the last Genius from the door,
And nothing dances any more.
Nothing? Ah, yes, our tables do,
Drumming the Old One’s own tattoo,
And, if the oracles are dumb,
Have we not mediums? Why be glum?

Fly thither? Why, the very air


Is full of hindrance and despair!
Fly thither? But I cannot fly;
My doubts enmesh me if I try,—
Each lilliputian, but, combined,
Potent a giant’s limbs to bind.
This world and that are growing dark;
A huge interrogation mark,
The Devil’s crook episcopal,
Still borne before him since the Fall,
Blackens with its ill-omened sign
The old blue heaven of faith benign.
Whence? Whither? Wherefore? How? Which? Why?
All ask at once, all wait reply.
Men feel old systems cracking under ’em;
Life saddens to a mere conundrum
Which once Religion solved, but she
Has lost—has Science found?—the key.

What was snow-bearded Odin, trow,


The mighty hunter long ago,
Whose horn and hounds the peasant hears
Still when the Northlights shake their spears?
Science hath answers twain, I’ve heard;
Choose which you will, nor hope a third;
y p
Whichever box the truth be stowed in,
There’s not a sliver left of Odin.
Either he was a pinchbrowed thing,
With scarcely wit a stone to fling,
A creature both in size and shape
Nearer than we are to the ape,
Who hung sublime with brat and spouse
By tail prehensile from the boughs,
And, happier than his maimed descendants,
The culture-curtailed independents,
Could pluck his cherries with both paws,
And stuff with both his big-boned jaws;
Or else the core his name enveloped
Was from a solar myth developed,
Which, hunted to its primal shoot,
Takes refuge in a Sanskrit root,
Thereby to instant death explaining
The little poetry remaining.

Try it with Zeus, ’tis just the same;


The thing evades, we hug a name;
Nay, scarcely that,—perhaps a vapor
Born of some atmospheric caper.
All Lempriere’s fables blur together
In cloudy symbols of the weather,
And Aphrodite rose from frothy seas
But to illustrate such hypotheses.
With years enough behind his back,
Lincoln will take the selfsame track,
And prove, hulled fairly to the cob,
A mere vagary of Old Prob.
Give the right man a solar myth,
And he’ll confute the sun therewith.

They make things admirably plain,


But one hard question will remain:
If one hypothesis you lose,
Another in its place you choose,

You might also like