2

I'm a novice to bitcoin trying to learn mining. I know that in order to get the value (header) to hash, you call Getwork. I have seen the bitcoin wiki page for it and read some relevant threads on different forums. What I want want to know is what is required before one can make a call to Getwork? Specifically the following:

  1. What URL to call with what parameters?
  2. I understand it is a REST call. Can you confirm this is so?
  3. Do you need to be registered before being able to make the call?

Please post any relevant links that might help.

3

Most miners now use Stratum, but the old getwork protocol isn't completely gone yet.

  1. The URL is the root path (/) of the server usually at port 8332, for instance http://mint.bitminter.com:8332. You can see what the data looks like here: How can I code a Bitcoin JSON-RPC "getwork" request in Java?

  2. No, this is JSON-RPC. It's an RPC-style interface, which is more or less the opposite philosophy to REST. It's not even a good RPC design as the same procedure "getwork" is used both for getting work and for returning work results.

  3. HTTP Basic Auth is used for authentication. If you are talking to bitcoind you put the user name and password in the config file. If you are talking to a pool you register at the pool.

There is some info about getwork and its various extensions at https://en.bitcoin.it/wiki/Getwork

  • +1. JSON in JSON-RPC put me off scent. Thanks for your reply. Will look into JSON-RPC. Should be okay as long as it is textual :) – bytefire Sep 8 '13 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.