Reputation: 9
Let us consider we have n miners in our mining pool. Now the manager of the pool verified the transactions and packed into a block to be mined. Then it passed the block to all n miners in the pool.
Lets assume that out block is as below:
to_mine_block = {
Block No: 1000
Prev Block:999
timestamp: "1000-01-01 00:00:00"
Data : "XYZ"
nonce : ?
}
Now,to_mine_block is sent to all n miners. Will n miners runs the following code to
String target = new String(new char[difficulty]).replace('\0', '0');
**while(!hash.substring( 0, difficulty).equals(target)) {
nonce ++;
hash = calculateHash();
}**
Will all n miners run this code individually in the pool ? If so, this race will always be wined by the miners with the highest mining power. Because the one with highest mining power will move ahead in the loop than the ones with low hash power.
Upvotes: -1
Views: 242
Reputation: 860
Its not ALWAYS since finding the winning nonce is based on luck. If you can hash faster then you have a higher chance to find the nonce faster. But there is still a chance that a slow miner can find the winning nonce instantly.
Edit:
If so, this race will always be wined by the miners with the highest mining power. Because the one with highest mining power will move ahead in the loop than the ones with low hash power.
Mining pools sends a different block template to each user. They are basically hashing different block headers.
Upvotes: -1