Blockchain and Cryptocurrency for absolute beginners

Aman Kuvera
6 min readMar 11, 2022

What is a Blockchain?

👉 Blockchain is a series of immutable (unchangeable/ uneditable) blocks placed in chronological order of their mining.

👉 Blocks are packages of data whose value after mining cannot be changed.

Some common terms used further

What is Bitcoin?

👉 Bitcoin was the first-ever cryptocurrency whose whitepaper was published by Satoshi Nakamoto in the year 2008.

👉 The core underlying tech under Bitcoin was blockchain technology which added Decentralization and distributed public ledger to the bitcoin chain.

👉 The main purpose of Bitcoin as per the whitepaper was to enable Peer to Peer transactions without relying on any centralized entities like banks.

👉 The transaction would happen on a decentralized distributed network with network nodes (computers) all over the world who mine blocks and carry out transactions.

How are the blocks added to the Bitcoin chain?

👉 When people say mining a block, in laymen’s terms it means to solve a puzzle using computational power to arrive at a solution that is acceptable by the chain as a valid one.

👉 Nodes compete with each other to solve these complex puzzles and the first node to successfully do so, gets a chance to mint the block. The node that mints a block is then rewarded by the network for its WORK.

👉 Hence this kind of consensus mechanism where all nodes agree to work for the network in return for rewards is called PROOF OF WORK.

Who decides what these complex problems are?

👉 The puzzles solved by the nodes are based on the solution proposed in the whitepaper and the set of rules which determine whether the acquired solution is acceptable or not.

👉 If it is acceptable then the particular node gets to mine the block.

Let me explain this with a small scenario for better understanding!

Let’s look at what’s happening above

How is one block connected with another?

Every new block that is mined consists of the hash value of the previous block as one of the fields, Hence, every new block added is connected (holds the address) to the previously mined block.

Whereas, the first block in the chain doesn’t have any previous block, therefore its previous hash field is populated with 0’s by default. This block is called the Genesis block.

Now let’s say someone tries to change a block’s data

Let’s assume that a node with the public ledger tries to change the data of Block 4, in this case, the hash value of Block 4 changes (any change in data changes the hash). Hence this change requires us to re-mine the block and find a suitable nonce. As mentioned previously, Block 5 will consist of Block 4’s hash value when it was mined to update the new hash of Block 4 therefore, that also has to be re-mined. This shows that a change in one block breaks the chain completely. However, this was for example purposes only, no one can actually change the block data and re-mine it, its impossible!

Why do I say that it’s impossible to get away with a fraudulent activity like changing block data?

How Distributed Public Ledger works to identify the tampered transaction on the network?

  • In the above diagram, you can see that peer B has tried to change his/her copy of the public ledger and tries to inform the network that its copy is genuine with respect to the transactions on the chain. Now, whenever Peer B/Node B tries to validate its next transaction, first its copy of the public ledger will be cross verified for all the previous changed transactions. This verification includes a comparison of Peer B’s copy of the public ledger with other copies of the public ledger on the network. If there is a deviation then Node B is said to have tampered with the public ledger.
  • The distribution of a copy of the chain’s public ledger over the network is called a distributed public ledger.
  • From this, we understand that it is impossible to change the block’s data and get away with it.
  • Also, the above explanation for the possibility of change of the block’s data is completely for example purposes. In reality, the only way to change the block’s data is to go back in time and change it before minting because once a block is mined, its data cannot be changed.

(Skip this part if you are not a developer)

Easier visualization of the blockchain (for developers)

👉 Just for easier understanding, think of the blockchain as a singly linked list but with the following rules:

  • A new node can be added to the list only at the end and not at the beginning or in the middle.
  • Every new node points to the previous node.
  • No node can be deleted or edited.
  • Here adding a node to the list means minting.

(For non-developers)

Easier visualization of the blockchain (if you are not a developer)

👉 Just for an easier understanding, think of the blockchain as an exam:

  • All students submit (mine) their answer sheets (blocks) one after the other.
  • Once you submit your answer sheet you cannot change your answers.
  • The first person to complete the exam submits the answer sheet.
  • You cannot add an answer sheet submission in the middle or at the beginning. The order should be maintained.

( This is just a simplified correlated example of remembering how blockchain would work in laymen’s terms )

Voila! Now you know how exactly a blockchain works at a fundamental level!

Here are some assumptions that I made to explain the blockchain in a simpler way and these may vary from chain to chain. There are some basic varying factors as well which make all chains different, Read the below to learn more:

👉 The rule “A hash should start with 000 to be considered the block as mined” was a simple example and blockchains may have their own criteria to accept a block as mined.

👉 The data section inside a block can be broken down into furthermore fields to label various kinds of data and this is defined by the developers in the whitepaper when a chain is created.

👉 There are many hashing functions available to hash the data of the block, I’ve used SHA256 here to calculate the hash. Blockchains use more complex hashing functions to make it difficult for people to easily determine the data and hence make the block more secure.

👉 All the real-world relations above were established only for a better and more relatable understanding of how a blockchain actually works and in no way portrays that blockchain is actually used in those scenarios.

👉 Each blockchain like Bitcoin, Ethereum, Polkadot, Cardano, Terra, etc., have their own set of rules and whitepaper on what problem they solve and how they solve it.

👉 Every blockchain has its own way of incentivizing the people who run nodes to help transactions on the network. I will be explaining the commonly used consensus mechanisms used in blockchain and how the nodes are rewarded based on these mechanisms.

This was all about the logical working of a blockchain. However, from a developer’s point of view, we have just scratched the surface.

Do leave feedback, like, and share if you found this helpful!

P.S: It motivates me to create more content.

Connect with me

Twitter | Website | LinkedIn | Github | Instagram

.

Up next: Consensus, Tokens, and Rewards.

--

--

Aman Kuvera

A MERN Stack Web developer and software engineer. I write about Web development, Web3, Crypto Currencies, and Basic concepts of Blockchain for beginners