Bitcoin Forum
June 20, 2018, 06:18:24 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to calculate the target from getwork function?  (Read 914 times)
ahtremblay
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"
}

1529475504
Hero Member
*
Offline Offline

Posts: 1529475504

View Profile Personal Message (Offline)

Ignore
1529475504
Reply with quote  #2

1529475504
Report to moderator
1529475504
Hero Member
*
Offline Offline

Posts: 1529475504

View Profile Personal Message (Offline)

Ignore
1529475504
Reply with quote  #2

1529475504
Report to moderator
1529475504
Hero Member
*
Offline Offline

Posts: 1529475504

View Profile Personal Message (Offline)

Ignore
1529475504
Reply with quote  #2

1529475504
Report to moderator
The World's Betting Exchange

Bet with play money. Win real Bitcoin. 5BTC Prize Fund for World Cup 2018.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
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
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:  

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!