# Mining Pools

By [Jello](https://paragraph.com/@jello) · 2024-10-05

---

Miners combine their computing power in a mining pool to solve cryptographic puzzles more efficiently. The pool divides the task by assigning different ranges of nonces (numbers miners try) to each participant, reducing redundant work. When one miner finds the correct nonce, the entire pool earns the block reward and transaction fees. The reward is then distributed proportionally, based on how much hashing power each miner contributed.

### **Nonce Range**

The nonce is a 32-bit number, meaning it can range from zero to 4 billion. However, even this entire range is often not enough to solve the puzzle. This is because of the way cryptographic hash functions work: even after trying all possible nonces, there’s no guarantee that you’ll find the golden nonce.

**Randomness and Unpredictability of Hash Functions**

A hash function like SHA-256 produces unpredictable results for each input. Even if you change the input slightly—like incrementing the nonce by just 1—the resulting hash will look completely different. This is called the avalanche effect. For example:

*   Nonce = 1 might produce a hash like `000f...1abc`
    
*   Nonce = 2 might produce a hash like `9e8d...02d7`
    

There’s no pattern or way to predict how the hash will change with each nonce. Therefore, cycling through nonces doesn’t get you any "closer" to the solution. The golden nonce could be the first one you try or the billionth—it’s random.

**Huge Hash Output Space**

SHA-256 generates a 256-bit hash, creating an enormous number of possible outputs— 2 to the power of 256, which is incomprehensibly large. In comparison, the 32-bit nonce space (with 4 billion possible values) is tiny. Even if miners try every possible nonce, their chances of finding a valid hash—one that meets the difficulty target—are still extremely low because the number of valid hashes is a tiny fraction of the total hash space.

### How Does a Mining Pool Address This Limitation?

To overcome the limited nonce range, mining pools adjust other parameters in the block header to generate new sets of nonces. A common strategy is to modify variables like the extra nonce (an additional field in the block) or the coinbase transaction. This allows miners to produce entirely new sets of hash outputs.

By continually changing these variables, the pool extends the range of possible solutions far beyond the basic 32-bit nonce. This coordinated approach ensures that miners are working on different parts of the problem, reducing overlap and significantly improving the chances of finding the correct hash.

---

*Originally published on [Jello](https://paragraph.com/@jello/mining-pools)*
