# Proof-of-Work (POW)

Mining is a term referring to the generation of new blocks for FIREAL. It's required to provide confirmations for transactions and to protect the history of operations.

A proof-of-work is a solution for difficult(costly) mathematical tasks. This solution must be trivial to check whether data satisfies claimed requirements.

FIREAL uses the hashcash[1] method to provide proofs of the work. The difficulty of this work is adjusted so as to limit the rate at which new blocks can be generated by the network to required target spacing rate (from 10 to 30 minutes). Due to the very low probability of successful proof generation, this makes it unpredictable which worker computer in the network will be able to generate the next solution

- 1.
**Time to create Proof-of-Work**

There is an estimation of how long it might take

Imagine that you have hardware with 1 KH/s hashing speed. Let's estimate how much time the generation of proof-of-work will take from you on average, with a current FIREAL proof-of-work difficulty.

Difficulty 1.0 is represented by:

value of the target. So, to get a successful proof of work we need to perform 0xFFFFFFFFFFFFFFFF/ 0x00000000FFFFFFFF or ~ 4294967297 attempts.

At difficulty 360 we need ~ 360 * 4294967297 = 1546188226920 attempts. If you have 1 KH/s or 1000000 hashes per second then you will be able to scan such amount of hashes within 1546188226920 / 1000000 = 1546188 seconds or 1546188 / 86400 = 17,89 days.

Probability of successful block generation during one day could be calculated from available hash rate using formula:

**2. How does it work**

Each block header is represented by the structure of 6 fields, a some of these fields could be varied pretty freely.

The hashing result of a valid proof-of-work value must be lower than the current target. Miner tries to find this suitable solution by scanning all possible nNonce values (from 0 to UINT_MAX). In case of overflow, the new coinbase transaction will be created. This allows miners to replace a value of a new merkle tree hash with a new one and start nNonce scanning from zero again. Adjustment of timestamps is also possible.

**3. Reward**

Block reward can be calculated using this formula:

This means, that reward starts from 100 coins and is cut in a half every 64x multiplied by difficulty.

****

***Note: About setup Minning***

- Proof of ownership: The system will only allow miners to join the pool by the devices provided by Fichain and verified IMEI (Miners are not allowed to connect directly to the chain, but must go through the pool).
- Hashrate control: ARM architecture can go up to 1 million Hashrate/s. In order not to waste energy, To save energy, can Hashrate up to 100k/s with each IMEI.

Last modified 2mo ago