In this guide, we will teach you the basics about the blockchain: what it is, how it works and what it means in the world of cryptocurrency. We explain where the idea of the blockchain came from, how it is used in bitcoin and other cryptocurrencies, what improvements have been made on its design, and how it is transforming not only the world of finance but many other areas of industry and society as a whole.
Introduction to the Blockchain
In order to understand what a blockchain is, you must first be familiar with some basic cryptocurrency terms; namely the two root words that compose “blockchain.”
Block. As applied to cryptocurrency, a “block” refers to a unit of storage which contains all the data for transactions taking place in a cryptocurrency network (such as Bitcoin, Litecoin, Ethereum, etc.) within a given time period. For bitcoin, the block time length is approximately 10 minutes. For Litecoin, it is approximately 2 minutes. For Ethereum, it is approximately 10-19 seconds. Transactions within a coin network cannot be confirmed, or verified, until they are added to a block by a miner. The shorter a block time period is, the faster a transaction can be confirmed, and its coins released to the transaction recipient.
Chain. Though only existing as a metaphor applied to actions performed by the network software of a cryptocurrency, a “chain” is what links all the blocks together, almost always in a linear fashion. This means that blocks are sequentially ordered by number (#1, #2, #3, #4, etc.), with each new block being put in front of the block before it when being added to the blockchain. Blocks are linked to a chain using a nonce, or an important number discovered by a miner during the mining process. Upon successful discovery of a nonce, a miner is rewarded with a certain number of coins for their contribution of adding a new block to the chain.
Thus, a blockchain is a string of blocks, ordered in a linear time sequence, which holds all the transaction information for a cryptocurrency network. Blockchains are by design tamper proof, meaning their contents are hard to alter. By residing in multiple sources, they are distributed, and by containing a sequential history of all transactions for a coin they act as a ledger. Below is a visualization of three blocks of a blockchain, each one holding 10 minutes worth of transaction information, spanning a total time period of one half hour.
What Exactly is a Blockchain?
The dictionary defines the word “blockchain” as such:
a digital ledger in which transactions made in bitcoin or another cryptocurrency are recorded chronologically and publicly.
“we can actually have a look at the blockchain and see evidence of what’s going on”
Investopedia, an online encyclopedia for terms related to financial investments, gives a slightly more detailed definition:
A blockchain is a digitized, decentralized, public ledger of all cryptocurrency transactions. Constantly growing as ‘completed’ blocks (the most recent transactions) are recorded and added to it in chronological order, it allows market participants to keep track of digital currency transactions without central recordkeeping. Each node (a computer connected to the network) gets a copy of the blockchain, which is downloaded automatically.
Basically, a blockchain is a ledger (or record) of all cryptocurrency transactions that have ever taken place within a cryptocurrency network. Each network participant (known as a node) keeps a copy of the blockchain on their computer. All nodes are in continuous communication with one another, constantly verifying, updating, and downloading the blockchain to the computer (or server) of each participant.
Anybody can be a node so long as they are connected to the internet, running the cryptocurrency network software, and have downloaded the coin’s entire blockchain to their hard drive. This is what allows for a cryptocurrency to be decentralized, or out of the control of any one person or group of individuals. If one node is shut down, or a bunch of nodes are all simultaneously shut down, a cryptocurrency can continue to function so long as there is at least one active node still present and running the coin’s software, keeping the blockchain up-to-date and alive.
Once recorded to a blockchain, the transaction data contained in any given block cannot be changed without alteration of all subsequent blocks, which requires a consensus of the network majority (at least 50% of all nodes need to agree on any changes made to a blockchain in order for them to be implemented). This prevents a single node (or group of nodes) from altering the blockchain in their favor, making a blockchain secure against malicious activity or “bad actors” who would attempt to manipulate transaction information for their own financial gain.
Origins of the Blockchain
The concept of the blockchain was invented in 2008 by the mysterious cryptography enthusiast and computer programmer Satoshi Nakamoto. While Nakamoto remains anonymous, disappearing altogether in 2012, he is credited with not only releasing the world’s first cryptocurrency (bitcoin) but successfully using the blockchain for the first time as well, as a mechanism for not only securing bitcoin but allowing it to function as well.
Nakamoto invented the blockchain as a solution to a problem: how do you make a digital currency that cannot be forged, counterfeited, or manipulated by other programmers (or hackers)? In his original whitepaper for the world’s first cryptocurrency, titled “Bitcoin: A Peer-to-Peer Electronic Cash System”, Nakamoto outlined his idea, which involved creating a network of users who all kept a copy of the blockchain on their own hard drives that was secured through computer cryptography.
The bitcoin network went live on January 3, 2009, with its genesis block (block #0) containing a reward of 50 bitcoins and the following message in its metadata, also known as a coinbase:
The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.
As of June 2018, there have been over 526,000 blocks added to the bitcoin blockchain. The total size of the bitcoin blockchain is now approaching 175 GB. Due to the exponential increase in bitcoin’s popularity since its launch in 2009, the size of its blockchain has been growing at an exponential rate, and this factor prevents most users from downloading the entire blockchain and running their own node. Instead, they rely on 3rd party services (such as web wallets like Coinbase and mobile wallets like Mycelium) to maintain a copy of the blockchain for them, from which individual wallets are updated and transacted upon.
Since each block in the bitcoin network has a maximum capacity of 1 MB of transaction data, the trend of exponential blockchain growth cannot continue, and the curve depicted in the graph above will likely flatten out and become more linear in the future.
How Does a Blockchain Work?
Because the technical detail of how a blockchain actually functions is long, complicated and requires intricate knowledge of mathematics, computer science and cryptography, we will just lay out the basics for the purposes this guide. The idea of the blockchain is actually quite revolutionary. Not only does it solve the problem of double-spending of a digital currency, it allows for the concurrent provision of public inspection (open sourced software), security (cryptographically secured) and non-regulated control / access (decentralization). Bitcoin and most other cryptocurrencies provide all 3 of these elements through usage of a blockchain.
To understand how a blockchain works, you must first have a basic grasp of the following concepts:
Cryptography. The science of cryptography has been around for ages, well before the invention of computers and even electricity. Basically, cryptography is the process of making information unreadable (otherwise known as encrypting) to everybody that does not possess the code or key (known as a cipher) needed to transcribe (decrypt) it. The reason for doing this is to keep sensitive information out of the hands of third parties, criminals or bad actors who would use such information for purposes other than it was intended.
One of the most successful examples of encryption was that of the Navajo Code Talkers. During World War II, the United States military employed the use of hundreds of Native Americans whose job it was to transmit top secret information over radio frequencies in the form of their native language, which was undecipherable by enemy forces. Famously, the Navajo code was the only spoken military code never to have been deciphered by the enemy, and it was used up through the Vietnam War of the ‘60s-‘70s.
Hashing Algorithm. A hashing algorithm, also known as a hash function, is basically a mathematical formula used to convert data of any size into a fixed size in an orderly format. Satoshi Nakamoto, founder of bitcoin, used a hashing algorithm developed by the NSA as the basis for cryptographically securing bitcoin wallets and transactions. Bitcoin’s Secure Hash Algorithm 256 (SHA-256) became the basis for hundreds of coins to follow suit, and thus far it has proven to be unhackable. A bitcoin address is derived from its private key, which is generated (along with the public key) during the key generation process. The specifications for this process are contained within the Bitcoin Core client, better known as the software required to maintain a full bitcoin wallet (complete with full copy of the blockchain), or to run a bitcoin node.
Bitcoin cryptography is one-way, meaning it is mathematically possible to determine a bitcoin address from a private key, but impossible to determine a private key from an address. A bitcoin private key is 51 or 52 characters in length, containing any letters from A-Z (lower and upper case) and any numbers from 0-9. Because this combination of characters is so long and so varied, there are 2^96 possibilities when generating a new private key. To put things in perspective, it is estimated that there are only 2^63 grains of sand on all of the beaches of planet earth combined, and you would have a better chance of correctly guessing a lottery number than you would guessing the exact private key of a bitcoin address.
Mining. Cryptocurrency mining is the process of discovering a nonce, or secret number needed to tie an incoming block to the blockchain. In the classic method of mining known as Proof of Work (PoW, used by bitcoin and many other coins), hash power is generated by a computer (or an ASIC) to discover the correct nonce as generated by a coin’s hash algorithm. Upon discovery of the correct nonce, a new block is added to the chain, the transactions within the block become validated (or confirmed) and the miner is rewarded with a set amount of newly-generated coins (plus the transaction fees for all transactions contained within the block).
In this way, miners are absolutely essential for the survival of a cryptocurrency blockchain. If there are no miners committing hash power to a coin network, no new blocks can be added to the chain. Thus, no new transactions can be verified, and all coins remain in a state of stasis, effectively spelling the death (or hibernation) of a cryptocurrency. Cryptocurrency mining is an extremely lucrative business, with miners spending a combined billions of dollars a year on ASICs, graphics cards and other computer hardware that can be used in the process of nonce discovery. Back when bitcoin started in 2009, it was possible to mine bitcoins using one’s own computer (in a process known as solo mining), however this has not been the case for quite some time.
Genesis Block. A genesis block allows for the initial creation of coins in a cryptocurrency network without any blocks or transactions preceding it. It is usually known as “block #0” in a blockchain (sometimes “block #1”) and is not mined; rather it part of the instructions hardcoded into client software (such as a wallet) and sets a cryptocurrency network in motion by providing it with its first set of coins. Future blocks are subsequently tied to the genesis block by miners during the mining process. All coins generated afterward are the result of the mining process, which as we will explain later, can take place using a variety of methods.
Data Contained Inside a Block. Each block contains the following information, all of which is actively required for the continued functioning of a cryptocurrency network:
Timestamp: the exact time and date a block was added to the chain, according to the UTC time zone.
Height: the block number, assigned in sequential order.
Inputs: all sender addresses for transactions contained within the block.
Outputs: all recipient addresses for transactions contained within the block.
Transaction Amounts: the amount of cryptocurrency sent in each transaction, as well as the total transaction output.
Transaction Fee Amounts: the total amount of fees assigned to each transaction in the block, collected by the miner as part of the miner reward.
Nonce: a number discovered by the miner during the mining process which allows a new block to be tied to the last block of a blockchain.
Metadata: other information required for the addition of a new block, as well as optional, user-defined data attached by the sender of a transaction (such as the messaged added by Satoshi Nakamoto in the genesis block of bitcoin).
Hash: a number used to identify a block, which also acts as a signature.
Previous Block Hash: the hash number of the preceding block in a blockchain.
Can A Blockchain Be Hacked?
In short, the answer is “yes,” although it remained “no” up until very recently. The bitcoin blockchain – along with the vast majority of all popular altcoins – remains unhacked after over 9 years of being in operation. The chances of a hack taking place on the bitcoin blockchain remain incredibly slim and highly theoretical, but we will review the two most cited ways in which a hack may be possible:
51% Attack. Since the correct version of a blockchain is always the one used by more than 50% of all hash power which allow a cryptocurrency network to operate, this would mean that a hacker would need at least 51% of control over a coin’s network in order to perform the attack. For the longest time, this type of attack only existed in theory, but in June 2018 a few less popular coins (including a fork of bitcoin) suffered this type of attack.
Nakamoto theorized this type of attack would be highly unlikely on the network of a successful coin because the amount of resources expended to carry out such an attack would outweigh the financial benefits of such an attack. In a 51% Attack, the attacker gains control of the majority of a coin’s network, replacing the correct version of a blockchain with one that favors them financially. By doing so, the attackers would have access to massive amounts of coins which they may then sell on an exchange. However, the attack would soon be noticed, and in combination with a hacker dumping copious amounts of coins on an exchange, the price of the coin would be driven down very rapidly, rendering the rest of coins held by a hacker near worthless.
Quantum Computing Attack. Short of tampering with the contents of a blockchain itself, the only other way theorized to “hack” the security of a robust blockchain (such as bitcoin) would be to brute force guess the private key of a wallet which contained coins. As mentioned previously, there are more possible private keys for bitcoin than grains of sand in the world, so simply guessing a private key for a bitcoin wallet is an impossible task using even the fastest of currently-available supercomputers.
A quantum computer, however, could theoretically perform enough computations per second to successfully guess a private key in a matter of weeks, days or even hours, though computers of such power remain well out of the grasp of human technology. In response to this theoretical threat, a number of new coins being released to the public advertise themselves as “quantum resistant,” meaning their private keys are generated in such a manner that they cannot be cracked even by using a fully-functional quantum computer. For now, there is no need to worry as such computers do not even exist as of 2018.
What Are the Different Types of Blockchains?
Throughout this guide, we have discussed extensively only one method used to mine cryptocurrencies; that being Proof of Work (PoW). Other major coins that employ PoW systems include Litecoin (LTC), Ethereum (ETH) and Bitcoin Cash (BCH). PoW coins rely on “work” in the form of computer power and electricity being used to correctly find the nonce of an upcoming block. However, since the inception of bitcoin, this idea has been expanded upon to encourage a reduction in electricity usage, as the bitcoin network now consumes more electricity than many small- to mid-sized countries. This makes its continued growth unsustainable due to the increasing difficulty in finding the nonce to a block and has encouraged the formation of other methods of mining. Some of these include:
Proof of Stake (PoS) (NXT, BLK, PPC). Mining rewards are issued to open wallets acting as nodes in a process known as “staking.” The reward is proportional to the amount of coins being held in each wallet. Thus, the more coins that are “staked” by a wallet, the higher chance they have of finding the next block, or the more coins they will receive as a staking reward.
Proof of Burn (PoB) (XCP). Pre-existing coins (usually bitcoin) are deposited to an address for which there is no private key and coins in the form of a new cryptocurrency are issued to depositors proportional to the amount sent to the “burn” address. Usually, no new coins are created for the new cryptocurrency after the specified “burn period” has closed, and in the case of Counterparty (XCP), the coin operates on the back of the network of another cryptocurrency (BTC).
Proof of Importance (PoI) (XEM). A combination of number of coins staked by a node and the amount of activity incurred by the node (number of transactions within a given period) determines the likelihood of a node finding the next block and receiving the miner reward.
“Blockless” Blockchains (MIOTA, GBYTE). These third-generation cryptocurrencies use alternative record-keeping systems that are similar to a blockchain but do not require that a network participant maintain the entire history of network transactions to operate. Usually they can achieve a rivaling amount of network security by using cryptographic information obtained from immediately-previous transactions and a few other nodes in order to maintain a correct, verifiable account balance.
What Are Some Other Uses of a Blockchain?
The benefits of blockchain technology are now starting to appeal to businesses, corporations, governments, and other entities looking for a more efficient and secure way to perform transactions and maintain records or databases. In short, Satoshi Nakamoto managed to create not just the first viable digital currency, but a radical new approach to solving problems inherent in conventional methods of recordkeeping. The blockchain is now being applied to finding a solution to other problems besides those of keeping track of a digital currency in a wide variety of industries. Some of these include making improvements upon:
- Government services: such as the
- protection of systems and infrastructure from cyber attacks
- reduction of operational costs, beauracratic red tape
- improvement in record keeping for social service benefits and eligibility
- improvement in traceability of budget expenditures, and
- reduction of tax fraud
- Health Records: use by health and life insurers to provide a tamper-resistant, private way to store sensitive customer data and medical information
- Land Ownership / Real Estate: use by governments and realtors to maintain an accurate record of property rights, titles, deeds, issuers, and bearers
- Logistics: keeping accurate tabs on the origin, transfer, quality and quantity of foods, medicines, shipped goods and other consumer products.
In summary, the blockchain has served as a very reliable method for keeping a record of digital transactions within a network. By storing it across multiple servers, it is decentralized, hard to falsify, and immune from unwarranted intervention. Through use of cryptographic hash functions, it is very secure and nearly unhackable. Satoshi Nakamoto’s invention has proven to be very reliable for bitcoin and hundreds of other coins to follow suit. Bitcoin’s success has subsequently prompted thousands of people around the globe to explore the blockchain’s potential as a solution to other problems faced by society, in countless areas. Indeed, the blockchain is currently having a transformative effect on the face world as we know it, revolutionizing age-old processes and disrupting business models in several different industries.