Cryptocurrency Blog
Back Back

How does the Blockchain Work?

Author Author Maria Kozlovskaia
For reading
5 minutes
Views
500
Updated
28.10.2020

How does the Blockchain Work? Photo 1

What is it ?

Blockchain is a data storing technology, which was used for the first time in October 2008, along with the appearance of the first cryptocurrency – bitcoin. Today the main direction of its application remains cryptocurrency, but gradually it's also spreading to other industries, such as financial transactions, customer identification or cybersecurity, as the technology provides maximum data protection.

In fact, the blockchain is a database that stores basic fields with information. For example, in the case of cryptocurrency, it stores data about transactions: who, to whom, when and how many assets were transferred.

This kind of description is rather conditional and serves only as the most familiar and understandable example. In fact, the structure and operation of the blockchain differs from maintaining a standard database. In addition, data protection is starting to play a special role. These are the most interesting moments in blockchain technology.

How does the blockchain work?

There are 2 key features that the technology is based on:

  1. Existing records in the chain cannot be changed. In a normal database, almost any field is changeable if necessary, such as changing the name of the property owner in the registry.
  2. Data is stored and processed in a decentralized manner. If a Bank has a conditional server with a database where a group of employees enters information about customers, the blockchain not only does not have a Central server, but also a single "Manager" – a person or company that would make changes.

The actual operation of the blockchain is organized as follows:

  • The user creates a transaction. For example, he pays with cryptocurrency from his wallet in an online store. The transaction clearly indicates the old owner of the asset, its volume, and the new owner.
  • The details of the transactions are in the block.
  • The information in the block is checked. For example, you need to check whether the amount of funds stored in the user's account is sufficient at the time of making a purchase.
  • After passing verification, the block with transactions is attached to the end of the chain – the same blockchain and the transaction is considered completed.

The data in the block can no longer be changed. The chain stores the entire sequence of transactions that can be used to track that a particular asset first belonged to one user, then was transferred to the second, then to the third and is now owned by the fourth. By the way, the inability to change the blocks attached to the chain does not allow deleting data. Accordingly, the transaction cannot be canceled after completion.

How is data protected?

Data security is ensured by storing additional data in each block, in particular, its own hash, and the hash of the entire previous block. A hash is a kind of code that is formed algorithmically based on the data stored in the block. It is used to check data integrity. Simply put, if a mismatch is found when comparing the hash of one block with its hash specified in the next, the data will be considered corrupted.

Security is based not only on the use of hashes, but also on encryption, which does not allow you to find out exactly what data is stored in each block. For this purpose, 2 encryption keys are used – public, corresponding to assets and stored in the blockchain in open access and private, used for signing transactions. We will tell you more about keys in future materials.

Already on this simplified example of blockchain technology, it becomes clear that processing all data requires huge capacities. They are provided by a group of users called miners. Miners use their own computers connected to the Internet for mining. During mining, hundreds of thousands of individual PCs using a single program turn into a full-fledged supercomputer or rather, into a distributed computing network, on which the entire technology is built. Transaction verification, block creation and addition and other operations are performed using distributed computing.

Another important function of the distributed computing network is blockchain storage. It is necessary to prevent changes in the database and check hashes stored in blocks. As mentioned above, if the hashes do not match, the data will be considered invalid. In addition, creating and storing multiple copies of the block chain is useful in other situations.

Let's have a look at a couple of examples:

  • In the house of one of the miners, the Internet is turned off, respectively, a copy of the blockchain on his computer instantly loses relevance, since during the period of his absence from the network, thousands of new transactions and hundreds of blocks may appear in the chain. At the same time, when returning online, the system will automatically compare the relevance of the copy stored on this computer and copy the current version of the database so that it can continue to participate in mining. Due to the fact that the network includes thousands of individual computers, disabling a single machine and even a dozen or hundreds of miners will not have any consequences for the entire system. Actually, thanks to this approach, the blockchain used for bitcoin has not stopped functioning since its launch.
  • A hacker hacks a copy of the blockchain on his PC and changes the amount that goes to his wallet, increasing it several times. When you connect to the network, this data will be checked and compared with several other copies. For them to be considered correct, a similar amount must be indicated in most of all copies of the blockchain stored on the network. Accordingly, changes in just one of them will be considered as a copy corruption, error and will be automatically eliminated; the amount will not be transferred to the attacker's account.

And the last interesting point or rather, the question related to the work of the blockchain: why do miners constantly keep their computers turned on, if this leads to higher energy bills and wear of the equipment itself? Why do they continue to participate in the system? For providing computing power and processing information, they receive a reward – a cryptocurrency that uses the blockchain they support. Actually, because of this, the word mining usually means getting cryptocurrency using a computer.

It is generated by the system itself, but in order to earn in this way, you need extremely powerful equipment, in particular, a video card of one of the latest models. That is why mining on a regular office PC or laptop is almost meaningless – the cost of electricity will be more than the final reward generated by the system. In most cases, if you want to get a cryptocurrency, it is much easier, faster and more profitable to just buy it, without spending time, resources and funds on building a suitable computer and mining.


Leave feedback for the article

Your comment has been sent. It will appear on the site after moderation.
An error occurred while adding the comment.
Send
Read also