You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When mining, shouldn't the solutionHash be compared to a targetHash and the block only be added if solutionHash <= targetHash?
Otherwise, what stops a miner from having a list of predefined hashes that meet the criteria of having 4 leading zeros and just submitting them.
On that note, it would also make more sense to have a variable number of leading zeros in the mining process' expected solution hash for each block that needs to be added to the chain.
I am currently working on a project similar to this to get a better understanding in the cryptocurrency space.
Feel free to have a look and let me know if the above is indeed correct and I will make a PR
Otherwise, what stops a miner from having a list of predefined hashes that meet the criteria of having 4 leading zeros and just submitting them.
Other miners will need to confirm that the submitted hash is actually the correct hash.
That is how the Blocks are confirmed in a decentral manner.
If the hash cannot be confirmed with the submitted solution then it wont get integrated into the Blockchain.
Activity
NYC00kie commentedon Jun 19, 2021
Other miners will need to confirm that the submitted hash is actually the correct hash.
That is how the Blocks are confirmed in a decentral manner.
If the hash cannot be confirmed with the submitted solution then it wont get integrated into the Blockchain.