Bitcoin Forum
November 08, 2024, 04:42:18 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Simple question - what is the root of the "math" that we are doing?  (Read 2146 times)
eideteker (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
March 23, 2011, 03:24:23 PM
 #1

I've only been mining a couple weeks now, but with two GPUs and two CPU threads going I've amassed some coinage.  I posted on a popular forum's distributed computing section what everyone thought of bitcoin and I've received some troubling replies.  The one that gets me the most (and the one that I can't seem to find an answer to) is this: just what is all this hashing for?  Is it really merely to find the next block, are we unknowingly cracking for some devious entity?  It would appear that they will not accept the former as an answer, even though they all run F@H and WCG clients and can't truly trace the math they are doing either.
gohan
Jr. Member
*
Offline Offline

Activity: 52
Merit: 1


View Profile
March 23, 2011, 03:35:35 PM
 #2

It's just plain silly to make such claims when every bit of specification and all the code is open. What miners do is so basic that anyone with a bit of programming knowledge can have at least a coarse idea of the task being done by looking at the code. So I wouldn't trouble myself over it. Cheesy

From https://en.bitcoin.it/wiki/Blocks :

Each block contains all recent transactions, a nonce (random number), and the hash of the previous block. A block is "solved" (published and considered valid by peers) when the SHA-256 hash of the entire block is below the current target. This is very unlikely to occur after being hashed only once, so the nonce must be incremented and the block re-hashed millions of times until it does.
Garrett Burgwardt
Sr. Member
****
Offline Offline

Activity: 406
Merit: 256


View Profile
March 23, 2011, 03:36:17 PM
 #3

You're running SHA-256 calculations, trying to find a hash that is below a certain target number (correct me if I'm wrong on the hash part, I'm not 100% on whether we hash numbers or find the number to match the hash).

So in effect you're making rainbow tables, which is encoded in the blockchain. It's an inefficient and unoptimized table though, so it doesn't really matter.

No shady stuff here Smiley

This is all determinable by looking at the source code, btw. You don't need to believe me.
barbarousrelic
Hero Member
*****
Offline Offline

Activity: 675
Merit: 502


View Profile
March 23, 2011, 03:41:15 PM
 #4

I'm a little confused - for one set of data and one method of hashing, isn't there only one possible hash? What does it mean then to try to find a hash below a certain value?  From what I understand about hashes, either it is or it isn't below that value, and no amount of retrying can change that.

Do not waste your time debating whether Bitcoin can work. It does work.

"Early adopters will profit" is not a sufficient condition to classify something as a pyramid or Ponzi scheme. If it was, Apple and Microsoft stock are Ponzi schemes.

There is no such thing as "market manipulation." There is only buying and selling.
wb3
Member
**
Offline Offline

Activity: 112
Merit: 11


^Check Out^ Isle 3


View Profile
March 23, 2011, 03:42:36 PM
 #5

Still,

He makes a point. It would be a shame to to have all that hashing go to waste. I would like to look for collisions or at least report the collisions.

Net Worth = 0.10    Hah, "Net" worth Smiley
Garrett Burgwardt
Sr. Member
****
Offline Offline

Activity: 406
Merit: 256


View Profile
March 23, 2011, 03:45:46 PM
 #6

I'm a little confused - for one set of data and one form of hashing, isn't there only one possible hash? What does it mean then to try to find a hash below a certain value? Either it is or it isn't below that value, from what I understand about hashes.

You're right - but most hashes are above the target, as in, for function hash(x) on [a,b], the function will be mostly >target (for higher difficulties, anyway).

That's why we have to do so much hashing to find a block. I'm personally running about 900 million hashes per second, and I rarely find a block.

So in short, you're right, that's why we have to hash so many numbers.
wb3
Member
**
Offline Offline

Activity: 112
Merit: 11


^Check Out^ Isle 3


View Profile
March 23, 2011, 03:47:51 PM
 #7

I'm a little confused - for one set of data and one form of hashing, isn't there only one possible hash? What does it mean then to try to find a hash below a certain value? Either it is or it isn't below that value, from what I understand about hashes.

Yes but because a little change in the input can cause a big change in the output.

For example:

Hash of "1" might be 393rnfn8448rhir83ru923ur093

Hash of "2" might be y5jnj5gj438483483948hgjg348

What there looking for by increasing difficulty in a solution is out of all the people solving hashes is when someone finds a hash of say:

00000000483th48ghjvn4uf9fuh4u49

The odds of finding a hash with 7 zeros can be calculated, but finding them takes time.

Just examples;

Net Worth = 0.10    Hah, "Net" worth Smiley
ffe
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
March 23, 2011, 03:51:40 PM
 #8

I'm a little confused - for one set of data and one method of hashing, isn't there only one possible hash? What does it mean then to try to find a hash below a certain value?  From what I understand about hashes, either it is or it isn't below that value, and no amount of retrying can change that.

Yes. Only one possible hash. In fact very probably a useless hash because it is larger than the target difficulty. That's why the block has a random number that you can change. It's called the nonce. If a hash fails to be below the difficulty threshold, you increment the nonce and try again. You get a different hash and a new shot at having the hash below the difficulty.

You'll probably fail again and have to increment the nonce again. Guess what. You're mining! After billions of tries you run across a nonce that makes the block hash to a value less than the difficulty and you've made yourself 50 bitcoins.
barbarousrelic
Hero Member
*****
Offline Offline

Activity: 675
Merit: 502


View Profile
March 23, 2011, 03:54:26 PM
 #9

I'm a little confused - for one set of data and one method of hashing, isn't there only one possible hash? What does it mean then to try to find a hash below a certain value?  From what I understand about hashes, either it is or it isn't below that value, and no amount of retrying can change that.

Yes. Only one possible hash. In fact very probably a useless hash because it is larger than the target difficulty. That's why the block has a random number that you can change. It's called the nonce. If a hash fails to be below the difficulty threshold, you increment the nonce and try again. You get a different hash and a new shot at having the hash below the difficulty.

You'll probably fail again and have to increment the nonce again. Guess what. You're mining! After billions of tries you run across a nonce that makes the block hash to a value less than the difficulty and you've made yourself 50 bitcoins.


Ahh, I understand now.

so it calculates hash(lastblock+random_num) and checks to see if it is less than the difficulty. If it's above, it changes the random number and tries again.

Does it increment the nonce by 1 each time, or does it pick a completely random nonce each time?

Do not waste your time debating whether Bitcoin can work. It does work.

"Early adopters will profit" is not a sufficient condition to classify something as a pyramid or Ponzi scheme. If it was, Apple and Microsoft stock are Ponzi schemes.

There is no such thing as "market manipulation." There is only buying and selling.
eideteker (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
March 23, 2011, 03:55:43 PM
 #10

What miners do is so basic that anyone with a bit of programming knowledge can have at least a coarse idea of the task being done by looking at the code.

This is the main problem - they don't have any programming knowledge (caveat: neither do I), and they are also rather closed minded.

Quote from: TheKid
This is all determinable by looking at the source code, btw. You don't need to believe me.

That's nice and all, and I do accept that since it is open source there is no hidden agenda, but trying to get these people on board is mind-numbing.  One poster likened bitcoin to money-laundering by selling IEDs.  Roll Eyes
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5376
Merit: 13407


View Profile
March 23, 2011, 04:24:44 PM
 #11

Does it increment the nonce by 1 each time, or does it pick a completely random nonce each time?

It increments, but there's other unique data in the block that ensures you're not re-doing work that's already been done.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Jered Kenna (TradeHill)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile WWW
March 23, 2011, 05:03:48 PM
 #12


 One poster likened bitcoin to money-laundering by selling IEDs.  Roll Eyes

Wow that's funny as hell but about the harshest comparison I could think of.

moneyandtech.com
@moneyandtech @jeredkenna
gohan
Jr. Member
*
Offline Offline

Activity: 52
Merit: 1


View Profile
March 23, 2011, 06:08:23 PM
 #13

This is the main problem - they don't have any programming knowledge (caveat: neither do I), and they are also rather closed minded.
Well, you don't have to know anything, that's the point. It being an open technology ensures that people who know can and do audit it. It is not an obscure piece of program we're talking about, Bitcoin community includes tens, maybe hundreds of programmers from various parts of the world. You don't also need know these facts about Bitcoin, since all open projects function this way.

It's very hard to deal with close minded people. I once met an IT manager at a bank who told me they didn't use opensource, because, it being open meant it wasn't secure enough. Well, first of all, your whole banking system runs on opensource you fucking idiot, your bank only uses Windows to give access to your dumb employees. *rumble rumble rumble*
wb3
Member
**
Offline Offline

Activity: 112
Merit: 11


^Check Out^ Isle 3


View Profile
March 23, 2011, 06:20:49 PM
 #14

This is the main problem - they don't have any programming knowledge (caveat: neither do I), and they are also rather closed minded.
Well, you don't have to know anything, that's the point. It being an open technology ensures that people who know can and do audit it. It is not an obscure piece of program we're talking about, Bitcoin community includes tens, maybe hundreds of programmers from various parts of the world. You don't also need know these facts about Bitcoin, since all open projects function this way.

It's very hard to deal with close minded people. I once met an IT manager at a bank who told me they didn't use opensource, because, it being open meant it wasn't secure enough. Well, first of all, your whole banking system runs on opensource you fucking idiot, your bank only uses Windows to give access to your dumb employees. *rumble rumble rumble*


Yea,

Companies are smart enough to know not to trust third party proprietary software (something might be hidden in there). They will trust their own software with hidden things, just not others.

OpenSource for the most part is probably the safest software, although be mindful of the amount of people working with it. OpenSource with just 3 people supporting it, will not necessarily be safe for the novice. You must look at the code before you use it.

BitCoin will probably, if successful, be the most safest form of software because so many people want to find a flaw or exploit to get rich quick.

Net Worth = 0.10    Hah, "Net" worth Smiley
compro01
Hero Member
*****
Offline Offline

Activity: 590
Merit: 500



View Profile
March 23, 2011, 10:45:26 PM
 #15

so it calculates hash(lastblock+random_num) and checks to see if it is less than the difficulty. If it's above, it changes the random number and tries again.

pretty much.

actually, it's hash(hash(last_block)+hash(transactions)+current_time+current_target+random_num) and it checks whether it is less than the current target.

the wiki has a small explanation here.
0x6763
Guest

March 24, 2011, 07:29:19 PM
 #16

This is the main problem - they don't have any programming knowledge (caveat: neither do I), and they are also rather closed minded.

The closed-minded ones will be left behind economically.  Maybe one day they will notice and realize they made a very expensive mistake.
Jered Kenna (TradeHill)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile WWW
March 24, 2011, 07:32:58 PM
 #17

One thing that kind of scares me is the whole "someone else called 911" effect.
There's probably a better name for it than what I'm calling it.
Basically you see a wreck with people hurt and you don't call because you assume someone else did, the problem is everyone else assumes the same and no one calls.

You could have this problem with open source especially when less people understand the code than people that have cell phones.
Obviously the more popular the software is the more likely it's analyzed carefully but it also means the average person is less worried to look for themselves.

moneyandtech.com
@moneyandtech @jeredkenna
eMansipater
Sr. Member
****
Offline Offline

Activity: 294
Merit: 273



View Profile WWW
March 24, 2011, 08:18:04 PM
 #18

One thing that kind of scares me is the whole "someone else called 911" effect.
There's probably a better name for it than what I'm calling it.
Basically you see a wreck with people hurt and you don't call because you assume someone else did, the problem is everyone else assumes the same and no one calls.

You could have this problem with open source especially when less people understand the code than people that have cell phones.
Obviously the more popular the software is the more likely it's analyzed carefully but it also means the average person is less worried to look for themselves.
The bystander effect is the one you're looking for.

If you found my post helpful, feel free to send a small tip to 1QGukeKbBQbXHtV6LgkQa977LJ3YHXXW8B
Visit the BitCoin Q&A Site to ask questions or share knowledge.
0.009 BTC too confusing?  Use mBTC instead!  Details at www.em-bit.org or visit the project thread to help make Bitcoin prices more human-friendly.
Jered Kenna (TradeHill)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile WWW
March 24, 2011, 10:01:33 PM
 #19

One thing that kind of scares me is the whole "someone else called 911" effect.
There's probably a better name for it than what I'm calling it.
Basically you see a wreck with people hurt and you don't call because you assume someone else did, the problem is everyone else assumes the same and no one calls.

You could have this problem with open source especially when less people understand the code than people that have cell phones.
Obviously the more popular the software is the more likely it's analyzed carefully but it also means the average person is less worried to look for themselves.
The bystander effect is the one you're looking for.

Thanks  Wink

Learned a couple new rules / effects on here so far, probably pick up more later on.
Pretty intelligent board.

moneyandtech.com
@moneyandtech @jeredkenna
Pages: [1]
  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!