0

I found this script: https://github.com/jgarzik/pyminer

But it uses getwork RPC call, which resulting me this:

error code: -32601
error message:
Method not found

From https://en.bitcoin.it/wiki/Getblocktemplate:

It supercedes the old getwork mining protocol.

Does it mean that getwork is no longer an option for miners? If so, how do I solo mine with getblocktemplate?

I never worked with this protocol, but from what I read on wiki, it apparently forces me to connect to pools. My task is to do solo mining by all means.

Could you please provide or refer to example Bitcoin RPC call, that would:

  1. Get a job to mine
  2. Send mined block hash with all the mined info (nonce, etc.)

If possible, please, do not refer me to third-party software like bfgminer, etc. I'm implementing my own miner, and I need to know RPC calls to do it.

0

Unfortunately, the information presented on Bitcoin Wiki is misleading. All I had to do is to call getblocktemplate with

{
  rules: ["segwit"]
}

JSON object (it happened to be crucial to pass exactly a JSON object, not a string). And for the work completion all I needed to do is to send submitblock request.

Hope it helps someone who's also struggling to find any info about solo mining with Bitcoin RPC.

1
  • what to do with the data from getblocktemplate ? I could not find any code that makes use of the output. libblkmaker is severely outdated Apr 24 at 20:53

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.