The Internet surprised us again with blockchain. We often hear words about cryptocurrency, bitcoin and other crypto related topics. If you want to know, "What is blockchain?" or "How does blockchain work?" you have come to the right place. In this article, we will learn all about blockchain, including its working principle and how to use it in our daily life.
History of Blockchain
Blockchain was first introduced in 2008 as a public ledger for keeping Bitcoin transaction records. This method of recording transactions is transparent. Each record is time stamped, immutable (meaning that no one can change/delete records after adding records), and decentralized.
It may be invented by one person or a group of people, or even by an AI named Dorian Satoshi Nakamoto.
At that time, the term blockchain was not thrown away as often as it is now. This ledger technology created by Nakamoto has helped solve some major problems. First, it supports point-to-point transactions and does not require intermediary services to process transactions. In addition, it also solves the problem of double spending, which usually occurs in digital currency rather than physical cash.
Double flower means that the same digital currency can be consumed twice.
Around 2014, blockchain began to attract attention. People began to invest in it after seeing that it has more applications than just cryptocurrencies. It can be used in insurance and finance, health care, voting, transportation and other fields.
What is blockchain?
Blockchain is a distributed database or record keeping system, which is used to store digital records in a structure that is difficult to crack. Unlike traditional databases, blockchain does not store data in a centralized location. On the contrary, each node/computer on the network has a complete copy of the blockchain. When data is stored on the system, it is distributed to thousands of network nodes.
How does the blockchain work?
Blockchains store data sets in collections called blocks. Blocks are like containers. Each container has a limit or the maximum amount of content it can hold. In terms of blocks, the total amount of data it can contain is called block size limit.
The capacity of each block is called the block size, which varies according to the blockchain (from several thousand bytes to about 1 megabyte).
Bitcoin's block size is about 1MB, and Ethereum's block size is about 80KB..
Although the block size looks small, they can carry up to 2000 transactions. Each block is stored in linear and chronological order, and each new block is added to the end of the chain. When a block reaches its maximum block size, it is closed and connected to another block using a hash algorithm, which is a cryptographic verification. Therefore, a continuous blockchain has been formed, giving rise to the name blockchain. However, if a block exceeds the block size, the network will reject it and will not be added to the chain.
What makes blockchain secure and immutable?
The unchangeability of the blockchain is due to the hash value of the block. Hash values are similar to fingerprints. Human beings have different fingerprints. In the case of blocks, the hash value is used as the unique identifier/fingerprint. Each block is digitally signed by the unique hash value generated by the hash algorithm/hash function. The current block, the previous block and a timestamp are used to generate these hash values. Minor changes in the input will result in a new hash value.
The hash value is usually as follows: 3a42c503953909637f78dd8c99b3b85ddde362415585afc11901bdefe8349102
Think of the hash function as a grinder. The grinder works in one direction only. It starts with an original project and grinds it into small pieces. The hash function is similar in that it converts raw data into an encrypted format that cannot be reverse engineered. There is no way to restore the original hash value generated, just as the ground meat cannot be converted back to the original form after passing through the grinder.
Suppose a hacker wants to change a blockchain record. First, the hacker must run his node and find the block he wants to modify. If he successfully changes the block/makes the change, the newly generated hash value will not match the original hash value, making the block invalid on the chain.
Keep in mind that this modification is currently only available on his node. More importantly, before a record is added to the primary public chain, it must be verified by other nodes. If most nodes (at least 51%) confirm the validity of the new modification, it can be added to the chain; Otherwise, it is considered invalid and rejected. Therefore, to achieve this, hackers need to make this exact change on most nodes/computers, which requires a lot of resources, which is actually impossible.
Characteristics of blockchain
Decentralization. This is one of the key features of blockchain. Except for private blockchain, blockchain has no central organization to manage network activities; Instead, the node maintains the network and validates the transaction. You can store important digital assets on the chain and directly control these assets through your private key. The private key is like a password generated by encryption, which is used to sign transactions and prove the ownership of the blockchain address.
Transparent and open. Blockchain publicly stores all records and transactions, and anyone can access them at any time. Blockchain is designed so that no one can hide anything and use it for personal gain.
Enhanced security and immutability. Each piece of data on the blockchain is hashed. That is, you cannot specify the actual content of the data. In addition, since hashes cannot be reverse engineered, it adds an additional layer of security. And because of the advanced cryptography and uniqueness of block hash, tampering with any block requires changing all the hashes of other blocks on most nodes, which is a lot of work and resources.