As each miner works out which nonces it has tried, does it notify the network so that energy isn't wasted on re-processing the same thing by each node? Or is it totally competitive with everyone for themselves?
4 Answers
Miners that aren't cooperating will never replicate work because they each want to get a different block as the next official block. If nothing else, the account the mining fee is paid to will be different. (And this ripples up to the header.)
For miners that are cooperating, work units are assigned by the mining pool. The pool will typically embed a different coinbase in the work units it assigns to each miner. When a miner finishes processing a work unit, it requests a new work unit (with a new coinbase) from the mining pool.
So there should never be any replicated work.
-
This is misleading. While there is no exact replicated work, the effort of every miner doing his block is wasted work when they could cooperate instead.– o0'.Commented Sep 26, 2011 at 7:19
-
1@Lohoris: They are fully cooperating. They're all trying different ways to solve the same problem, and as soon as one person solves it, they all move on to something else. How could they cooperate more than that? Commented Sep 26, 2011 at 16:01
-
David, could you elaborate a little on what a "coinbase" is? Thanks Commented Oct 3, 2011 at 2:24
-
The term "coinbase" is used to mean two different things. The "coinbase transaction" is the transaction in the block that pays the miner his (currently) 50 bitcoins for mining the block. It also specifies where the transaction fees go. Inside the "coinbase transaction" there's an 'in' part that normally specifies where the coins come from. It has a field called the "coinbase field" that can contain any value at all. So miners can use it as an extra nonce (and it sometimes called 'extra nonce'). Commented Oct 3, 2011 at 2:29
Every miner is working on a slightly different block because each block pays out the block reward to a different address. There's almost no chance of the network hashing the same thing twice.
-
1When you say "slightly different block", it's still trying to fit the next block in the chain, correct? I forgot that the address is hashed in there too, and probably contains different groups of transactions? So everybody would be hashing something different anyway and there's no way to cooperate: do I understand that correctly? Commented Sep 25, 2011 at 6:11
-
Yeah, everyone's trying to make their version of the next block the "official version". Blocks may differ in a variety of ways, though most of the entropy comes from the separate payout addresses. Obviously pools are able to create cooperation, though pools do need to prevent their miners from hashing the same data.– theymosCommented Sep 25, 2011 at 9:13
Solo miners and mining pools as a whole compete against one another to find the correct hash to solve the block first. As they each want a different address to be a part of the solution (so they can earn coins with their Bitcoin address), there is no overlapping per se. It's just a race to find a solution to your problem under common rules.
Pooled miners, that is the miners that mine together in a pool on the other hand work together to solve the same problem, each being assigned a range of possible solutions to check. Since the pools want to maximize their profits, they shouldn't assign the same work to more than one miner, unless they want to double check that it was solved correctly (and the miner wasn't cheating).
But if miners are competing each other, actually a frauder doesn't need to have more computational power than all the integrate nodes, he only needs to have more computational power than the best of the integrate ones. And more, the system can not be used for large amount of transactions, if one transaction involves billions of usd, I may prepare a huge farm of computer pool, to revise the blockchain.
-
I've downvoted this, because it is partially wrong and partially too vague to be useful. – "he only needs to have more computational power than the best of the integrate ones" → That's false: Why doesn't the same miner always win?. –– "to revise the blockchain" → Please read: What can an attacker with 51% of hash power do?.– Murch ♦Commented May 10, 2016 at 12:09