Bitcoin Forum
May 02, 2024, 07:20:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [PATCH] JSON-RPC getwork  (Read 5620 times)
m0mchil (OP)
Full Member
***
Offline Offline

Activity: 171
Merit: 127


View Profile
October 01, 2010, 11:58:03 AM
Last edit: October 02, 2010, 09:23:50 AM by m0mchil
 #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.

1714677612
Hero Member
*
Offline Offline

Posts: 1714677612

View Profile Personal Message (Offline)

Ignore
1714677612
Reply with quote  #2

1714677612
Report to moderator
1714677612
Hero Member
*
Offline Offline

Posts: 1714677612

View Profile Personal Message (Offline)

Ignore
1714677612
Reply with quote  #2

1714677612
Report to moderator
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714677612
Hero Member
*
Offline Offline

Posts: 1714677612

View Profile Personal Message (Offline)

Ignore
1714677612
Reply with quote  #2

1714677612
Report to moderator
m0mchil (OP)
Full Member
***
Offline Offline

Activity: 171
Merit: 127


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: 489
Merit: 504



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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!