Crypto

# Bitcoin Mining: Understanding the Basics of SHA-256 (2/2)

In the previous article, we discussed the concept of hash. In this new section, find out the place of hash in Bitcoin mining. In other words, what is the link between the hash and the mining process in general?Source: Adobe / mehaniq41

## The SHA-256 algorithm and mining

At this stage, you have understood the interest of the mathematical hash function. But what does the hash calculation do on the entire Bitcoin mining sequence?

### The notion of block

Mining consists of validating a block of several transactions to integrate it into the blockchain. The size of a block is fixed. In Bitcoin, the block size varies roughly between 0.8 and 1.4 MB. Specifically, a block contains the following information:

Related Articles
• Part 1: The hash of the previous block;
• Part 2: Information related to transactions;
• Part 3: The signature;
• Part 4: The “proof of work” or Nonce (see below);
• Part 5: The hash of the block once validated.

### Hash a block

As mentioned above, mining creates a block on the blockchain. For obvious security reasons, any block created must meet certain conditions. In Bitcoin and currently, the condition is that the hash of the new block (part 5) must start with 19 zeros.

To confirm this, let’s take the example of a recently mined block on the Bitcoin network. Block 711244 was mined on November 25 at 9.45am (GMT + 1). As you can see, your hash starts with 19 zeros:

00000000000000000006d6cc3d53cd64c1684bd6780f97cf75670813ebb76e54

In other words, the first miner to find a hash that starts with 19 zeros validates the block. However, as explained in the previous article, the mathematical hash function is so complex that it is impossible to predict the result. This allows you to understand the notion of “difficulty” in mining and therefore competition between groups of miners.

To get the correct hash, the miner can only vary the “proof of work” or the proof of work (POW). In fact, this is a unique 32-bit number commonly referred to as a “Nonce”. Basically the miner tries different numbers and iterates a lot until it finds the one that returns a successful hash.

## The hashrate, an important indicator to know

It is common to talk about hashrate in crypto literature. Find out what it is about below.

### What is the hashrate?

Once the concept of hash is understood, it is easy to understand the hashrate. The hashrate is an indicator that allows you to understand the activity on the Bitcoin network.

In fact, to be precise, the hashrate is a unit of speed like km / h for example. The hashrate is expressed in “H / s”, that is, a number of hashes per second. Therefore, the hashrate characterizes the ability of a network to calculate a certain number of hashes per second.

The computing resources involved in Bitcoin make it possible to calculate a large number of hashes per second. Also, it is more convenient to express multiples of hashrate as:

• Kilo (1000): KH / s;
• Mega (one million): MH / s;
• Giga (billion): GH / s;
• Tera (billions): TH / s;
• Peta (one billion): PH / s;
• Exa (trillion): EH / s;
• Zeta (sextillions): ZH / s.

The hashrate is an important piece of information when buying mining equipment. In fact, as explained in the previous article, minors compete to find the right “proof of work”. In other words, to have his chances, a miner must have a computer capable of calculating a large number of hashes. That way, you can test a lot of proofs of work.

In fact, in Bitcoin, most miners are grouped into a “pool”. This allows them to pool their computing power and thus increase their… hashrate!

### Bitcoin hahsrate today

The total hash rate of Bitcoin (H) is calculated using the following mathematical formula:

H = 2 ^ 32 * (D / T)

In this formula, T expresses the average extraction time of a block and D the difficulty. In fact, to maintain a reasonable resolution time (around 10 minutes), the network regularly adjusts the level of “difficulty” of mining.

The hashrate of the Bitcoin network has increased dramatically over the years. This reflects an increase in mining activities (and therefore the use of Bitcoin) but also an inflation in the capacity of the implemented media.

So in January 2016, the BTC hashrate was less than 1,000,000 TH / s. Currently, the Bitcoin hashrate is higher than 150,000,000 TH / s, that is … 150 times more!

For comparison, the hashrate of Dogecoin (another POW crypto that is part of the world’s top 10) is currently “only” 277 TH / s. Another example, the Litecoin (LTC) hashrate, resulting from the Bitcoin protocol and the fifteenth largest crypto in the world, currently hovers around 300 TH / s.

_______________________

To buy cryptocurrencies in the SEPA Zone, European and French citizens, visit Coinhouse

To generate interest with your bitcoins, go to the BlockFi site

To protect or store your cryptocurrencies, get Ledger or Trezor wallets

To transact your crypto anonymously, install the NordVPN app

To invest in mining or masternodes:

To accumulate crypto while playing:

• In poker on the CoinPoker gaming platform
• To world fantasy football on the Sorare platform

________________

Here are the sources of information we offer: