Author

Topic: [PATCH] JSON-RPC getwork (Read 5646 times)

hero member
Activity: 489
Merit: 505
October 06, 2010, 12:04:33 PM
#3
Is there a plan for this to be merged into the main tree at some point?
full member
Activity: 171
Merit: 127
October 06, 2010, 11:21:39 AM
#2
This patch is maintained now at http://github.com/m0mchil/bitcoin-getwork
full member
Activity: 171
Merit: 127
October 01, 2010, 06: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.
Jump to: