Blockchain Part I: What Is Blockchain?

May 22, 2020

Blockchain has come into the public eye through Bitcoin – a peer-to-peer transaction of electronic money that allows online payments to be sent between parties without the middleman of a financial institution. But monetary transaction is just one potential use of blockchain. The technology works as a public and secure electronic ledger that has implications in industries such as shipping, healthcare, energy and real estate.

Parts of a Blockchain

A blockchain is built up of three parts: blocks, hashes and nodes. A block in the blockchain stores information about a group of transactions, including dates, time and participating parties. A transaction could be a variety of things, including a monetary exchange, a signature or a delivery. Each block is assigned a unique identification code called a hash. The hash contains a portion of code from the block that came before it – linking those blocks in a chronological chain. Though all transactions in a blockchain are public, only the hash code is visible, ensuring privacy.

Hash codes use a mathematical algorithm to convert transactional data into a string of letters and numbers. And because these hashes contain code from the block that came before, if someone attempted to falsify a transaction, they would have to alter every single block in the chain that appeared after. Though not 100% hackproof, this makes such tampering extremely difficult.

Nodes are computers that are connected to the blockchain network. Every time the blockchain is updated, the nodes store the data. This is another measure that secures the blockchain. The only way to change block data is if a majority consensus of the blockchain network approves the change. If a hacker wanted to change the blockchain, they would have to control 51% of the nodes in the network. The larger the network, the more daunting and nearly impossible task this becomes.

Blockchain Mining & Proof of Work

Before a block can be added to the blockchain, it must first be verified. Certain nodes in the blockchain perform this verification through a proof-of-work process. In this process, nodes must find a nounce – or a number that can only be used once. This number cannot be found through solving a logical puzzle, only through random number generation. Thus, discovering the correct or “golden” nounce is called mining and the nodes that mine blockchain are called miners.

Mining the blockchain involves computing billions of possible combinations, with the difficulty increasing with the size of the network and blockchain and other factors. Solving the equation costs immense power, but the node that does so receives a reward (depending on the nature of the blockchain network). Once the nounce is found, other mining nodes test the nounce to verify it is correct. Through the 51% consensus, the nodes approve the block, at which point the block and hash is added to the blockchain. 

Though this process is tedious, the difficultly in mining makes it a deterrent to potential hackers looking for an easy reward. Proof-of-work also makes it  nearly impossible to create a false nounce as other nodes in the network would know it isn’t verifiable. 

The 51% Attack

The most convenient way for a hacker to falsify the blockchain is not to personally control 51% of the network, but to fool it. Since changing the existing blockchain is so difficult, it makes more sense for a hacker to create their own version of it. Within the blockchain, a malicious miner could create their own false block. They could hide this block from the network and continue adding blocks to it. This essentially splits the blockchain into two versions – the real chain and the hidden falsified version.

If a split blockchain is discovered on the network, the shorter branch of blocks is generally assumed to be the falsified version of a hacker trying to keep up with the computing power of the network. Thus, to convince the network their version of the chain is genuine, the hacker must generate enough power to out-compute the network. Once done, the hacker can reveal the split chain to the network, which should agree to approve the longer falsified chain.

Though out-computing the network should be incredibly difficult and costly, 51% attacks have occurred on cryptocurrency blockchains. Mining marketplaces have sprung up, allowing mining hardware to be rented rather than purchased outright, decreasing costs. There are bugs hackers can use to slow the creation of the valid blockchain. And smaller networks with fewer miners and less required computing power are more vulnerable. 

Preventing Blockchain Attacks

There are ways of strengthening blockchain security. One possibility is adding a time delay on alternative blocks created from the blockchain so it’s harder for hackers to grow their chain above the network. Another is considering alternative consensus mechanisms, such as proof-of-stake where nodes are authorized to mine the network based on their personal stake within the network (such as number of coins in cryptocurrency).   

Despite vulnerabilities, blockchain has exciting applications in a number of industries. The market for blockchain is expected to grow 67.3% from 2020 to 2025, from $3 billion to $39.7 billion.

SHARE
TwitterFacebookLinkedIn