Bitcoin Forum
June 14, 2024, 02:10:34 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin mining system  (Read 1230 times)
blockfinder (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
June 18, 2014, 08:13:13 PM
 #1

I'm interested to know how bitcoin pool mining works, I read everything I found on the internet but there are some things that need to be clarified.
After the nonce is added to the block's header, why is it hashed 2 times and not 1 or 3?
After a hash is created and sent to the pool, what exactly the pool is doing with the hash?
The difficulty level is it just a number, a string or another hash?
Is the sent hash transformed into a number and compared with the difficulty value?
Why there must be 4 leading zeroes on a hash to be accepted, do all hashes with 4 leading zeros are accepted or are there some conditions to not accept some of them
juju
Sr. Member
****
Offline Offline

Activity: 381
Merit: 250



View Profile
June 18, 2014, 08:49:08 PM
 #2

I am no expert but I found some particularly good reading a few weeks ago:

http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html
http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html

DannyHamilton
Legendary
*
Offline Offline

Activity: 3416
Merit: 4658



View Profile
June 18, 2014, 09:00:32 PM
 #3

I'm interested to know how bitcoin pool mining works, I read everything I found on the internet but there are some things that need to be clarified.
After the nonce is added to the block's header, why is it hashed 2 times and not 1 or 3?

Why 1, or 3, and not 2?

It's an arbitrary decision.

My best guess is that by using 2 hashes, if the hash algorithm ever becomes weaker (due to new mathematical discoveries), then one of the 2 rounds can be replaced with a new algorithm as a way of transitioning.  Really though, only Satoshi knows for certain why he decided to go with 2 times.

After a hash is created and sent to the pool, what exactly the pool is doing with the hash?

The pool verifies that the nonce results in a proper hash, and that the header that was hashed matches all the requirements of the block.  If so, then it broadcasts the block to all connected peers.

The difficulty level is it just a number, a string or another hash?

Just a number.

Is the sent hash transformed into a number and compared with the difficulty value?

Hashes are numbers.  They are 256 bit numbers.  They are often displayed in hexadecimal format to save space, but can easily be converted to binary, octal, decimal, or any other form you might like.

Why there must be 4 leading zeroes on a hash to be accepted, do all hashes with 4 leading zeros are accepted or are there some conditions to not accept some of them

The hash result must be lower value than a target set by the difficulty.  Difficulty is high enough right now, than in order to be lower than the target, the value is small enough that it always at least starts with some zeroes.
blockfinder (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
June 20, 2014, 07:42:18 AM
 #4


Thank you!
After a hash is found by the mining software, the miner sends the nonce for that hash to the pool or the hash itself?
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
June 20, 2014, 07:52:01 AM
 #5


Thank you!
After a hash is found by the mining software, the miner sends the nonce for that hash to the pool or the hash itself?


From what I read here [1] both the data (includes the nonce) and the hash itself is returned. Only the hash would not work because reversing the calculation is costly, while its easy to get the hash with the given data.



[1] CGMiner Readme - https://github.com/ckolivas/cgminer/blob/5626f6a91ea6187460a6491b19a158cda10afc6b/README#L754

Im not really here, its just your imagination.
blockfinder (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
June 22, 2014, 11:21:03 AM
Last edit: June 22, 2014, 01:45:23 PM by blockfinder
 #6

What is the URL to the bitcoin network used by the mining software to receive the header using the Getwork protocol?
Are there any easy to understand examples of getwork requests written in Javascript or PHP?
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!