Bitcoin Forum
November 05, 2024, 09:51:29 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to calculate the target from getwork function?  (Read 1060 times)
ahtremblay (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


Live Stars - Adult Streaming Platform


View Profile
June 08, 2011, 04:48:50 AM
 #1

Hello, when I call getwork from linux boitcoind, I obtain a target of 00000000000000000000000000000000000000000000002f931d000000000000. I am not sure what preparatory processing I need to do on this value before comparing it to my hash. My miner will take longer than a billion year to find a hash with 0000000000000000000000000000000000000000000000 leading zeros. Therefore I assume it has to be processed somehow.


Code:
./bitcoind getwork
{
    "midstate" : "48d2cf8bf3e3cd13e69656d4aca930bc30ba1db0440dfcedbe2df42a99460042",
    "data" : "000000017d56792f3c95c9efd8af023e4d55e8e86b3005185e623a040000017400000000a76209a8d888c7bee6746a22102cc3b919f77ec52ddd00d8790569b8143681c84deefec11a1d932f00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
    "hash1" : "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
    "target" : "00000000000000000000000000000000000000000000002f931d000000000000"
}

Raistlan
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
June 08, 2011, 10:59:39 AM
 #2

Here's the current target at Block Explorer: http://blockexplorer.com/q/hextarget
Code:
0000000000001D932F0000000000000000000000000000000000000000000000
So it looks like it is Little Endian, and if you operate on Big Endian data, you'll want to reverse it, byte by byte.
ahtremblay (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


Live Stars - Adult Streaming Platform


View Profile
June 08, 2011, 07:17:10 PM
 #3

Wait. This is the target for finding a full block? I thought the getwork function returned a easier problem.

foo
Sr. Member
****
Offline Offline

Activity: 409
Merit: 250



View Profile
June 09, 2011, 10:14:42 AM
 #4

Wait. This is the target for finding a full block? I thought the getwork function returned a easier problem.
bitcoind returns the current network difficulty. You need pool software to get difficulty 1.

I know this because Tyler knows this.
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!