Probability in Bitcoin Mining: The Hashing Function

The only way to send money electronically
has always been to rely on a centralized intermediary. Say, someone like PayPal. How do we randomly select a miner amongst
all the miners on the network to play this role, to be kind of like PayPal for a short, ten-minute period? Well, it’s actually through hash functions. A hash function is a mathematical function. It’s rather like what you would have learned
in grade school, just more complicated. You take your input data, and that could be
anything. Anything that can be represented in ones and
zeroes. So, it could be just the letter A. You take
the letter A and you cut and paste it into the hash function. What’s going to come out the other side? What is Y if that’s X? What’s going to come out is actually a 64-character string. It’ll look like a bunch of random letters
and numbers, but it will be unique and perfectly correlate to the letter A. So if someone across
the world takes the character A, cuts and pastes it into the same hash function, they’ll
get the same answer. It’s just math. If you cut and paste the complete works of
William Shakespeare into the same hash function, you’ll still get a 64-character string. It won’t be longer because your input data
was longer. It’ll be very similar to the hash of the letter
A. The particular letters and numbers and seemingly random text will be different than
the one before, but it’ll just be 64 characters long. And, again, if somebody did that same function
with that same input, the William Shakespeare through the same hash function, they’ll get
the same result you got when you ran that equation. So, what is a bitcoin miner actually hashing? They’re not hashing the letter A, they’re
not hashing the complete works of Sh- … William Shakespeare. They’re hashing all of the validly signed
transaction data that they just accumulated by listening to the peer-to-peer network over
the last ten minutes. And they’re also hashing a reference to the
previous block in the block chain. And this is how they’re actually chained together. This block references the previous block. And they’re also hashing one third thing. And that’s a random number. And each time they run all this data through
the hash function, they’re going to change the random number slightly to get a different
output. They’re trying to get an output that’s kind
of like flipping a coin heads up 20 times in a row. In Bitcoin, we use that kind of entropy to
randomly select winners in this open competition to be PayPal for ten minutes, and we do it using
a hash function.

8 thoughts on “Probability in Bitcoin Mining: The Hashing Function”

  1. A lot of people is sad cuz they dont buy Neo when its has low price and its too high… Dont worry we hawe new opportunity OMISE GO now its on top 15 , only 100m circulation supply , high volume , NEW Fresh coin with great future dont miss out this TRAIN. Gl guys <3

  2. Im just trying to get my head around all of you youtube talking about mining..what do you mean by the person is hashing? Aren't we all using software that does all of this? All we are doing is supplying a computer for this process to happen? I haven't done a single thing in your guys videos, except run a software and let my computer do its thing.

  3. its not a single person though… be keen to see how we get around the hash collisions when your doing billions of transactions a second… also if we talking about quantum computing coming into play you could have a hash that could be superpositioned in x & y? the hackers will always be first to the exploit

  4. Do not believe that the rogue they opened an account after 3 days asked me for maintenance money blocked information I wanted no return and closed my account scammer

Leave a Reply

Your email address will not be published. Required fields are marked *