Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jonnybravo0311 on November 07, 2016, 02:42:11 PM



Title: 0.13.1 call to getblocktemplate failing on testnet
Post by: jonnybravo0311 on November 07, 2016, 02:42:11 PM
All,

Firstly, I apologize if this should have been started in another area.

I've recently started work on supporting SegWit on my pool.  As is typical, I always ensure I execute against testnet well before I put anything into the live network.

So, I fire up my trusty dev box and build 0.13.1 from source (I had 0.12.0 on the box already).  Everything goes swimmingly, and I start up the daemon.  Blocks start downloading and everything synchronizes just fine.  First call I make is
Code:
bitcoin-cli getblocktemplate

The result was rather shocking:
Code:
error code: -8
error message:
Support for 'segwit' rule requires explicit client support

I've got 0.13.1 running locally on my laptop, so I called GBT there.  Returned exactly what I was expecting.  The obvious difference between the two networks is that segwit is active on testnet, while it isn't on live.

I now called
Code:
bitcoin-cli getinfo

Rather strange message came back from that call:
Code:
{
  "version": 130100,
  "protocolversion": 70014,
  "walletversion": 60000,
  "balance": 819.87897567,
  "blocks": 1031754,
  "timeoffset": 0,
  "connections": 8,
  "proxy": "",
  "difficulty": 75262.00820103039,
  "testnet": true,
  "keypoololdest": 1459284919,
  "keypoolsize": 100,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "errors": "Warning: unknown new rules activated (versionbit 28)"
}

Is this what is preventing me from successfully building a block template, but allowing other calls to successfully execute?

Any help or guidance would be greatly appreciated.


Title: Re: 0.13.1 call to getblocktemplate failing on testnet
Post by: achow101 on November 07, 2016, 02:46:50 PM
I believe you need to run the command like this
Code:
getblocktemplate '{"rules":["segwit"]}'
The segwit rule needs to be explicit.


Title: Re: 0.13.1 call to getblocktemplate failing on testnet
Post by: jonnybravo0311 on November 07, 2016, 04:09:49 PM
That solved it.  Thanks for the help!

/locked