Mathematics Behind Ethereum’s Target Hash

. However, it may seem counteruitive that a hexadecimal value is used to represent this calculation. Hexadecimal values ​​are needed.

Bases

Generates and Transaction Block on the Ethereum Network. The purpose of this process is to find a hash that has not been seen by the network exploitation algorithms.

To calculate the target hash, we must break it into smaller components:

1.

  • The transaction list

    : a list of transactions in the block.

  • Hash of Block’s Hash Anterior: Hash Value of the Previous Minied Block.

Calculation of the Target hash

Hash Target is calculated by combining these components in a specific way:

  • First, we generate a random number (known as
    Seeds ).

2.

* Each transaction is hashed using sha-256.

* The result is multiplied by the current value of the seed.

3.

How to calculate the hash

Now Let’s Sink In The Hexadecimal Calculation Step By Step:

  • This is necessary because the hash function uses the modular arithmetic with the base 2.

  • Hexadecimal Conversion : Each Component of the Target hash is converted from Hexadecimal to Binary:

* Block Header and Transaction List are simply concatenated as binary strings.

* The hash hash of the anterior block is calculated directly from its hexadecimal representation.

Example

Suppose we have a mined block with the following Components:

Block Header: 0x1234567890abcdef

Transaction List: 0x1e5d6a7b8c9d0e0f

Hash of Block’s Previous hash: 0xfedcba9876543210

When we calculate the target hash, we get:

`

+-------------+

| Seeds |

+-------------+

|

|

V

+-------------+

| (Block Header)

| (Transaction List)

+-------------+

|

|

V

+-------------+

| (Hash of Block's Previous Hash)

+-------------+

`

The resulting target is a hexadecimal value that represents the cumulative effect of all these components. Has a unique and provocative target hash to solve.

Conclusion

Involves the combination of random numbers with modular arithmetic, hexadecimal conversions and hashing sha-256 to produce a unique digital fingerprint. 2^256, while the hexadecimal conversion helps to represent each component in a compact binary format. This complex process