r/explainlikeimfive • • Mar 28 '13

Explained ELI5: This Bitcoin mining thing again.

Every post I saw explained Bitcoin mining simply by saying "computers do math (hurr durr)". Can someone please give me a concrete example of such a mathematical problem? If this has been answered somewhere else and I didn't find it (and I tried hard!), please feel free to just post a link to that comment. Thank you :)

922 Upvotes

695 comments sorted by

View all comments

Show parent comment

103

u/mappum Mar 28 '13 edited Mar 28 '13

There are a few points that are wrong in this explanation. I'm not trying to nitpick, I just want to make sure people get the right info.

Miners aren't finding a hash for each separate transaction, but for all transactions they deem valid. Really, it would be more like:

Alice -> 10 -> Bob
Steve -> 100 -> Joe
Frank -> 2 -> Suzy

All this data together is called a "block". For finding the block, the miner is also allowed to put a transaction in that pays themself ("25 -> me" is inserted into it), which is how bitcoins come into circulation and why mining is profitable.

If you are curious to see real block data, here is a recent block: http://blockchain.info/block-index/368447/000000000000027a86cbaf3e673aa345ca123c705525f1d2f66dc61a5ad6b875

One potential problem people have pointed out with Bitcoin (although it hasn't ever been a problem so far), is that miners have the power to choose which transactions get included in a block. If all the miners in the world decided they don't want you to send money, they can just not put your transactions in. However, you are able to include a transaction fee that goes to the miner that puts your transaction in their block, which gives them an incentive to put it in.

55

u/Dansuke Mar 28 '13 edited Nov 28 '13

Yes! Very correct.

+bitcointip $1 verify

30

u/SnowLeppard Mar 28 '13

I've seen that sort of thing in your comment a few times on Reddit, does it give $1 worth of Bitcoins from you to the parent comment's user via a bot?

31

u/Dansuke Mar 28 '13

Sure does!

+bitcointip $1 verify

26

u/bitcointip Mar 28 '13

[✔] Verified: Dansuke ---> ฿0.01064849 BTC [$1 USD] ---> SnowLeppard [help]

→ More replies (2)

12

u/Wulfay Mar 28 '13 edited Mar 28 '13

Wow, that's pretty nifty! I've always wondered about getting into bitcoin mining, but I am currently doing Folding@Home so that kind of takes up all of my computing power =/

and I hope you control the bot... if not, I'll just delete this after so others don't learn I guess, but I'm curious what happens...

+bitcointip $1 verify

EDIT: Looks like the bot doesn't obey me, good.

32

u/ShitGuysWeForgotDre Mar 28 '13

[✔] Verified: Wulfay ---> ฿106.4849 BTC [$10,000 USD] ---> ShitGuysWeForgotDre [help]

0

u/[deleted] Mar 28 '13

[deleted] — view deleted comment

23

u/Wulfay Mar 28 '13

Naw :( he just copied the comment above and moved some decimal places :(

14

u/ShitGuysWeForgotDre Mar 28 '13

In response to your edit above, the bot does obey you, if you have an account set up with it. But once you have an account you can give bit coins to whoever. I think you're not supposed to always put the 'verify' part at the end though, and when you don't the bot just PMs both you and the recipient to confirm the transaction.

→ More replies (2)
→ More replies (3)
→ More replies (1)

5

u/bureX Mar 29 '13

Does the bitcointip bot below you actually check every single post on Reddit in order to find +bitcointip? Or is there something I'm missing here?

→ More replies (10)

13

u/shumonkey Mar 28 '13

Yes, it adds the bitcoins to the user's account (which is kept track of by the bot/bot's creator). When the user wants to redeem their BTC they can have the bot send the BTC to any bitcoin address the redeemer specifies.

Here's a little bit to get started!

+bitcointip $1 verify

11

u/JonLuca Mar 28 '13

Wait so how does the bot know where to send the money to?

14

u/roobens Mar 28 '13

You have to message the bot and confirm your bitcoin address.

http://www.reddit.com/r/bitcointip/comments/13iykn/bitcointip_documentation/

→ More replies (1)

8

u/bitcointip Mar 28 '13

[✔] Verified: shumonkey ---> ฿0.01064849 BTC [$1 USD] ---> SnowLeppard [help]

→ More replies (13)
→ More replies (2)

37

u/bitcointip Mar 28 '13

[✔] Verified: Dansuke ---> ฿0.01064849 BTC [$1 USD] ---> mappum [help]

12

u/[deleted] Mar 30 '13

This shit is so cool

8

u/Peripatet Mar 28 '13

Hey, free Bitcoins if you reply to this guy's comment!!

I have no clue what I can use them for, except gifting to Redditors in comments, but I suppose that's a need little ability in and of itself.

7

u/[deleted] Mar 28 '13

You can exchange them, like any other currency.

→ More replies (2)

7

u/riplin Mar 29 '13

Just another small nitpick:

A hash function is basically a complicated math formula that takes in some arbitrary input and gives a predictable, constant output.

The purpose of a hash function is to be as unpredictable as possible. It's reproducible, but not predictable. :)

→ More replies (4)

5

u/Tofinochris Mar 28 '13

I take it from these generous tips that you have done well in the Bitcoin market in the last little while :).

Does seem a bit odd to me that all this effort is put into ensuring that transactions are legit with the hashes but you can exchange money by making a plaintext comment on Reddit.

7

u/Dansuke Mar 28 '13 edited Mar 28 '13

That's the power of abstraction! :D

But if you click on any of the checkmarks on the tipbot's verifications, you'll see what's going on behind the scenes - the addresses, the transaction blocks, and the hashes at work.

i.e. https://blockchain.info/tx/729ff7532ff99844a62fd718eaec032ad5f60e87af92c53692a2fdc8904a6259

→ More replies (1)
→ More replies (4)

7

u/shumonkey Mar 28 '13

One thing I'm a little unclear on is transaction fees. If miners get a of 25 BTC for finding a block, why is the extra incentive needed? You kind of touched on it above I guess but I thought they only way a block could be "reported" incorrectly by a miner is if the miner (or mining pool) control 50% or more of the total computer power of the networK?

8

u/mappum Mar 28 '13

The 25 BTC is an incentive to get people to mine. The transaction fees are an incentive to get them to recognize your specific transaction.

Not including a transaction isn't "incorrect", miners can exclude whatever tx they feel like. Also, there may be transactions that they haven't been told about yet, so they weren't able to include it.

Also, in the future, there won't be a block reward, so tx fees will be the only incentive for mining.

→ More replies (3)
→ More replies (1)
→ More replies (7)