9 ms·
Bitcoin Mining in Plain English
- deleted 14y ago[deleted]
- npguy 14y agoI lost the plot where you said if there are 12 confirmations, it means that the transaction is 12 blocks behind .. :-(
- saturn7 14y agoConfirmations = "Current Block Number" - "Block Number your transaction is in"
- npguy 14y agoThanks. Will read again.
- enmaku 14y agoEach block validates the block behind it, so if you've got 0 confirmations it means your transaction hasn't made it into a block yet. If you've got 1 confirmation it means your transaction is in the most recent block. If you've got 2 transactions it means that after your transaction made it into a block, another block was found that signed off on the block containing your transaction. At 3 transactions, the most recent block has signed off on the block before it, which in turn has signed off on the block before it, which contains your transaction and so on. This is important because once a newer block has signed off on the block before it, you can't change that old block without invalidating every block after it. If I want to rewrite the most recent block it's astronomically difficult, but still technically possible, to do so. The deeper each block is buried in the chain, the more blocks I would have to rewrite history on to undo transactions in that block. To my knowledge no one has ever successfully re-written history and the amount of processing power required to do so is beyond astronomical at this point. This is also why the standard client does not consider transactions to be "confirmed" until it's 6 blocks deep - that's the point at which the likelihood of rewriting history becomes so low that it's effectively zero.
- codesuela 14y agoSomething that I still don't quite get: Who adjusts the difficulty. As far as I understand there still is a central server somewhere who broadcasts the difficulty and awards Bitcoins which to me kind of clashes with the distributed nature of Bitcoins.
- doublec 14y agoThere is no such central server. The difficulty is adjusted using an algorithm that all the bitcoin clients implement. This looks at the generation times of the last 2,016 blocks and works out from that if difficulty needs to be higher or lower. Since all clients implement the same algorithm, they all get the same difficulty value.
- jerguismi 14y agoAnd if some clients decide to calculate difficulty differently, it results in a block chain fork.
- tocomment 14y agoCould someone program up a client that "cheats"? Or is there something preventing that.
- doublec 14y agoAny blocks that client produced would not match the expectations of the other clients. The difficulty being different would mean a successful hash that solves the block may not be seen as solving it by the other clients. They would reject it and your cheating client would be on its own fork. If you could convince others to run your client then your network would get bigger. If it got >50% of the entire network then your blockchain would effectively be the main chain.
- ksadeghi 14y agoIt would also have to maintain the >50% hashing power for more than 120 blocks. And even then it's not guaranteed as smaller pools could get lucky and solve more blocks than the larger rouge miner.
- pbhjpbhj 14y agoIn the article it sounds like the bitcoins are mined serially and that someone can pip you to the post. This contradicts my understanding of bitcoin. I dont think the simplification of the mathematical process makes it at all clear. Is it like a teacher telling a class 'what are the prime factors of 91' and awarding a sweet to the winner? Or are there many sums to calculate and anyone providing an answer gets a sweet? When the result comes out how is the source verified - in a classroom if I were sly I might be able to relay the answer to the teacher faster than the one who calculated it??
- grinnbearit 14y agoIt's more like, "What are the prime factors of the numeric representation of your name", and then the sweet is awarded to the store of the person with that name. It doesn't buy you anything if you relay someone else's answer.
- pbhjpbhj 14y agoThis conflicts with the sibling comment where the analogy is that the teacher is expecting a particular answer. Think I'll have to find a proper mathematical treatment of the process ... anyone recommend a link, wikipedia didn't do it for me.
- doublec 14y agoIt's like a teacher telling a class "Pick a number between 1 and 1000". If they pick the same number as the teacher, they win. If more than one picks the winning number, the first person to get it to the teacher wins. There's no "many sums to calculate" contributing towards a result. It's more a lottery - did my one calculation produce the right number.
- jere 14y ago>It's like a teacher telling a class "Pick a number between 1 and 1000". Great explanation. That's exactly it. Having more hardware lets you guess more numbers faster.
- 14y ago
- uptown 14y agoAny "currency" that requires this an explanation as complicated as Bitcoin will never achieve widespread adoption.
- MikeCapone 14y agoI don't know if you've ever heard about the way central banks work, but it's pretty complicated too. There's a difference between using the currency in transactions - which is potentially simple for both dollars and bitcoins - and managing the behind the scenes of the money supply and control mechanisms. Few people need to be central bankers, and few people need to be bitcoin miners, so I don't feel it's that big a deal.
- uptown 14y agoI'm well aware of the central banks and their complexities, but bitcoin just adds a layer on top of that - ultimately bitcoin needs to be converted back to traditional currency in order to be useful for the masses. You haven't really escaped the central bank ... you've just added your own layer of complexity on top of that pre-existing and never-going-anywhere system.
- enmaku 14y agoBitcoin replaces that layer. I've personally transacted business in Bitcoin without converting it back to traditional currencies and it works pretty damn well, actually. At the moment the primary reason Bitcoin "needs" to be converted back into traditional currency to be useful to the masses is that they haven't started using it yet. Think about it: if 1% of people are using Bitcoin then that means there's only a 1 in 100 chance that any given transaction you make can be made with Bitcoins. That's an admittedly low degree of usefulness. If you can get 2% of the people to start using Bitcoin it just became twice as useful and half as many transactions will now require you to convert funds back to traditional currencies. At some "critical mass" adoption level, Bitcoin becomes just as useful as any other currency without such a constant need to move in or out of traditional currencies. It's called the Network Effect and it's a hell of a market force. Also your argument is invalid because you could say the exact same thing about holding a bank balance in USD while living in Europe: "But I have to exchange these dollars for Euros in order to even use them at all, man this U.S. Dollar is just completely worthless and unnecessarily complex because no one around me will accept it."
- tocomment 14y agoReally basic question, what's the purpose of mining? Was it just set up as a fair way to distribute the initial coins, or is there a fundamental on-going function it serves?
- bencoder 14y agoThe blockchain concept is used kind of as a distributed timestamp system. Say you send out the same coins to two different people at once, in a centralised system, that would be detected at the centralised server and the second transaction would fail. With the distributed system that's not possible, so the block chain serves as a timestamp. Whichever transaction gets into the blockchain first is the successful transaction. However, generating the blockchain requires a lot of processing power, and therefore needs to be subsidized. Initially that is done by rewarding those who generate blocks with coins (i.e. mining). However, as the number of generated coins falls, transaction fees should make up the short-fall.
- andrewla 14y agoThe main purpose of mining is to secure the block chain. The reward is a the incentive for miners to exist. Each block that gets mined means that in order to undo a transaction that was previously in the block chain, an attacker would have to mine a block before the network produced another block on the main chain. So if your transaction was in block 33123, and the chain looks like block 41873 : [ parent : ... ] block 33123 : [ parent : block 41873 ] block 71282 : [ parent : block 33123 ] then in order to undo block 33123, an attacker would have to produce three blocks: block 41234 : [ parent : block 41873 ] block 39834 : [ parent : block 41234 ] block 58762 : [ parent : block 39834 ] before the network produced a new block on the main block chain. So the attacker would have to have 3x the computing power of the remainder of the network.
- ollybee 14y agoMining means no one can create a fake block chain (version of events). To create a fake chain accepted by the network someone would have to solve all the hashing problem linking their fake blocks faster than the bitcoin network. The proof of work linking the blocks means they cant be faked. The advantage nodes in the P2P network (people running the client software not necessarily mining) don't have to trust any other node or central serve, they just trust the longest block chain in he knowledge that's what everyone else will be doing. As transactions are only accepted if signed by a private key, so the block chain is just an agreement of the order and time that transactions happen. Also if someone tries to double spend the same money by signing two transactions the block chain is the decision on which one is accepted and which ignored. No one can fake that decision without providing the solution to the extremely hard problem.
- mfringel 14y agoSo, a block chain contains all transactions in the BitCoin network since the beginning of time? How does this not end up with having to eventually transmit multiple gigs of data every time you want to do a transaction?
- andrewla 14y agoGenerally, the gigs of data are transmitted just once, during application setup. After that, clients can pick up new blocks are they are generated by the network. There are numerous proposals for generating a "summary block" that would securely allow a snapshot to be generated to avoid the initial download. [1] There are light-weight clients out there that rely on a web service of some form for keeping track of the whole block chain[2]. In order to issue a new transaction, though, you only need to transmit the transaction itself: a list of signed transactions: "transfer x bitcoins from this address to this address", basically. [1] Some suggested implementations are listed here https://bitcointalk.org/index.php?topic=74559.0 https://bitcointalk.org/index.php?topic=74559.0 [2] https://en.bitcoin.it/wiki/Thin_Client_Security https://en.bitcoin.it/wiki/Thin_Client_Security (Edit: fixed formatting)
- enmaku 14y agoExactly. The integrity of the chain is kept not by including every transaction since the dawn of time in each block, but by simply including the hash of the previous block. This simultaneously shows where in the chain each block belongs and verifies that nothing about the previous block has changed.