Blockchain technology basics

Cryptoblok
7 min readAug 21, 2021

--

what you need to know

Blue chains linked together, to represent the structure of a blockchain .The word blockchain technology in the on the right hand bottom corner.
A chain of blocks linked together chronologically

Why blockchain ?

For over a decade, blockchain technology has made headlines, especially in conversation belonging to the lane of crypto currency, investment, technology, finance or banking .

The first time i heard the word Blockchain , it sounded like a weapon from some Dwayne Johnson movie. When I found out that it is the revolutionary technology on which digital currencies such as Bitcoin are conceived, I was blown away by the its immense potential.

Most, if not all popular crypto currencies such as Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), Basic Attention Token (BAT) and Ripple operate on block chain technology.

Block chain technology spans across several applications including supply chain, voting, healthcare, video gaming, smart contracts and anti-counterfeiting, but here we shall only discuss it in the context of the most popular one, which is crypto currency.

You can call this section block chain “unchained”, because we are just about to dive deep into what this special technology is really about.

Who invented blockchain ?

Blockchain was conceptualized by Satoshi Nakamoto the pseudonymous inventor of Bitcoin, a digital currency that runs on a block chain database.

Although, it is important to note that the work was originally started by Stuart Harber and W.Scott Stornetta, who had attempted to create a cryptographically secured chain of blocks without much success.

That left Nakamoto’s invention in 2008 as the first true conceptualization of blockchain. Subsequently, developers realized that block chain had a lot more to offer than being the “cryptocurrency technology” and started to explore its potential outside that.

What is a blockchain ?

Blockchain is a decentralized, publicly available database that cryptocurrencies rely on to store records of transactions.

It stores data in batches or rather chunks called blocks, these blocks are linked together in a chronological order, hence forming the “chain”, and they are secured using cryptography.

The peculiar attribute of a block chain database is decentralization, that nobody owns it; the data base is updated by members of a peer to peer network.

Whenever a transaction is made, the members of the network called miners work to validate transactions and once that happens, a new block is added onto the database.

What is inside a block ?

A block primarily contains details of transaction data (senders address, amount etc), but for its functionality and structure, it consists of more than transaction data.

Since we mentioned earlier that the blocks are linked and secured using cryptography, the constituents of a block ensure that all blocks are secured and linked starting from the initial block, known as the genesis block . These components include the hash of the previous block, a timestamp, the nonce and the hash of the block .

An image representing a components of a block. The block is represented as a blue cube. Its components are named as being the data, the hash and hash of the previous block.
A block mainly consists of the data, the hash of the block and hash of the previous block

The hash value is created in a process known as hashing. Hashing is the process by which a hashing algorithm such as SHA256 converts input data into fixed size bit string values which cannot be decrypted into the original data.

For instance if the word “I want to understand this blockchain ” is input in the SHA256 hashing function, the resultant output will be a 266 bit value consisting of 64 character.

Below is an example of the hash value (SHA256 checksum) generated from an online SHA256 hashing function from the input of “I want to understand block chain”.

The picture represents a hash value generated by an online SHA256 hashing function. The input “ i want to understand blockchain” yields a 256 bit value consisting of 64 characters which is a66184c19f88118a3dbb67a102d07f7e15ae26b37b9f9fcbc415f1508405e79c
Online SHA256 hashing algorithm generated hash value

One important thing to note is that the same data input, will always result into the exact same hash value. Any slight change in the data generates a completely different hash value.

For instance if we only removed the quotation marks from “I want to understand bock chain”, the resultant hash value will be completely different as seen below.

The picture represents a hash value generated by an online SHA256 hashing function. When the input “ i want to understand blockchain” is changed by only removing the quotation marks it yields a completely different 256 bit value consisting of 64 characters which is a229de7d8960a68abb4f071eda0f0a21eef3baf99f411b06858aa16e4f222cd6
A completely different hash value ( SHA256 checksum) is generated

So, every block has the hash value of the precious block, and its own hash value. The hash value feature ensures that data in a block chain cannot be altered.

In case data is altered, it triggers series of events that causes alarm. If someone altered data in one block, its hash value would change.

Subsequently, the hash value of the block will not match the “previous block hash value” recorded in the next block which raises concern and the problem is automatically rectified.

The three blocks all have unique hash values and the hash value of the previous block. A block two is tampered with causing its hash value in record in block three to be different which raises a red flag.
The two hash values do not match hence causing alarm.

A nonce literally means a “number used only once”. But in the context of a block chain, it is a random number that can be input into the SHA-256 hushing function to create the hash value of the block.

We shall learn more about it when we get to the process of mining.

How is the block chain database maintained and updated?

A block chain database is maintained by members of the network. People from around the world known as miners get the job done.

The main job of miners is to verify and validate transactions thereby adding new blocks to the block chain, by solving complex mathematical problems through a process known as proof of work.

Proof of work is a process by which miners compete to add a block to the block chain. The first miner to solve the mathematical puzzle validates the transaction hence adding a block and is usually incentivized with rewards of certain units of cryptocurrency.

Features of a block chain database

Decentralization

A block chain database is often described as a public distributed database. The term public relates to the fact that the block chain database is accessible to anyone.

For instance, you can access all transaction data on the Bitcoin network from the first transaction ever made, if you intended to.

The term distributed relates to the fact that every member of the network has a copy of the database or rather every device connected the network has a copy of the database.

The feature implies that a block chain is a decentralized open record keeping system, which eliminates the need for a central authority.

It facilitates peer to peer transactions, without the need for a trusted third party such as a bank. Decentralization is block chain’s most precious feature.

Immutability

Data stored is a blockchain is permanently stored and cannot be altered.

For instance, in the case that a hacker broke into the database and altered data in one node, it would not go unnoticed because that particular copy of the data base will be different from all other copies of the database.

Technically speaking, the architectural design of a blockchains in which the additional blocks are linked to already existing blocks, makes it difficult to alter data and go unnoticed. For this reason, security is guaranteed.

Transparency and privacy

Thanks to cryptography, a blockchain can maintain at most levels of transparency and privacy concurrently. All transaction data may be publicly available, but the identities of the people that have made the transaction remain anonymous.

All users are allocated digital signatures which they use as some sort of identification. Every block chain user is provided with a private key and a public key.

A public key and private key are mainly used to ascertain whether the spent transaction was signed by the owner of the funds.

When data is put into a hashing algorithm along with the private key and passed into a signature algorithm, the output is a digital signature.

Blockchain technology drawbacks.

Immutability-there is no turning back

Immutability is quiet life changing feature of block chain technology, but sometimes it may hurt , to say the least.

Once data has been recorded in a blockchain it cannot be erased or altered. Say if you made a mistake and transferred 20 bitcoins instead of 5, bitcoins, you may have the chance to correct that at a bank but not if you used a digital platform that runs on a block chains.

If you happened to transact over a bitcoin network and one day you don’t want traces of your bitcoin transaction data on the network, the bad news is that you cannot remove them.

For wider applications of block chain technology such as smart contracts, mistakes can lead to catastrophic consequences.

Smart contracts are digital contracts designed to execute automatically after certain conditions have been satisfied. A smart contacts executes the terms of agreement in the wrong way, if they are wrongly input.

But this should not entirely demonize block chain technology in any way; any computerized system is subject to the “garbage in garbage out” principle.

Environmental unfriendliness

One of the biggest criticisms of block chain technology is the unacceptable amount of energy it uses to operate.

This is as a result of the proof of work consensus algorithm used to validate transactions.

In this process, miners compete to be the first to validate transactions by solving complex mathematical puzzles for incentive such as Bitcoin on the Bitcoin network and ether on the Ethereum network.

In this process, they consume large amount of energy that are considered to be wasteful and damaging to planet earth.

For instance back in 2017, Bitcoin alone consumed 6.6 tetra-watts of power in 2017and by October 2020, it had gone up to 67 terawatt hours.

And that was the Bitcoin platform lone, using power that Cambridge researchers found to be sufficient to run the university for close to 700 years (Ouch! that should really hurt the planet).

However not all block chains use this wasteful consensus algorithm, alternative consensus algorithms such as the proof of stake are not as wasteful and developments are being made to make block chain technology more environmentally friendly ( i will discuss consensus algorithms in my next article).

In summary , blockchain has wide applications that cannot be overlooked because of its drawbacks. This technology has immense potential to make the world a better place, all that is needed is innovations to improve functionality, efficiency and scalability.

--

--

Cryptoblok

Everything in the lane of crypto currency and blockchain technology is explained here.