# Blockchain technology

**Bitcoin** is based on **blockchain** technology. Let’s dig a little deeper into the understanding of blockchain.

**A block** is storage of transaction information in a blockchain. It cannot be split into pieces. And as an example of a transaction, here and below we will consider a standard transfer of money from one individual to another. Let’s see what information a single block in the **Bitcoin** blockchain can store. Block number, time of creation, information about transactions, senders and recipients. There are already more than 730,000 blocks in the **Bitcoin** blockchain, each of which stores a huge amount of information. It is reasonable to ask: How can such a large number of blocks of information be linked together seamlessly and unmistakably in one chain? The answer is a hash function and hashing.

**A hash** function is a math function that converts a line of unspecified length into a line of а strictly specified length. You can take any text of any length and use the hash function to get a line of the desired length. The resulting line is called a hash. The most important feature of the hash function is that each text has its unique hash. And even if you change one letter in the source text or the case of one of the letters, the hash will be different.

This means that we don’t care how much information is stored in the block. We pass this information through the hash function and get the block hash. The subsequent block filling starts with the hash of the previous block. This completely eliminates the possibility of making changes in earlier blocks, because the information simply does not match the previous block.

We can finally give a clear and understandable definition of the **Bitcoin** network — a decentralized electronic cash system that uses **blockchain** technology to record transaction history information. The first security layer is the connection of each block to the next. But one level of protection is too easy. That is why the **Bitcoin** blockchain has an additional protection mechanism: the block hash must necessarily start with at least **8** zeros. The following question is also logical: what if after hashing the information we get a hash that does not correspond to the conditions of the network? To solve this problem we add a Nonce to each block. A **Nonce** is a line of random digits inserted into a block so that its hash starts with at least **8** zeros. But who looks for and adds Nonce?

**Mining** is the process of repeatedly changing the Nonce and then hashing the block data to match the hash to the demand of the network. **Miner** — a computer that performs mining. Also, miners are people who are engaged in such activities.

**Miners** **(computers)** find a solution by constantly going through the Nonce options by trial and error. After the solution is found, it is checked by all other miners in the network. And if all the other participants agree with the solution, the block is included in the blockchain and the miner gets a reward for the correctly found block hash. And who pays this reward? The network itself! Amazing, isn’t it? That’s the reason why a new btc is being generated.

**Emission** is the issuance of money into circulation. For example, the Central Bank issues the ruble. The emission of this currency is limitless, the regulator can print as much paper as he wants, and no one can limit it. This causes inflation. You will not believe it, but the **Bitcoin** network solves this problem too! The maximum amount of the coin is limited to 21,000,000 units. But after all, miners can find a lot of new blocks and just mine every bitcoin possible. To avoid this, the «**Halving**» mechanism was invented. **Halving** is a decrease in the reward for miners by half, which occurs every 210,000 blocks. This event occurs approximately once every 4 years. Thanks to this feature, the **Bitcoin** network is still producing new coins and has not reached its maximum issue yet!
