Bitcoin Forum
September 27, 2016, 03:31:41 PM *
News: Latest stable version of Bitcoin Core: 0.13.0 (New!) [Torrent]. Make sure you verify it.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [PATCH] JSON-RPC getwork  (Read 5140 times)
m0mchil
Full Member
***
Offline Offline

Activity: 171


View Profile
October 01, 2010, 11:58:03 AM
 #1

This is a patch against SVN 159 that allows external RPC clients to ask for unsolved block data and eventually submit back a solution.

It opens the way for external bitcoin miners. If non-local RPC is used it also enables multiple-miners-to-client arrangement.

EDIT:

theymos is expressing some concerns regarding extraNonce here

There are actually many components of a block that change its hash. Let's assume the block contains only the initial (award) transaction. The hash will change if either:

     - transactions merkle hash - if you change txOUT publicKey, txIN difficulty or extraNonce
     - block time - 4 bytes that are updated every n seconds in the original client
     - block's nonce

Bitcoin is giving by default each mining thread it's unique extraNonce (to ensure different hash space). However if there are new transactions after at least 60 seconds merkle hash will change. This patch rebuilds merkle hash at each request for work because of the new extraNonce it assigns. If there are new transactions it should rebuild merkle hash anyway so I don't think this is much of a problem. Also, the external miner may change it's block time if needed - it will get back and processed/verified accordingly.

I made some tests with difficulty of 1 and generation rate was equal to the expected values.

1474990301
Hero Member
*
Offline Offline

Posts: 1474990301

View Profile Personal Message (Offline)

Ignore
1474990301
Reply with quote  #2

1474990301
Report to moderator
1474990301
Hero Member
*
Offline Offline

Posts: 1474990301

View Profile Personal Message (Offline)

Ignore
1474990301
Reply with quote  #2

1474990301
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1474990301
Hero Member
*
Offline Offline

Posts: 1474990301

View Profile Personal Message (Offline)

Ignore
1474990301
Reply with quote  #2

1474990301
Report to moderator
1474990301
Hero Member
*
Offline Offline

Posts: 1474990301

View Profile Personal Message (Offline)

Ignore
1474990301
Reply with quote  #2

1474990301
Report to moderator
m0mchil
Full Member
***
Offline Offline

Activity: 171


View Profile
October 06, 2010, 04:21:39 PM
 #2

This patch is maintained now at http://github.com/m0mchil/bitcoin-getwork

Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
October 06, 2010, 05:04:33 PM
 #3

Is there a plan for this to be merged into the main tree at some point?

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
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!