Bitcoin over the past few years has become a truly popular thing, but the principle of its work for many remained unclear. Especially it concerns such a component as a blockchain. In this article, we will try to tell you what is blockchain technology, and, with the help of simple examples.
Blockchain is the safest ledger
Blockchain can be described as a kind of system where operations are fixed, while records in the system can not be falsified. How can this be done? The most primitive way is to make it so that each line with a record using a specialized program is converted into a 32-digit hash-abracadabra. Moreover, if at least one letter changes, then its hash also changes, and in the most radical way. However, this is not all – the hash of each previous line also affects the hash of the next, which complicates the forging process. To protect the system even more reliably, the following layer is added: to each record in the blockchain, at the end a certain number is added (nonce), and it is selected so that each hash ends in two zeros.
In other words, in order to transfer of cryptocurrency, the data is securely encrypted. In the process of mathematical calculations, unique notes are created in the blockchain system. Once created, you can not change them.
The only way to forge a record in the system is to trivially dig through the numbers until the desired hash appears. However, the process of maintaining a blockchain ledger does not stop there: imagine that two people are leading the ledger and they simultaneously pick up a nonso – the one who picked the right one, makes an entry creating a new block. Since the two together are selected much faster, the task was decided to complicate – now the hash must end in three, not two zeros. This is a blockchain system where, as two people, we have a bunch of connected computers, and computing these hashes is so complicated that even computers have a hard time.
With the help of such a ledger, you can create very entertaining pieces like bitcoin, where each entry appears as “sending such and such a sum from such and such to such a purse.” Since this ledger does not lend itself to falsification and it contains information about all transactions, then, accordingly, at any time you can find out how much money on this or that wallet. And in order that any money circulates in bitcoin, bitcoin is arranged in such a way that each of the records ends with the phrase “create this much coins and transfer them to me”, and by “me” is meant the user who first selects the nonce providing a hash with the required number of zeros at the end. Thus, you can build various interesting systems, making notes like “who will be the first to solve the equation, he will get X coins.” This is called mining.
Blockchain is a chain of blocks created during the computation process. Where each block is a note in the form of a cipher, which is understandable only to the blocking system. It contains information – “from wallet A to wallet B transfer X amount of cryptocurrency, accrue Z amount to the owner of the computer who created this unique note in the blockchain”.