Bitcoin Forum
November 02, 2024, 07:01:24 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Bitcoin mining solving equations, what it actually is?  (Read 2193 times)
bensam12345 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
April 21, 2015, 05:09:24 PM
 #1

One of my friend told me that mining equipment s of Bitcoin are used to solve major mathematical equations and problems and they get rewarded in bitcoins for solving every problem, he said these problems to solve are given by big drug development companies or defense sector companies, etc,  who cannot afford to have a super computer to solve the problem, was he right in what he said or am I missing something, are bitcoins given as rewards for solving such problems?, I need to get clarity on this right now once and for all.
odolvlobo
Legendary
*
Offline Offline

Activity: 4494
Merit: 3401



View Profile
April 21, 2015, 05:14:40 PM
 #2

The mathematical problem/puzzle/equation that must be solved is this:


Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.


The target is determined by the difficulty.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
bensam12345 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
April 21, 2015, 05:18:38 PM
 #3

The mathematical problem/puzzle/equation that must be solved is this:


Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.


The target is determined by the difficulty.

Thank you.

But what is the benefit and real world application of this, does any research facility get benefited out of this?
odolvlobo
Legendary
*
Offline Offline

Activity: 4494
Merit: 3401



View Profile
April 21, 2015, 05:20:33 PM
 #4

None. Your friend is misinformed.

There are other coins that solve more practical problems, such PrimeCoin, which finds a certain kind of prime number, and FoldingCoin, which is rewarded for folding proteins.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
bensam12345 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
April 21, 2015, 05:22:15 PM
 #5

None. Your friend is misinformed.

There are other coins that solve more practical problems, such PrimeCoin, which finds a certain kind of prime number, and FoldingCoin, which is rewarded for folding proteins.

Ok thank you for clearing it up  Smiley
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
April 21, 2015, 11:50:57 PM
 #6

The mathematical problem/puzzle/equation that must be solved is this:


Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.


The target is determined by the difficulty.

Thank you.

But what is the benefit and real world application of this, does any research facility get benefited out of this?

the benefit is network security.  solving a problem is the proof of work that acts as a sort of timestamping mechanism for consensus within a distributed system. 

H.W.Z
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500



View Profile
April 22, 2015, 02:36:30 AM
 #7

Quote
they get rewarded in bitcoins for solving every problem, he said these problems to solve are given by big drug development companies or defense sector companies, etc,
How could it be? Bitcoin is open source and no one can individual is able to  change the protocol or the blockchain secured by the total network.

freeyourmind
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252



View Profile
April 22, 2015, 03:48:00 AM
 #8

The mathematical problem/puzzle/equation that must be solved is this:


Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.


The target is determined by the difficulty.


Interesting.  You've explained this in a way that isn't difficult to understand.

Would you be able to give a sample of what the number, hash of the block header and target would look like in an equation?
BitBlitz
Sr. Member
****
Offline Offline

Activity: 285
Merit: 250


Turning money into heat since 2011.


View Profile
April 22, 2015, 03:55:44 AM
 #9

Bitcoin miners are working on a very complicated mathematical puzzle that seeks the answer to: "What do we do with this extra electricity?"

I see the value of Bitcoin, so I don't worry about the price...
mkc
Hero Member
*****
Offline Offline

Activity: 517
Merit: 501


View Profile
April 22, 2015, 03:59:36 AM
 #10

Bitcoin miners are working on a very complicated mathematical puzzle that seeks the answer to: "What do we do with this extra electricity?"

This is pretty funny, I like it. and what do we do with extra computing power?
odolvlobo
Legendary
*
Offline Offline

Activity: 4494
Merit: 3401



View Profile
April 22, 2015, 07:19:47 AM
 #11

The mathematical problem/puzzle/equation that must be solved is this:


Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.


The target is determined by the difficulty.


Interesting.  You've explained this in a way that isn't difficult to understand.

Would you be able to give a sample of what the number, hash of the block header and target would look like in an equation?

SHA256(SHA256(H, N)) < T, where H is the header, N is the solution (included as part of the header), and T is the target.

Here is the current target (in hex): 0x00000000000000001717F0000000000000000000000000000000000000000000

If you look at block #353192 (https://blockchain.info/block-height/353192) you will see that N is 3813908736 and the result of SHA256(SHA256(H, 3813908736)) is 0x0000000000000000092f8a4cec04d9a6a9976139db98362656182fc4470b845e, which is less than the target.

Actually, that is a simplified explanation. There are other fields in the header that are modified to get a successful result: the timestamp and the merkle root values in the header are also adjusted.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
Jakesy
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile
April 22, 2015, 12:26:51 PM
 #12

The mathematical problem/puzzle/equation that must be solved is this:


Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.


The target is determined by the difficulty.


Interesting.  You've explained this in a way that isn't difficult to understand.

Would you be able to give a sample of what the number, hash of the block header and target would look like in an equation?

SHA256(SHA256(H, N)) < T, where H is the header, N is the solution (included as part of the header), and T is the target.

Here is the current target (in hex): 0x00000000000000001717F0000000000000000000000000000000000000000000

If you look at block #353192 (https://blockchain.info/block-height/353192) you will see that N is 3813908736 and the result of SHA256(SHA256(H, 3813908736)) is 0x0000000000000000092f8a4cec04d9a6a9976139db98362656182fc4470b845e, which is less than the target.

Actually, that is a simplified explanation. There are other fields in the header that are modified to get a successful result: the timestamp and the merkle root values in the header are also adjusted.

Here's an ELI5 - PLEASE correct me if I'm wrong, but remember I'm putting it in the most simplistic terms:

As a miner you're putting together transactions and you need to find the hash of the whole block of transactions (this is very easy for computers to do).  This hash will be included in the next block to prove that it's part of the "chain."

Take a look at this picture (a digest can be considered the same as a hash):


See how drastically the numbers change even if one character is changed?  That's why double spending is difficult, because you have to alter ALL of the hashes in the next blocks - this makes bitcoin secure against double spends.

Now, bitcoin achieves decentralization in this through a protocol called proof-of-work.  It adds an extra step in this hashing.  Right now you have to find a hash that's LESS THAN this number: 0x00000000000000001717F0000000000000000000000000000000000000000000.  Basically we have to find a number with 17 0's in front of it.

Now remember how easy it is for the hash to drastically change (adding/removing ONE character)?  Well how to the miners find their hash AND make sure it's less than the target hash number.  How do we do this?  There's no "equation" for figuring this out, so computers just "guess."  It truly is a lottery and makes it decentralized because it appears to be random.

Within the block is a "nonce."  This is the number that the miner increments until it magically finds the hash we're looking for.  The nonce is the "proof-of-work."

TL;DR - miners are trying to find a certain value for their hash; they can only achieve this through guessing.  Changing the nonce, changes the hash.  They're cycling through nonce values until one satisfies the target hash value.  Nonce is the proof-of-work and helps achieve decentralization.
Snail2
Legendary
*
Offline Offline

Activity: 1512
Merit: 1000



View Profile
April 22, 2015, 12:32:24 PM
 #13

Bitcoin miners are working on a very complicated mathematical puzzle that seeks the answer to: "What do we do with this extra electricity?"

This is the best explanation what I ever heard Smiley.
ensurance982
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


Trust me!


View Profile
April 22, 2015, 02:02:16 PM
 #14

There are very helpful and correct answers in this thread, but there's one thing I have to add: It's being done this ways because verifying such a hash is incredibly easy (just put the input into the hashing function and you check whether the result qualifies as a valid hash) but finding the inputs that will qualify for those valid results can only performed via trying over and over again. Hard to find, but simple to verify.

                                                                                                                      We Support Currencies: BTC, LTC, USD, EUR, GBP
freeyourmind
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252



View Profile
April 22, 2015, 09:59:19 PM
 #15

The mathematical problem/puzzle/equation that must be solved is this:


Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.


The target is determined by the difficulty.


Interesting.  You've explained this in a way that isn't difficult to understand.

Would you be able to give a sample of what the number, hash of the block header and target would look like in an equation?

SHA256(SHA256(H, N)) < T, where H is the header, N is the solution (included as part of the header), and T is the target.

Here is the current target (in hex): 0x00000000000000001717F0000000000000000000000000000000000000000000

If you look at block #353192 (https://blockchain.info/block-height/353192) you will see that N is 3813908736 and the result of SHA256(SHA256(H, 3813908736)) is 0x0000000000000000092f8a4cec04d9a6a9976139db98362656182fc4470b845e, which is less than the target.

Actually, that is a simplified explanation. There are other fields in the header that are modified to get a successful result: the timestamp and the merkle root values in the header are also adjusted.

Thanks, I appreciate the explanation Smiley

So when you write SHA256(H, N), is that a function of the two variables, H and N?
bensam12345 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
April 22, 2015, 10:04:37 PM
 #16

Bitcoin miners are working on a very complicated mathematical puzzle that seeks the answer to: "What do we do with this extra electricity?"

That cracked me up

DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4801



View Profile
April 23, 2015, 01:18:14 AM
Last edit: April 24, 2015, 04:12:04 PM by DannyHamilton
 #17

- snip -
SHA256(SHA256(H, N)) < T, where H is the header, N is the solution (included as part of the header), and T is the target.
- snip -
- snip -
So when you write SHA256(H, N), is that a function of the two variables, H and N?

I suppose you could describe it that way.  More specifically:

SHA256 is the 256 bit SHA-2 hash of the block header.  You can read all about it here:
http://en.wikipedia.org/wiki/SHA-2

H is the block header
N is the nonce solution that the miner is searching for.  It is actually part of the block header.

You can read about the block header here:
https://en.bitcoin.it/wiki/Protocol_documentation#Block_Headers

You see there that the header contains the nonce stored in the 77th through 80th bytes.

The miner builds the block header.  Then hashes the header using the SHA256 algorithm.

If the result is less than the current target (described as 'T' by odolvlobo), then the miner is done and has successfully "solved" the block.

If the result is NOT less than the current target, then the miner increments the nonce value and tries again.

The miner repeats this process until either:

  • They find a nonce that results in a SHA256 hash that is less than the target
  • They have tried ALL 4,294,967,296 possible nonce values and none of them resulted in a SHA256 hash that is less than the target

If they have tried all the possible nonce values and none of them work, then they build a new (different) block header, and try again.

TheGr33k
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
April 23, 2015, 02:34:07 AM
 #18

Bitcoin miners are working on a very complicated mathematical puzzle that seeks the answer to: "What do we do with this extra electricity?"
A good time to wish everyone a happy earth day?
freeyourmind
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252



View Profile
April 24, 2015, 02:17:35 PM
 #19

- snip -
SHA256(SHA256(H, N)) < T, where H is the header, N is the solution (included as part of the header), and T is the target.
- snip -
- snip -
So when you write SHA256(H, N), is that a function of the two variables, H and N?

I suppose you could describe it that way.  More specifically:

SHA256 is the 256 bit SHA-2 hash of the block header.  You can read all about it here:
http://en.wikipedia.org/wiki/SHA-2

H is the block header (without the nonce solution)
N is the nonce solution that the miner is searching for.  It is actually part of H.

You can read about the block header here:
https://en.bitcoin.it/wiki/Protocol_documentation#Block_Headers

You see there that the header contains the nonce stored in the 77th through 80th bytes.

The miner builds the block header.  Then hashes the header using the SHA256 algorithm.

If the result is less than the current target (described as 'T' by odolvlobo), then the miner is done and has successfully "solved" the block.

If the result is NOT less than the current target, then the miner increments the nonce value and tries again.

The miner repeats this process until either:

  • They find a nonce that results in a SHA256 hash that is less than the target
  • They have tried ALL 4,294,967,296 possible nonce values and none of them resulted in a SHA256 hash that is less than the target

If they have tried all the possible nonce values and nonce of them work, then they build a new (different) block header, and try again.



Thanks for the clarification.  I'll do some reading on the links you shared, but it's making a lot more sense Smiley
BillyBobZorton
Legendary
*
Offline Offline

Activity: 1204
Merit: 1028


View Profile
April 24, 2015, 02:28:44 PM
 #20

It probably doesn't get any better than this in trying to explain what's going on in bitcoin's mining:

https://www.youtube.com/watch?v=y3dqhixzGVo

So now you know what to do if you want to do it manually.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!