Bitcoin Forum
December 03, 2016, 11:52:22 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Valid nonces in pooled mining  (Read 740 times)
dxm
Newbie
*
Offline Offline

Activity: 3


View Profile
March 01, 2012, 01:23:29 AM
 #1

When generating a block, its hash has to be smaller than target (~13 first chars are zeros). What is exactly required for a nonce in pooled mining? I thought it's like hashing a block with difficulty 1 (~8 first chars are zeros). But when mined on bitcoinplus.com, I noticed that this data is valid(I got a payout for this):
00000001 - version
82629e89fdcbe6662a350e82895f6f508767a5b2580e2b4b0000084d00000000 - previous hash
a44cfbae9c9734db6c372ef28fa9eb6282889679114e4138462366b696fd22da - merkle root
4f4e9582 - timestamp
1a0c309c - bits
52990488 - nonce

After conversion to little-endian it looks like:
01000000000000004d0800004b2b0e58b2a56787506f5f89820e352a66e6cbfd899e6282da22fd9 6b666234638414e117996888262eba98ff22e376cdb34979caefb4ca482954e4f9c300c1a880499 52

And final result for double sha256 is 0b26bd7ab017063b4b158c479a340e165228fed254d490d1f31352812ca57aea (ea7aa52c815213f3d190d454d2fe2852160e349a478c154b3b0617b07abd260b for little endian).
Why is it valid if it doesn't have any leading zeros?

17b7KnpC6t5zE7FxcTmf9iHKAqcsYS74HL
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480765942
Hero Member
*
Offline Offline

Posts: 1480765942

View Profile Personal Message (Offline)

Ignore
1480765942
Reply with quote  #2

1480765942
Report to moderator
1480765942
Hero Member
*
Offline Offline

Posts: 1480765942

View Profile Personal Message (Offline)

Ignore
1480765942
Reply with quote  #2

1480765942
Report to moderator
1480765942
Hero Member
*
Offline Offline

Posts: 1480765942

View Profile Personal Message (Offline)

Ignore
1480765942
Reply with quote  #2

1480765942
Report to moderator
grue
Global Moderator
Legendary
*
Offline Offline

Activity: 1932



View Profile
March 01, 2012, 02:23:10 AM
 #2

all pool mining shares = 1 difficulty

It is pitch black. You are likely to be eaten by a grue.

Tired of annoying signature ads? Ad block for signatures
dxm
Newbie
*
Offline Offline

Activity: 3


View Profile
March 01, 2012, 02:52:29 AM
 #3

all pool mining shares = 1 difficulty

But doesn't "1 difficulty" means hash lower than 00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ?
ea7aa52c815213f3d190d454d2fe2852160e349a478c154b3b0617b07abd260b  is higher than 00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  but it was accepted...

17b7KnpC6t5zE7FxcTmf9iHKAqcsYS74HL
dxm
Newbie
*
Offline Offline

Activity: 3


View Profile
March 01, 2012, 04:15:51 PM
 #4

Ok, I finally understood, there already was similar topic. This little-endian conversion was wrong, it has to be done separately for every 4-byte block. The python code in https://bitcointalk.org/index.php?topic=52409.0 was really helpful.  Smiley

17b7KnpC6t5zE7FxcTmf9iHKAqcsYS74HL
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!