Blockchain

What Is Bitcoin Mining? What Is a Bitcoin Mining Pool?

What is Bitcoin Mining?
In a sense, Bitcoin mining (more commonly known as proof-of-work mining) is the process of "guessing" what the next block in the Bitcoin blockchain might be. 

By combining random numbers with all the other contents of a (potential) bitcoin block, it is possible to arrive at a valid "block hash", but this is a matter of iterative experimentation. Specialized mining hardware is designed to make a large number of guesses per second, but for each individual guess, the result is unlikely to be verified.



Why mine bitcoins in a mining pool?
The random nature of mining allows for a great deal of variation or "luck" for individual miners. Even if a very large miner can control (say) 1% of all the hashing power on the Bitcoin network, there is no guarantee that they will consistently find one out of every 100 blocks. Instead, they may be lucky enough to find three blocks one day, but unlucky enough to find zero blocks in the next three days (or more).

Aggregate mining is a way for individual miners to combine their hashing power so that they can mine like the big miners. Individual miners (also known as "hashers" in the case of joint mining) share the reward for any blocks found by the aggregated pool, adjusted for their share of contributed hashing power. This ensures that they will find blocks more regularly, thus smoothing out the payout of mining rewards.
By centralizing mining, miners can earn a relatively steady income rather than sporadic huge paydays.

How do Bitcoin mining pools work?
There are different variants of mining pools, and new methods are proposed and introduced from time to time.
However, the most typical is that the mining pool operator sets up the service to which the hashers are to connect. Through this connection, the pool operator sends "block templates" to the hash. As the name implies, these block templates are what the next bitcoin block looks like, but without the proof of work required to execute it ("guessing").
Using this block template, the hashers start guessing what the next block will be: they perform a proof of work on it. If they guess correctly, they return the valid bitcoin block to the mining pool, which broadcasts the block to the bitcoin network and thus receives a block reward. The block reward is then divided into smaller chunks based on the ratio of the contributed hash power to pay for all the hashes in the pool.

The pool operator can estimate how much hashing power each hasher contributes, as not only do hashers submit valid blocks, but they may also cause the hashers to generate more hashes. They also submit "almost valid" blocks: guesses that are incorrect but close. Since even "almost valid" blocks require hashing power to be generated, the number of "almost valid" blocks submitted by each hasher is an indication of the work done by that hasher.
Some alternative designs for mining pools do not rely on the pool operator (instead, pools use a "mini-blockchain") or allow hashers to create their own block templates (which still require pool approval)).


Is bitcoin mining in a mining pool more profitable?
On average, no, bitcoin mining in a mining pool is not more profitable than bitcoin mining alone. Over a long enough time, horizon, the differences in solo mining should be resolved and solo miners should earn at least as much as they would in a mining pool. Indeed, since mining pool operators typically charge a fee for their services, single mining may be more profitable. However, "over a long enough time horizon" may mean that it takes a long time to resolve the discrepancy. Many miners prefer a steady form of income, even if it means they have to spend very little money.

Are Bitcoin mining pools a problem for the Bitcoin network?
As mentioned above, in the most common Bitcoin mining pool setup, the mining pool operator creates block templates for the hashers to perform proof-of-work. This means that the mining pool operator can decide which transactions are being mined in the blocks being processed by the entire pool. This is a form of centralization of mining. All other things being equal, an ecosystem where all Bitcoin miners mine individually would be more decentralized than one where they mine in a pool.

This centralization provides some incentive for mining pool operators. For example, they could decide not to include certain transactions on behalf of the mining pool ("censorship"), or even try to execute a 51% attack (although this would be more difficult).

Whether this is a real problem, and how big this problem is, depends on many factors. For example, it depends on the size of the mining pool and depends on how easy it is for the hashers to switch to other pools, or on how easy it is to start a new mining pool. So far, co-mining has not yet caused serious problems for Bitcoin.

On the other hand, the existence of mining pools may have involved more people in bitcoin mining in the first place, which has led to a decentralization of the system. (Again, whether this type of decentralization is truly useful depends on many other factors.)
Some alternative Bitcoin mining pool designs (as described above) attempt to limit some of the risks of mining in the pool, but often there are trade-offs to be made and have not really been a big success (so far).

Is federated mining part of the Bitcoin protocol?
No, federated mining is not part of the Bitcoin protocol itself, and there is no reason to believe that Satoshi Nakamoto intends to mine via federated mining. 


Instead, federated mining was invented in 2011 by Marek "Slush" Palatines, who also created Bitcoin's first mining pool: the Slush Pool. mining pools use their own protocols, although some of them have now become so standardized that they may also be considered part of the Bitcoin protocol.
Of course, although it wasn't designed for it, the Bitcoin protocol does allow Bitcoin mining. (That's why it can exist.)

How do I mine in a bitcoin mining pool?
If you want to mine in a bitcoin mining pool, you simply connect your mining hardware to the pool of your choice. (Nowadays, mining without dedicated hardware is no longer an option.) The mining pool's website should have more specific instructions on how to perform this operation.

X