cover-img

What is Blockchain?

7 December, 2022

13

13

2

Hello, creative people,
As we know, this year is dedicated to web 3.0 and crypto, a lot of new things and technology are introduced this year like NFT, Smart Contracts, Crypto Games, Decentralized Applications, etc. These all techniques are based on Blockchain. in this article, I will share basic knowledge about blockchain.

Why we should learn blockchain?

Before start learning a new thing, it's should be clear why we should learn it and how it's helpful for us. If it's clear, then learning can more exciting and interesting. Let's see about blockchain.
These days, blockchain is a disruptive technology that will replace old traditional technology. For example – The early days of the internet, was a disruptive technology because it changed traditional communications, people could send their information anywhere using email and then communicate using social media.
The Internet made communication easy but could not gain the trust of the people. People need to trust that anyone won't cheat on them. Blockchain was invented to solve trust. To create a system that is completely neutral and resistant to any censorship or bribe.
img

What is blockchain?

The idea of blockchain came from the 1991 research paper "How to Timestamp a Digital Document" by Stuart Haber and W. Scott Stornetta. Now you must be wondering who was Satoshi Nakamoto then Satoshi Nakamoto invented the first cryptocurrency bitcoin using blockchain technology. Don't get confused between blockchain and bitcoin. They are not the same, bitcoin is a digital currency and blockchain is a technology.
A good definition of blockchain – Blockchain is a distributed immutable ledger that is completely transparent. I know, you're wondering what that means. Don't worry, I'll explain.
Distributed:– When someone does a transaction on the blockchain, that transaction creates a block and is stored in the blockchain and after some time this transaction is stored on all the systems. Which are connected to the network, which means it is distributed with all networked systems.
Immutable: – Once the details are stored on the network, no one can change them. That is, it is immutable.
Transparent:- As you read above, it stores transaction details on all the network's systems. So can anyone check our details? No, because all transactions are decrypted in all systems. Hence, only the owner can view their own transaction details.

Concept of Blockchain

Hashing Algorithms

img
In the blockchain, each block is linked to the other with the help of a hash. Actually, this hash works like a human's fingerprint, every block has a unique hash and there is also a hash of the previous block. Its hashing algorithm is SHA256 (it has 64 hexadecimal characters and each character is 4 bits). This generates an encrypted code for the block. As we know, every block has its own hash and also the previous block's hash but the first block has only one hash (its own hash). That block is known as the Genesis block.

Five requirements of hashing algorithm:

One-way:- It is a one-way algorithm which means it can only generate encrypted data from your input data but cannot transform the encrypted data back to its original state.
Deterministic:- It is deterministic which means when you encrypt the input data, no matter how many times you repeat or use that data, that encrypted data is always the same.
Faster Computation:- It is very fast, it generates and encrypts data quickly.
Withstand Collision:- It can't be hacked, no one can hack it quickly or guess.
Avalanche Effect:- When you change your input data, the encrypted data completely changes. You can try it using this website - passwordsgenerator.net (using SHA256).

Peer-to-Peer Network

img
Before the P2P network, we should understand this centralized network.

Centralized Network

A centralized network is a network in which all the data is stored in a single server and is controlled by a central authority or organization such as a bank, social media, or private server. It is all a centralized organization. For example - Bank, when a user requests a transaction or an entry, the server returns the response to the client. If there is any problem in the server, then the client or user has to face the server being down, slow, and many other problems.

P2P Network

A P2P network is a network where all the clients or users connect to each other instead of a central server and when a peer needs some data, they communicate with each other and node these systems or users. It is called And one type of data can be with multiple peers so it is impossible for a hacker to hack all the systems at once.

How does distributed P2P Network work in blockchain?

img
Suppose A is a miner and he mines a block and inserts it into his blockchain and a request is sent about this block to all the miners in his network. At that time, a verification process works and then verifies whether this block is valid or not, and then other miners also add that block to their blockchain. After that, these miners send this request to other miners in their network who join them and then they create this block in their blockchain. This is how this transaction is stored across the network.
When a hacker attacks a block, the hash is completely changed due to the avalanche effect, and all blocks after the block are hacked are also changed because the block contains the hash of the previous block. So this blockchain got corrupted.
How to get our data back after the blockchain is corrupted? Good Question.
With the help of a P2P network, we can get our data back, as we know, systems are connected to each other in the same network so if a hacker hacks a block or blockchain of a peer or a node, the network's Other nodes send signals to it. Your blockchain is not matching ours, and as the rest of the nodes are in majority, this node will have to obey them and then the blockchain will revert to its previous state. We get our data back safely.
As I have used the word miner and mining a lot, let us know about blockchain mining.

Blockchain Minning

img
When a user does a transaction (let's say he sends some crypto to his friend), this transaction is stored in an area called Mempool and then miners take this transaction from Mempool and then try to add it to their block. There can be many transactions in a block. In order to add this transaction to their block, miners must solve a mathematical problem known as proof of work. A block is created when a miner solves that math problem (the block is created for the miner who solves the problem first) then the miner sends a request to the network to verify the block created Is. After verification, all miners add this block to their blockchain and the miner gets the reward.

Conclusion

The main reason for the popularity of blockchain technology is its security and giving the user ownership of their own data. In this article, I have shared with you a basic understanding of blockchain. If you like it and want to know then do comment.

THANK YOU ❤🎉

13

13

2

Shyanukant
#self-taught #programmer #python #machinelearning #web3.0

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2024. Showcase Creators Inc. All rights reserved.