Understanding NBIT values in Ethereum: Step by step explanation
The Ethereum consensus algorithm (POW) is largely based on the abbreviation function to protect and verify the transaction. One of the fundamental concepts, which may seem complex at the beginning, is the value represented by “NBits” in Ethereum. In this article, we will break down what it means so that the miner can create a shortcut lower than the “nbits” value and understanding what is associated with it.
What is mixing?
Hashing is the process of taking input data (in this case blocks) and manufacturing a constant output output (digital fingerprint or “shortcut”), which represents the input data. Think about how to generate a unique element identifier in the database. The abbreviation function takes a string as an input and produces the shortcut as an exit.
Sha256 abbreviation function
As you mentioned, we use SHA256 (Secure handh algorithm 256) as our sample mixing algorithm. Here’s how it works:
- Take the block headline as an input.
- Use the SHA256 algorithm to generate an input data shortcut.
- The resulting shortcut value is a way out.
NBITS value
In Ethereum, the value of “NBits” represents the number of bytes in short, which must be judged before it can be considered important. This value is usually 256 (or 32 bytes) for SHA256 shortcuts.
When Górnik tries to solve the POW, producing an abbreviation, which is lower than the “NBITS” value, they basically try to find a collision – an input that does not produce an exit when he is convicted of a specific algorithm or number of iterations.
What does this mean?
To illustrate this concept, consider the examples of the hash of the block header. Suppose we have a shortcut Sha256 Block header with 10 bytes (1000 bits). If Górnik is trying to solve the POW, producing a shortcut that is lower than “nbits` = 32 (or 2^5), he would try to find a collision.
To achieve this, Górnik would have to have at least 20 iterations of SHA256 (or 80 bytes) to “guess” the correct entrance. However, because no single iteration is possible to create a output that differ from the actual shortcut value, in this case there are no collisions.
Why does miners care?
Miners care about the production of shortcuts lower than “NBits” for several reasons:
- It shows that they solved the mystery of the block header and their solution is safe.
- Difficulty curve: As miners progress through the difficulty curve, their chances of making shortcuts lower than “NBits” are growing. This means that the reward for solving will increase with the increase in difficulties.
- Safety: Górnik’s ability to produce shortcuts lower than “NBITS” makes them difficult to solve them for other miners.
To sum up, the value of “NBITS” represents the number of bytes required by the SHA256 abbreviation functions before the collision is created. When Górnik tries to solve the POW, producing a shortcut, which is lower than “NBits”, they basically try to find an insolent input (or “collision”), which can only happen if there is no way out of the algorithm, which makes it impossible to make any Single iteration create a different performance.
Thanks to this explanation, you should better understand what represents the value of “NBITS” in the Power Ethereum consensus algorithm.