Home Data Mastering Blockchain - Second Edition

Mastering Blockchain - Second Edition

By Imran Bashir
books-svg-icon Book
Subscription FREE
eBook + Subscription €14.99
eBook €32.99
Print + eBook €41.99
READ FOR FREE Free Trial for 7 days. €14.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
READ FOR FREE Free Trial for 7 days. €14.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
Subscription FREE
eBook + Subscription €14.99
eBook €32.99
Print + eBook €41.99
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
  1. Free Chapter
    Blockchain 101
About this book
Publisher's Note: This edition from 2018 is outdated and does not cover the latest insights on consensus algorithms, Ethereum 2.0, tokenization, and enterprise blockchains. A new and updated edition of this book that includes all the newest developments and improvements in Blockchain including the above topics is now available. A blockchain is a distributed ledger that is replicated across multiple nodes and enables immutable, transparent and cryptographically secure record-keeping of transactions. The blockchain technology is the backbone of cryptocurrencies, and it has applications in finance, government, media and almost all other industries. Mastering Blockchain, Second Edition has been thoroughly updated and revised to provide a detailed description of this leading technology and its implementation in the real world. This book begins with the technical foundations of blockchain technology, teaching you the fundamentals of distributed systems, cryptography and how it keeps data secure. You will learn about the mechanisms behind cryptocurrencies and how to develop applications using Ethereum, a decentralized virtual machine. You will also explore different other blockchain solutions and get an introduction to business blockchain frameworks under Hyperledger, a collaborative effort for the advancement of blockchain technologies hosted by the Linux Foundation. You will also be shown how to implement blockchain solutions beyond currencies, Internet of Things with blockchain, blockchain scalability, and the future scope of this fascinating and powerful technology.
Publication date:
March 2018
Publisher
Packt
Pages
656
ISBN
9781788839044

 

Blockchain 101

If you are reading this book, it is very likely that you already have heard about blockchain and have some fundamental appreciation of its enormous potential. If not, then let me tell you that this is a technology that has promised to positively alter the existing paradigms of nearly all industries including, but not limited to IT, finance, government, media, medical, and law.

This chapter serves an introduction to blockchain technology, its technical foundations, the theory behind it, and various techniques that have been combined together to build what is known today as blockchain.

In this chapter, we first describe the theoretical foundations of distributed systems. Next, we address the precursors of Bitcoin by which blockchain technology was introduced to the world. Finally, we introduce you to blockchain technology. This approach is a logical way to understanding blockchain technology, as the roots of blockchain are in distributed systems. We will cover a lot of ground quickly here, but don't worry—we will go over a great deal of this material in much greater detail as you move through the book.

 

The growth of blockchain technology

With the invention of Bitcoin in 2008, the world was introduced to a new concept, which is now likely to revolutionize the whole of society. It is something that promises to have an impact on every industry, including but not limited to the financial sector, government, media, law, and arts. Some describe blockchain as a revolution, whereas another school of thought believes that it is going to be more evolutionary, and it will take many years before any practical benefits of blockchain reach fruition. This thinking is correct to some extent, but in my opinion, the revolution has already begun.

Many prominent organizations all around the world are already writing proofs of concept using blockchain technology, as its disruptive potential has now been fully recognized. However, some organizations are still in the preliminary exploration stage, though they are expected to progress more quickly as the technology matures. It is a technology that has an impact on current technologies too and possesses the ability to change them at a fundamental level.

If we look at the last few years, we notice that in 2013 some ideas started to emerge that suggested usage of blockchain in other areas than cryptocurrencies. Around that time the primary usage of blockchain was cryptocurrencies, and many new coins emerged during that time. The following graph shows a broad-spectrum outline of year wise progression and adaption trend of blockchain technology. Years shown on the x axis indicate the range of time in which a specific phase of blockchain technology falls. Each phase has a name which represents the action and is shown on the x axis starting from the period of IDEAS & THOUGHTS to eventually MATURITY & FURTHER STANDARDIZATION. The y axis shows level of activity, involvement and adoption of blockchain technology. The graph shows that eventually, roughly around 2025 blockchain technology is expected to become mature with a high number of users.

Blockchain technology adoption and maturity

The preceding graph shows that in 2013 IDEAS & THOUGHTS emerged related to other usages of blockchain technology apart from cryptocurrencies. Then in 2014 some RESEARCH & EXPERIMENTATION started which led to PROOF OF CONCEPTS, FURTHER RESEARCH, and full-scale TRIAL PROJECTS between 2015 and 2017. In 2018 we will see REAL WORLD IMPLEMENTATIONS. Already many projects are underway and set to replace existing systems, for example, Australian Securities Exchange (ASX) is soon to become the first organization to replace its legacy clearing and settlement system with blockchain technology.

More information on this topic can be found at https://www.asx.com.au/services/chess-replacement.htm.

It is expected that during 2019 more research will be carried out along with some interest towards regulation and standardization of blockchain technology. After this, production ready projects and off the shelf products utilizing blockchain technology will be available from 2020 and by 2021 mainstream usage of blockchain technology is expected to start. Progress in blockchain technology almost feels like the internet dot-com boom of the late 1990s. More research is expected to continue along with adaption and further maturity of blockchain technology, and finally, in 2025 it is expected that the technology will be mature enough to be used on day to day basis. Please note that the timelines provided in the chart are not strict and can vary as it is quite difficult to predict that when exactly blockchain technology will become mature. This graph is based on the progress made in the recent years and the current climate of research, interest and enthusiasm regarding this technology which suggests that by 2025 blockchain technology is expected to become mature.

Interest in blockchain technology has risen quite significantly over the last few years. Once dismissed as simply geek money from a cryptocurrency point of view, or as something that was just not considered worth pursuing, blockchain is now being researched by the largest companies and organizations around the world. Millions of dollars are being spent to adapt and experiment with this technology. This is evident from recent actions taken by European Union where they have announced plans to increase funding for blockchain research to almost 340 million euros by 2020.

Another report suggests that global spending on blockchain technology research could reach 9.2 billion dollars by 2021.

There are various consortiums such as Enterprise Ethereum Alliance (EEA), Hyperledger, and R3, which have been established for research and development of blockchain technology. Moreover, a large number of start-ups are providing blockchain-based solutions already. A simple trend search on Google reveals the immense scale of interest in blockchain technology over the last few years. Especially, since early 2017 the increase in the search term blockchain is quite significant, as shown in the following graph:

Google trend graph for blockchain

Various benefits of this technology are envisioned, such as decentralized trust, cost savings, transparency, and efficiency. However, there are multiple challenges too that are an area of active research on blockchain, such as scalability and privacy.

In this book, we are going to see how blockchain technology can help bring about the benefits mentioned earlier. You are going to learn about what exactly is blockchain technology, and how it can reshape businesses, multiple industries, and indeed everyday life by bringing about a plenitude of benefits such as efficiency, cost saving, transparency, and security. We will also explore what is distributed ledger technology, decentralization, and smart contracts and how technology solutions can be developed and implemented using mainstream blockchain platforms such as Ethereum, and Hyperledger. We will also investigate that what challenges need to be addressed before blockchain can become a mainstream technology.

Chapter 18, Scalability and Other Challenges, is dedicated to a discussion of the limitations and challenges of blockchain technology.

 

Distributed systems

Understanding distributed systems is essential to the understanding of blockchain technology, as blockchain is a distributed system at its core. It is a distributed ledger which can be centralized or decentralized. A blockchain is originally intended to be and is usually used as a decentralized platform. It can be thought of as a system that has properties of both decentralized and distributed paradigms. It is a decentralized-distributed system.

Distributed systems are a computing paradigm whereby two or more nodes work with each other in a coordinated fashion to achieve a common outcome. It is modeled in such a way that end users see it as a single logical platform. For example, Google's search engine is based on a large distributed system, but to a user, it looks like a single, coherent platform.

A node can be defined as an individual player in a distributed system. All nodes are capable of sending and receiving messages to and from each other. Nodes can be honest, faulty, or malicious, and they have memory and a processor. A node that exhibits irrational behavior is also known as a Byzantine node after the Byzantine Generals Problem.

The Byzantine Generals problem

In 1982, a thought experiment was proposed by Lamport and others in their research paper, The Byzantine Generals Problem which is available at: https://www.microsoft.com/en-us/research/publication/byzantine-generals-problem/ whereby a group of army generals who lead different parts of the Byzantine army are planning to attack or retreat from a city. The only way of communicating among them is via a messenger. They need to agree to strike at the same time in order to win. The issue is that one or more generals might be traitors who could send a misleading message. Therefore, there is a need for a viable mechanism that allows for agreement among the generals, even in the presence of the treacherous ones, so that the attack can still take place at the same time. As an analogy to distributed systems, the generals can be considered nodes, the traitors as Byzantine (malicious) nodes, and the messenger can be thought of as a channel of communication among the generals.
This problem was solved in 1999 by Castro and Liskov who presented the Practical Byzantine Fault Tolerance (PBFT) algorithm, where consensus is reached after a certain number of messages are received containing the same signed content.

This type of inconsistent behavior of Byzantine nodes can be intentionally malicious, which is detrimental to the operation of the network. Any unexpected behavior by a node on the network, whether malicious or not, can be categorized as Byzantine.

A small-scale example of a distributed system is shown in the following diagram. This distributed system has six nodes out of which one (N4) is a Byzantine node leading to possible data inconsistency. L2 is a link that is broken or slow, and this can lead to partition in the network.

Design of a distributed system: N4 is a Byzantine node, L2 is broken or a slow network link

The primary challenge in distributed system design is coordination between nodes and fault tolerance. Even if some of the nodes become faulty or network links break, the distributed system should be able to tolerate this and continue to work to achieve the desired result. This problem has been an active area of distributed system design research for many years, and several algorithms and mechanisms have been proposed to overcome these issues.

Distributed systems are so challenging to design that a hypothesis known as the CAP theorem has been proven, which states that a distributed system cannot have all three of the much-desired properties simultaneously; that is, consistency, availability, and partition tolerance. We will dive into the CAP theorem in more detail later in this chapter.

         
About the Author
  • Imran Bashir

    Imran Bashir has an M.Sc. in Information Security from Royal Holloway, University of London, and has a background in software development, solution architecture, infrastructure management, and IT service management. He is also a member of the Institute of Electrical and Electronics Engineers (IEEE) and the British Computer Society (BCS). Imran has extensive experience in both the public and financial sectors, having worked on large-scale IT projects in the public sector before moving to the financial services industry. Since then, he has worked in various technical roles for different financial companies in Europe's financial capital, London.

    Browse publications by this author
Latest Reviews (7 reviews total)
Newer publications at nice prices
In my view, it seems to be that the contents will be highly useful for contracting in the mining sector.
Alles Bestens! Wird sich beizeiten bewähren.
Mastering Blockchain - Second Edition
Unlock this book and the full library FREE for 7 days
Start now