Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Blockchain Quick Reference
Blockchain Quick Reference

Blockchain Quick Reference: A guide to exploring decentralized blockchain application development

Arrow left icon
Profile Icon Hill Profile Icon Mariko Amekodommo Profile Icon Chopra Profile Icon Paul Valencourt
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (4 Ratings)
Paperback Aug 2018 350 pages 1st Edition
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Hill Profile Icon Mariko Amekodommo Profile Icon Chopra Profile Icon Paul Valencourt
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (4 Ratings)
Paperback Aug 2018 350 pages 1st Edition
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Blockchain Quick Reference

Components and Structure of Blockchain

Blockchain is not a single technology, but more of a technique. A blockchain is an architectural concept, and there are many ways that blockchains can be be built, and each of the variations will have different effects on how the system operates. In this chapter, we are going to cover the aspects of blockchain technology that are used in all or most of the current implementations.

By the end of this chapter, you should be able to describe the pieces of a blockchain and evaluate the capacities of one blockchain technology against another at the architectural level.

Here are the concepts we will be covering:

  • Blocks
  • The chain between blocks
  • Hashing and signatures
  • Block structure
  • Block miners
  • Block validators
  • Smart contracts
  • Blockchain speed

Blocks

Blockchain is a specific technology, but there are many forms and varieties. For instance, Bitcoin and Ethereum are proof-of-work blockchains. Ethereum has smart contracts, and many blockchains allow custom tokens. Blockchains can be differentiated by their consensus algorithm (PoS, PoW, and others)—covered in Chapter 7, Achieving Consensus, and their feature set, such as the ability to run smart contracts and how those smart contracts operate in practice. All of these variations have a common concept: the block. The most basic unit of a blockchain is the block. The simplest way of thinking of a block is to imagine a basic spreadsheet. In it, you might see entries such as this:

Account Change New Balance Old Balance Operation
Acct-9234222 −$2,000 $5,000 $7,000 Send funds to account-12345678
Acct-12345678 $2,000 $2,000 0 Receive funds from account-9234222...

The chain between blocks

In addition to the transaction ledger, each block typically contains some additional metadata. The metadata includes the following:

  • A reference to the prior block
  • Metadata about the network
  • The Merkle root of the transactions, which acts as a check of the validity of the block

These basics tend to be common for all blockchains. Ethereum, Bitcoin, Litecoin, and others use this common pattern, and this pattern is what makes it a chain. Each chain also tends to include other metadata that is specific to that ecosystem, and those differences will be discussed in future chapters. Here is an example from the Bitcoin blockchain:

By Satoshi Nakamoto: http://Bitcoin.org/Bitcoin.pdf, MIT, https://commons.wikimedia.org/w/index.php?curid=24542868

If you are asking, What is a Merkle root?, that brings us to our next set of key concepts: hashing and signature.

...

Hashing and signatures

Let's say you have two text files that are 50 pages long. You want to know whether they are the same or different. One way you could do this would be to hash them. Hashing (or a hashing function) is a mathematical procedure by which any input is turned into a fixed-length output. There are many of these functions, the most common being SHA-1, SHA-2, and MD5. For instance, here is the output of a hashing function called MD5 with an input of two pages of text:

9a137a78cf0c364e4d94078af1e221be

What's powerful about hashing functions is what happens when I add a single character to the end and run the same function:

8469c950d50b3394a30df3e0d2d14d74

As you can see, the output is completely different. If you want to quickly prove that some data has not been changed in any way, a hash function will do it. For our discussion, here are the important parts...

Digital signatures

Now that we've covered hashing, it's time to go over a related concept: digital signatures. Digital signatures use the properties of hashing to not only prove that data hasn't changed but to provide assurances of who created it. Digital signatures work off the concept of hashing but add a new concept as well: digital keys.

What are digital keys?

All common approaches to digital signatures use what is called Public Key Cryptography. In Public Key Cryptography, there are two keys: one public and one private. To create a signature, the first hash is produced of the original data, and then the private key is used to encrypt that hash. That encrypted hash, along with other information, such as...

Example block data

In this section, we are going to examine the data structures that are used in blockchains. We will be looking primarily at Ethereum, Bitcoin, and Bitshares blockchains to see key commonalities and differences.

Example Ethereum block

Here is the data from an example Ethereum block, from block 5223669:

If you remember, at the beginning of the chapter, we said there were three things common to blockchains: the reference to the prior block, the Hash of the transactions in the block, and network-specific metadata. In this block from the Ethereum network, all three are present. The reference to the prior block is contained by the block height and parent hash values. The Hash of the transactions is the hash entry...

Blockchain miners

Blockchain miners and blockchain validators (see the upcoming sections) both have to do with consensus, which will be explored in depth in Chapter 7, Achieving Consensus. Generally, blockchain miners are associated with blockchains. A PoW chain functions by having the computers that are miners compete to do the work needed to certify a block in the chain. Currently, the only major PoW blockchains are Bitcoin, Litecoin, and Ethereum. Most other systems use a variation of PoS consensus, which we will discuss in the next Blockchain validators section. We'll cover how mining works in detail in Chapter 18, Mining.

Blockchain validators

Blockchain validators are used by PoS systems. A PoS system works by requiring computers that wish to participate in the network to have stake—a large number of tokens—to assist in the blockchain. Unlike PoW algorithms, computers cannot join the network and expect to have any say in consensus. Rather, they must buy in through token ownership. Depending on the network, the naming convention for validators might be different. Tendermint has validators, Steemit and Bitshares have witnesses, Cardano has stakeholders, and so on. A validator is a computer with a positive stake (number of tokens) that is allowed to participate in the network and does so. Each chain has its own rules for how this works, and these will be covered more in-depth in Chapter 7, Achieving Consensus.

Smart contracts

Some blockchains are said to have smart contracts when they are able to perform actions and behavior in response to changes to the chain. These will be covered in depth in Chapter 14, Smart Contracts and Chapter 17, Decentralized Applications.

Blockchain speed

One ongoing concern for blockchain systems is performance. Public blockchains are global systems, with their system resources shared by all the users in the world simultaneously. With such a large user base, resource constraints are a real concern and have already caused real problems. For instance, a popular game called CryptoKitties was launched on Ethereum and caused the network to become congested. Other applications became nearly unusable, as the load from CryptoKitties overwhelmed the network.

How to calculate blockchain throughput

The quick and dirty way of calculating the throughput of a blockchain is as follows:

For Bitcoin, the transaction throughput is about 7tx/second. This is because of the...

Summary

Now you should understand the basic components of a blockchain. Blocks are groups of transactions grouped together and act as the fundamental unit of a blockchain. Miners are computers that create new blocks on PoW blockchains. Validators, also called witnesses and other names, are computers that create blocks on PoS blockchains. Digital signatures are composed of public and private keys and use mathematics to prove the author of the data.

The key ideas of hashing is to use a mathematical function that maps arbitrary data to a single, simple to deal with value. Any change to the data will make the end value very different

  • It's essentially impossible to construct the original data from the hash, but it's easy to create the hash from the original data
  • You can use these properties to prove that data has not been changed

In the next chapter, we will learn what...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Resolve common challenges and problems faced in the Blockchain domain
  • Study architecture, concepts, terminologies, and Dapps
  • Make smart choices using Blockchain for personal and business investments

Description

Blockchain Quick Reference takes you through the electrifying world of blockchain technology and is designed for those who want to polish their existing knowledge regarding the various pillars of the blockchain ecosystem. This book is your go-to guide, teaching you how to apply principles and ideas for making your life and business better. You will cover the architecture, Initial Coin Offerings (ICOs), tokens, smart contracts, and terminologies of the blockchain technology, before studying how they work. All you need is a curious mind to get started with blockchain technology. Once you have grasped the basics, you will explore components of Ethereum, such as ether tokens, transactions, and smart contracts, in order to build simple Dapps. You will then move on to learning why Solidity is used specifically for Ethereum-based projects, followed by exploring different types of blockchain with easy-to-follow examples. All this will help you tackle challenges and problems. By the end of this book, you will not only have solved current and future problems relating to blockchain technology but will also be able to build efficient decentralized applications.

Who is this book for?

Blockchain Quick Reference is for you if you are a developer who wants to get well-versed with blockchain and its associated concepts and terminologies. You will explore the working mechanism of a decentralized application with the help of examples. Business leaders and blockchain enthusiasts will also find this book useful, as it will help you effectively address challenges and make better personal and business investments.

What you will learn

  • Understand how blockchain architecture components work
  • Acquaint yourself with cryptography and the mechanics behind blockchain
  • Apply consensus protocol to determine the business sustainability
  • Understand what ICOs and crypto-mining are and how they work
  • Create cryptocurrency wallets and coins for transaction mechanisms
  • Understand the use of Ethereum for smart contract and DApp development

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 10, 2018
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781788995788
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Aug 10, 2018
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781788995788
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 113.97
Blockchain Quick Reference
€29.99
Mastering Blockchain
€41.99
Hands-On Blockchain with Hyperledger
€41.99
Total 113.97 Stars icon

Table of Contents

23 Chapters
Blockchain 101 Chevron down icon Chevron up icon
Components and Structure of Blockchain Chevron down icon Chevron up icon
Decentralization Versus Distributed Systems Chevron down icon Chevron up icon
Cryptography and Mechanics Behind Blockchain Chevron down icon Chevron up icon
Bitcoin Chevron down icon Chevron up icon
Altcoins Chevron down icon Chevron up icon
Achieving Consensus Chevron down icon Chevron up icon
Advanced Blockchain Concepts Chevron down icon Chevron up icon
Cryptocurrency Wallets Chevron down icon Chevron up icon
Alternate Blockchains Chevron down icon Chevron up icon
Hyperledger and Enterprise Blockchains Chevron down icon Chevron up icon
Ethereum 101 Chevron down icon Chevron up icon
Solidity 101 Chevron down icon Chevron up icon
Smart Contracts Chevron down icon Chevron up icon
Ethereum Development Chevron down icon Chevron up icon
Ethereum Accounts and Ether Tokens Chevron down icon Chevron up icon
Decentralized Applications Chevron down icon Chevron up icon
Mining Chevron down icon Chevron up icon
ICO 101 Chevron down icon Chevron up icon
Creating Your Own Currency Chevron down icon Chevron up icon
Scalability and Other Challenges Chevron down icon Chevron up icon
Future of Blockchain Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(4 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Amazon Customer Nov 17, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great read, regardless of whether you're a novice to fintech/blockchain. It can be dense but the evolving world of e-currency (and the architecture that supports its development) requires that the material address all kinds of issues that the average Joe would probably not even think about - until it affected him and it were probably too late.The world of how we view currency, and how it moves, is changing. Put some kettles of tea on the stove and give the reference its due.
Amazon Verified review Amazon
A. Fox Sep 11, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is an excellent choice for starting at the ground level and learning your way up to the professional leagues. It will take you step by step through the process of starting a healthy cryptocurrency, or utilizing a blockchain in areas unrelated to cryptocurrencies. You won't have a bunch of jargon spit at you, concepts and terminology are explained so that you can be conversant and knowledable. Unlike many reference books, you won't find yourself reading about a subject without the foundational subject matter already explained, you learn as you go and your knowledge builds along the way.Even if you are already well-versed in these concepts, this book still has a place in your library as an excellent resource to keep your skills sharp and accurate.
Amazon Verified review Amazon
Harish C Oct 23, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been late to get into blockchain mainly because of all the technical jargons being thrown around.I loved this book as the author while trying to explain everything you need to know, have done it in a way that is easy to understand.
Amazon Verified review Amazon
Evan Barry Oct 05, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I took a chance cause i was pretty lost and a bit desperate when i broke down and bought this book. It’s been a great reference and help! I had no idea how much of the basics I really was missing but this well written, easy to read little beauty has become my new bible. Everyone who is interested in blockchain needs it!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.