Urgent.News

What's breaking now, across thousands of outlets.

Finance & Markets

Inside the Bitcoin Mining Bug That Traps Slow Machines

Why mining pool vardiff can strand slow Bitcoin miners at a difficulty they can’t meet, how the bug works, and what pools can do to fix it.

Inside the Bitcoin Mining Bug That Traps Slow Machines

Bitcoin operates as a decentralized ledger, devoid of a central authority. Instead, a network of computers, known as nodes, each maintain an identical copy of the entire record, akin to a town's notebook where everyone holds a copy. When a transaction occurs, it is announced to the network, which then verifies if the funds involved are valid and have not been spent elsewhere. If the transaction adheres to the rules, it is passed along to other nodes for verification.

However, this decentralization presents a challenge when two parties attempt to spend the same bitcoin simultaneously. Some nodes may receive the first transaction before the second, while others receive them in the reverse order. Consequently, each node can accept only one of the conflicting transactions. The network must eventually agree on which transaction is valid without a central authority to resolve the dispute. This is where the concept of proof of work comes into play.

To maintain the integrity of the record, the network requires participants, or miners, to demonstrate that they have expended considerable computational effort. Transactions are grouped into batches called blocks, with miners proposing the next block roughly every ten minutes. Each block not only references the preceding one but also forms an immutable chain of blocks. Should two conflicting transactions arise, the network will ultimately include the one incorporated into the accepted chain, rejecting the alternative.

However, initiating a new block is not without cost. Miners must prove that they have expended genuine computing effort before their block proposal is accepted. This proof of work involves repeatedly altering a number, referred to as a nonce, and hashing the block's contents along with the nonce. The resulting hash, a fixed-length string, must fall below a predetermined target set by the protocol.

The miner continues adjusting the nonce until a suitable hash is found, a process requiring an immense number of attempts and considerable luck, measured by the miner's hash rate.

Once a miner successfully discovers a valid block, other nodes can independently verify its authenticity. The successful miner receives newly minted bitcoins, along with transaction fees included in the block. At the time of writing, the reward for finding a block stands at 3.125 bitcoins. This computational effort also renders rewriting the ledger extremely challenging.

Should an attacker attempt to alter an old block, they would need to redo the work for that block and all subsequent blocks, all while outpacing the rest of the network in adding new blocks.

To optimize their chances of finding a block, miners typically join forces and collaborate within mining pools. Each member of the pool contributes to the creation of a single candidate block, and if any member happens to find a valid block, the reward is distributed among the pool participants based on their individual contributions.

Mining pools operate under various reward schemes, such as Pay Per Share (PPS) or Proportional (PPLNS), with the latter paying only upon block discovery, with rewards proportionally allocated based on recent work. In both cases, accurate tracking of each miner's computational effort is crucial for a fair distribution of rewards.

Written by urgent.news from HackerNoon's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at hackernoon.com →

More in Finance & Markets

More from Thursday 19 November →