Blockchains and mining

From here, we will explain the blockchain which is indispensable technology for cryptocurrency.



Transaction storage location

On the previous page I explained the information to fill in the transaction and the signature using the secret key to prove himself, but who is making this transaction?
It is the sender of the currency. The currency receiving side only needs to tell the other party the address, so you can make the transaction data if you have a sending computer that operates signing.
However, it is meaningless to put transaction information in your computer only.
You must expose the data to the world so that everyone can see who paid for who.
Therefore, the data of the transaction created will be sent on the network saving the transaction.


The problem is who is going to save that data.
For example, in order to send SNS postings all over the world, once saved on a server of a company that operates SNS, the user receives information from the server.
However, there are no institutions or companies with special authority in cryptocurrency, so we can not use that method. Instead, users collaboratively store transaction data.
The advantage of saving in this way is that you can divide the data into several pieces and store them on each computer, so you do not need to prepare large-scale facilities, Even if a part of the saved computer receives hacking etc. and the data is altered, there are many people who have the same data, so it is possible to correct the data immediately.
This characteristic becomes more conspicuous as the number of computers that store data is larger, and if data is managed on a scale of tens of thousands of people worldwide like a bitcoin, it is almost impossible to tamper the once recorded data It will be possible.




What is a blockchain?

In order to manage transaction data all over the world, it is a technology called blockchain.
Transactions in the cryptocurrency are massively carried out throughout the world, and nearly 250,000 dealings are done on a single day even with bitcoins.
Instead of recording these transactions one by one, we record several transactions while checking them together.
At this time, the one gathered together is called "block".
A block consists of a part that contains information about a block called a block header and two parts that store transactions.
In the case of bitcoins, there is data of transactions (about 2000) made in one block for about 10 minutes.
As this block is connected like a chain one by one, such a preservation method is called a blockchain.




Proof of work

By the way, who verifies that the transaction is correct?
As with transaction records, certain people and groups do not have the right to approve transactions.
Therefore, users are guaranteeing the correctness of the transaction.
Since the confirmation of the legitimacy of the transaction itself can be easily done by comparing it with the past data, anyone can easily confirm that the transaction is correct without setting special restrictions.
But here is one problem.
If anyone can approve the transaction as legitimate, illegal transactions will be recorded by the person trying to authorize illegal transactions.
For that reason, we must create a mechanism that makes it impossible for anyone with malicious intent to approve transactions conveniently, while creating situations where anyone can approve transactions.
A way to realize this mechanism is to "draw people to people who are trying to approve transactions."

Even if it says a lottery, it is not something that someone draws hits at the same time by all means.
I draw many low-probability lottery strikes each time, and compete for who will first hit one.
Because it is the computer that draws the lottery, the time to hit it depends on the computation speed of the computer.
Since users of cryptocurrencies around the world are running computers and participating in this competition, in order to record illegal transaction data, "Calculate faster than computers of cryptocurrency users all over the world" is needed.
Because it is virtually impossible to calculate faster than users with hundreds of thousands of virtual malicious users in the world (including supercomputers) with a few malicious users, record incorrect data It is a mechanism that things can not be done.
In this way, the way to prevent fraud by using "the number of good users is overwhelmingly larger than the number of unauthorized users" is called "Proof of work".
For detailed explanation of Proof of work and verification of safety, please refer to "Experiment" page.

Issuing and Mining

Proof of work maintains safety by using a large number of users, but this assumes that the user is calculating for securing safety.
However, in order to let the computer do the calculations, of course, we consume electricity. If you have to consume electricity without paying anything in order to maintain the cryptocurrency, nobody would think to do such a thing.
For that reason, compensation is paid to those who connect the blockchain.
One of the rewards is an authorization fee.
The sum of the fee that the user pays a little when paying the cryptocurrency is paid to the person who made the approval.
And another of the rewards is the reward paid from the system of the cryptocurrency itself.
In other words, the cryptocurrency is automatically issued when the block is connected due to approval of the transaction, and it is given as reward to the miner.
The cryptocurrency currently being distributed is issued when all the blocks are connected if they follow the original.

In this way, connecting the blocks will pay the reward, so people will participate in the cryptocurrency approval work aiming to acquire it.
Also, as it continues to calculate until it pulls "hit" and aims to earn rewards resembles a state of trying to dig in gold at the mine, this approval work is called "mining" You may.