Bitcoin Forum
April 24, 2024, 08:49:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Valid nonces in pooled mining  (Read 893 times)
dxm (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
March 01, 2012, 01:23:29 AM
Last edit: March 01, 2012, 02:55:30 AM by dxm
 #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?
1713991787
Hero Member
*
Offline Offline

Posts: 1713991787

View Profile Personal Message (Offline)

Ignore
1713991787
Reply with quote  #2

1713991787
Report to moderator
1713991787
Hero Member
*
Offline Offline

Posts: 1713991787

View Profile Personal Message (Offline)

Ignore
1713991787
Reply with quote  #2

1713991787
Report to moderator
1713991787
Hero Member
*
Offline Offline

Posts: 1713991787

View Profile Personal Message (Offline)

Ignore
1713991787
Reply with quote  #2

1713991787
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713991787
Hero Member
*
Offline Offline

Posts: 1713991787

View Profile Personal Message (Offline)

Ignore
1713991787
Reply with quote  #2

1713991787
Report to moderator
1713991787
Hero Member
*
Offline Offline

Posts: 1713991787

View Profile Personal Message (Offline)

Ignore
1713991787
Reply with quote  #2

1713991787
Report to moderator
1713991787
Hero Member
*
Offline Offline

Posts: 1713991787

View Profile Personal Message (Offline)

Ignore
1713991787
Reply with quote  #2

1713991787
Report to moderator
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



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.

Adblock for annoying signature ads | Enhanced Merit UI
dxm (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


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...
dxm (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


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