Bitcoin Forum
December 04, 2016, 02:02:24 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: SHA-2  (Read 1012 times)
bennyX
Newbie
*
Offline Offline

Activity: 1


View Profile
June 11, 2011, 03:27:38 PM
 #1

I've been reading all about Bitcoin's crypto and looked over the SHA-2 (256) algorithm and have tried to get my head around it, but i'm no mathematician or computer scientist (and i've never been good at math, period) so maybe that's why i've been having trouble understanding it.

Basically I have a few questions, and maybe some of you smart people out there can answer them so I can get more comprehension.. lol

1.  As i understand it, the miner makes a lot of 'guesses' before it comes up with a 'best candidate' that is equal to or lesser than the Target.  Does every run through the algorithm count as a guess, or just the hashes that closely match the criteria?   Why does there have to be guesses?  I thought there could only be one right answer/match (ie the hashes match)?  If this is not the case, then does it mean that all the miners make these guesses in the hopes that one might actually be the match? 

2. How does pooling differ from single mining?  I know all miners in a pool submit all valid hashes.. but i don't understand that.. i mean, all miners in the pool work on the same block, yes?  Then why does everyone in the pool submit all valid hashes?  I thought there can be only one valid hash (ie a match).   Are 'best guesses' valid, too??   

3.  Does every miner get issued a unique block to solve, or it it basically just a race to see which miner solves the block? 

4. I'd assume there's a lot of redundancy built in, so blocks aren't lost..  do some blocks issued to miners contain the same transactions between them, as well as some unique transactions?  I read something about the Merkle tree, which is incorporated into every block..  that's what maintains the block chain integrity, yes?

5. Because of the nature of the crypto algorithm (hashing), if a hash matches the block's hash, only then can the content of that block be known, yes?   

As you can see, i'm quite fuzzy on things still, despite spending a lot of time reading through the technical mumbo jumbo..  possibly because the documentation isn't really written in laymen's terms...

1480816944
Hero Member
*
Offline Offline

Posts: 1480816944

View Profile Personal Message (Offline)

Ignore
1480816944
Reply with quote  #2

1480816944
Report to moderator
1480816944
Hero Member
*
Offline Offline

Posts: 1480816944

View Profile Personal Message (Offline)

Ignore
1480816944
Reply with quote  #2

1480816944
Report to moderator
"Apparently, so I am told, there exist "people" who prefer to wipe sitting down. From the front. Initial research indicates it could be up to half the population." -- benjamindees
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480816944
Hero Member
*
Offline Offline

Posts: 1480816944

View Profile Personal Message (Offline)

Ignore
1480816944
Reply with quote  #2

1480816944
Report to moderator
1480816944
Hero Member
*
Offline Offline

Posts: 1480816944

View Profile Personal Message (Offline)

Ignore
1480816944
Reply with quote  #2

1480816944
Report to moderator
1480816944
Hero Member
*
Offline Offline

Posts: 1480816944

View Profile Personal Message (Offline)

Ignore
1480816944
Reply with quote  #2

1480816944
Report to moderator
Basiley
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 11, 2011, 04:32:17 PM
 #2

notice SHA-3 contest progress/status http://en.wikipedia.org/wiki/NIST_hash_function_competition
http://csrc.nist.gov/groups/ST/hash/sha-3/Round1/Feb2009/index.html
and its unlikely thats SHA-3 live long enough too, meaning spikes in crypto-power around globe.
qbg
Member
**
Offline Offline

Activity: 75


View Profile
June 11, 2011, 04:33:16 PM
 #3

1.  As i understand it, the miner makes a lot of 'guesses' before it comes up with a 'best candidate' that is equal to or lesser than the Target.  Does every run through the algorithm count as a guess, or just the hashes that closely match the criteria?   Why does there have to be guesses?  I thought there could only be one right answer/match (ie the hashes match)?  If this is not the case, then does it mean that all the miners make these guesses in the hopes that one might actually be the match?  
The miners change a random number in the block is changed until SHA2(SHA2(block)) is less than the current target (remember, hashes are just a number). The first miner who achieves that goal gets the block.
Quote
2. How does pooling differ from single mining?  I know all miners in a pool submit all valid hashes.. but i don't understand that.. i mean, all miners in the pool work on the same block, yes?  Then why does everyone in the pool submit all valid hashes?  I thought there can be only one valid hash (ie a match).   Are 'best guesses' valid, too??  
In a pool, the miners submit blocks with hashes less than a target specified by the pool. This target is higher than the actual target, so it is easier to find these blocks aka shares. Occasionally the hash of a share is less than actual target, and the pool gets that block.  Every share that the miners work on would give the winnings of the block to the pool's operator, so that is why the workers can't claim a block they found for themselves.
Quote
3.  Does every miner get issued a unique block to solve, or it it basically just a race to see which miner solves the block?  
It is more like a lottery. The more tickets you buy (hashes you perform), the higher your odds. Every miner chooses what transactions they want to include in their block, so the blocks that miners can be working on can vary. However, each block has a dependency on the previous blocks in the chain, so the first miner to find their block will win and everyone else will need to start their work over if they want to add on to that block chain.
Quote
4. I'd assume there's a lot of redundancy built in, so blocks aren't lost..  do some blocks issued to miners contain the same transactions between them, as well as some unique transactions?  I read something about the Merkle tree, which is incorporated into every block..  that's what maintains the block chain integrity, yes?
Blocks are distributed over the P2P network. Every transaction that ends up in a block ends up in only one block in the accepted block chain (that is, the longest valid block chain).  The Merkle tree is used so that in theory not all of the blocks are needed to be able to verify the block chain. This will allow space savings over time.
Quote
5. Because of the nature of the crypto algorithm (hashing), if a hash matches the block's hash, only then can the content of that block be known, yes?  
A hash function, f, has the property that if one knows f(x) it is almost impossible to find x (where 'almost impossible' means no better than brute force, i.e. trying lots of random x's.)
Quote
As you can see, i'm quite fuzzy on things still, despite spending a lot of time reading through the technical mumbo jumbo..  possibly because the documentation isn't really written in laymen's terms...
Bitcoin is the result of combining a few ideas in a beautiful manner, so it can be hard to understand at first.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!