What is the problem that mining solves? - Bitcoin Stack Exchange most recent 30 from bitcoin.stackexchange.com 2022-01-23T00:25:29Z https://bitcoin.stackexchange.com/feeds/question/14461 https://creativecommons.org/licenses/by-sa/4.0/rdf https://bitcoin.stackexchange.com/q/14461 6 What is the problem that mining solves? Maestro https://bitcoin.stackexchange.com/users/1577 2013-11-08T13:57:17Z 2021-04-16T16:43:28Z <p>Of course, the function of mining is to secure the blockchain, but I'm looking for a more abstract summary of what the exact problem is that mining tries to solve? I believe its called the <a href="http://pages.cs.wisc.edu/~sschang/OS-Qual/reliability/byzantine.htm" rel="nofollow">Byzantine Generals problem</a>, but can it be described in a couple of sentences?</p> <p>The network needs to select one random stranger out of a large group at a fixed schedule, and uses a 'hashing-lottery' as a reasonably fair method to do so. Is that a good definition of the reason why POW is needed?</p> <p>In other words: Suppose I developed an alternative method to select a random p2p node every few minutes, who gets to publish the next block, could that replace cpu-based proof of work?</p> https://bitcoin.stackexchange.com/questions/14461/-/14463#14463 8 Answer by Steven Roose for What is the problem that mining solves? Steven Roose https://bitcoin.stackexchange.com/users/1307 2013-11-08T14:44:04Z 2013-11-08T14:44:04Z <p>In my opinion, it is one of the greatest misconceptions about Bitcoin that miners solve a "hard problem". Many news sources explain it like that, but in fact it's not true.</p> <p>All a miner does is guessing until he got something right. A miners takes his block of transactions (including the coinbase transaction that sends the fees and block reward to himself) and calculates the hash of it. Hash calculation is a very common procedure and is not at all "hard". The hash he gets needs to match a certain condition. This condition gets harder as more miners try it (see <a href="https://en.bitcoin.it/wiki/Difficulty">Difficulty</a>). When the miner got a hash that fits the condition, he can publish it to all other Bitcoin clients and the block is added to the block chain.</p> <p>The reason that miners with more computer power have a larger chance of winning the block is because they can simply guess faster. They can calculate more hashes per second to test against the condition, (Mining power is expressed in Hashes/second.)</p> <p>The need for proof-of-work is there because the Bitcoin protocol wants that a block is found only once every 10 minutes approximately. So, as more miners enter the game, it has to become harder to do. The POW makes sure that finding a block is not easy and takes the some time. That's also the reason that the difficulty raises as more people mine. Every 2 weeks, the algorithms adjusts the difficulty so that again one block is found every 10 minutes at the average hashpower of the previous two weeks.</p> <p>So, to answer your second question: If you could find an alternative method for achieving exactly the same thing as currently is done in Bitcoin mining, it could replace it. But Bitcoin is programmed as it is and won't probably ever change this method. But there are alt-coins that use different methods for distributing the coins and securing the block chain.</p> https://bitcoin.stackexchange.com/questions/14461/-/16498#16498 2 Answer by user7636 for What is the problem that mining solves? user7636 https://bitcoin.stackexchange.com/users/7636 2013-11-09T19:23:47Z 2013-11-09T19:23:47Z <p>I think the concern was that a p2p node is easier to falsify than a solution that requires great effort. </p> https://bitcoin.stackexchange.com/questions/14461/-/16508#16508 2 Answer by jeorgen for What is the problem that mining solves? jeorgen https://bitcoin.stackexchange.com/users/8644 2013-11-10T01:45:58Z 2013-11-10T01:45:58Z <p>With mining that takes time, synchronization gets easier. Forks happen in the blockchain and these forks need to be resolved, where the nodes select the chain that is longest. </p> <p>It is very hard for distributed nodes to resolve and come to an agreement if new blocks are added to forked blockchains simultaneously at high speed in different parts of the network.</p> <p>Another reason is if several miners work on similar blocks, it is unlikely that they will finish at the same time, since the random number that generates a small enough hash could come at any time, which most likely means very different times for different miners, so one wins clearly.</p> <p>That is how I understand the need for mining.</p> https://bitcoin.stackexchange.com/questions/14461/-/105463#105463 3 Answer by RedGrittyBrick for What is the problem that mining solves? RedGrittyBrick https://bitcoin.stackexchange.com/users/13866 2021-04-16T16:37:09Z 2021-04-16T16:43:28Z <p>In a nutshell, mining solves the problem of achieving a globally agreed ordering of transactions and selection of one of several incompatible transactions.</p> <hr /> <p>Here's the problem that needs a solution:</p> <p>If I have 10 Bitcoin and I simultaneously introduce to two distant parts of the network a transaction that gives 10 Bitcoin to Alice and a transaction that gives 10 Bitcoin to Bob.</p> <p>Different nodes (wallets etc) will receive the two transactions in a different order, some get the Alice transaction first and reject the Bob transaction as a doublespend attempt. Others vice versa.</p> <p>How does the whole world eventually agree which of Bob and Alice have the 10 Bitcoin?</p> <hr /> <p>Mining provides a mechanism for periodically selecting a node that specifies an ordering (and hence chooses which transaction gets rejected). It also provides the basis for resolving conflicting views of transaction-order between parts of the network.</p> <p>Mining provides an immutable and verifiable continuous record of this ordering.</p>