STEEMIT PAKISTAN Schooling - What is blockchain? How does it work? Part-1. by mohsan0073steemCreated with Sketch.

Hi, I hope you are doing well, I am a geek and I always want to talk about technology and want to know how does it work. Especially the complicated things. Hence due to my professional background blockchain fascinate me a lot to learn about it enough that I can implement my own blockchain not for money but for something practical. So In this article I will tell you internals about the blockchain, I hope you will have a basic idea how does it work and what are the the components of a blockchain.

image.png

Source

First thing first, What is blockchain?

Bitcoin and Crypto are the words that are ubiquitous you find it everywhere even in the even in the villages of Pakistan, and it is even more eminent in the more developed communities. But most of them do not know what is the base of these great things. What makes them valuable? What makes them unique?. The answer is Blockchain. If I explain simply:

Blockchain is append-only chain of blocks containing transactions(data).

Let me explain to you what does it mean by *append-only*. By append-only I mean once you have posted something on it you can not delete it. Do not be confused or worried about *you cannot delete*. By this I mean If I do something on blockchain it must be recorded on the blockchain. Same to revert, it has to be recorded on the blockchain as it is for creation that it has been deleted. Lets say Ali posted a post on Steem blockchain and after few minutes he realized he want to delete it, he will delete it but that action will be posted on the blockchain and no one can change the state of the blockchain without recording it on the blockchain. For better understanding have a look on steemd.


Blocks are structed in a way that a block is having the pointer(hash) to its pervious block. As You can see in the diagram. First thing to notice that first block is not having any number, this is a special block, this is called genesis block.

Drawing1.jpg

What do I mean by Hash? You can say hash is mathematical sum of data. Hash is generated by a hash function. Which is deterministic, It means it should produce the same output for the same input. Lets say you have juicer machine, if you will add orange it will always produce the orange juice, same why is true for hash functions. Picture below demonstrate it.

hash.jpg

This is the why blockchain assures the integrity of the data. If at any point someone try to change the data with in the block the hash of that block will be changed, hence blockchain will not be in the valid state. So it will be become evident that something wrong has happened and system is not in the right condition.

Now the question raises that how does the blockchain assure that no one can change its content?

The answer to this is its decentralized structure. Blockchain operates in the form of a network, where every participant is responsible for the integrity of the system. Lets have a look at an example, You want to have make a deal with someone but you do not trust each other so you find a third party of mutual trust. So you make that deal with the surety of that third party. But this is not the case within the blockchain, here everything is managed by the whole network. For example I want to buy a coffee, when I will pay, the whole network will check whether I have the permission to spend the currency and the notes are real. But in the conventional case this is not possible, if I had stolen the money there is no way someone can know it that the 5000 note I am just spending is stolen.

The only way to add data to the the blockchain is via transaction, as I have described earlier that everything that happens on the blockchain is recorded and preserved by the blockchain network. To make any kind of change on the network all the network is responsible for ensuring the validity of the transaction. For example writing a post on the Steem is just possible via making a transaction to it otherwise it is not possible. Every transaction is validated by the network before it is published to the network.

That was pretty much it for this time, it is big topic to talk about. So the conclusion is every cryptocurrency out there works on these basic principles of blockchain. but what I explained is just the tip of the iceberg. A book can be written on this tip. But do not worry I will be writing more on this topic. So stay tuned. I will be going to more depth on this topic.


Part 2: What are the functionalities of the blockchain?
Part 3: Ethereum use case for better understanding of blockchain
Part 4: Varieties in blockchain.

And for sure there will be more. stay tuned.

Thanks,
Regards.

Coin Marketplace

STEEM 0.23
TRX 0.12
JST 0.029
BTC 66505.48
ETH 3595.60
USDT 1.00
SBD 2.90