1
1
Subtitle: travis-ci fails to run generate JSON-RPC method on regtest
I'm trying to setup CI process on https://travis-ci.org platform to install bitcoind and start new blockchain using regtest mode.
I want to do this to run unit tests of my applications which uses wallet data. Methods against bitcoind are working fine except the generate method which is needed to mine some bitcoins in regtest private chain.
It looks like some bitcoind/travis-ci related issue.
generatemethod is working fine in my local CI process (non-travis).- Travis-CI is working fine if I comment the
generatemethod call in CI tests.
generate method call when using travis-ci fails with the following error:
{"code":-32601,"message":"Method not found"}
bitcoin.conf:
server=1
regtest=1
gen=1
rpcuser=someuser
rpcpassword=somepass
.travis.yml:
language: r
sudo: required
before_script:
- sudo apt-add-repository ppa:bitcoin/bitcoin -y
- sudo apt-get update -qq
- sudo apt-get install bitcoind -y
r_github_packages:
- jangorecki/rbitcoind
after_script:
- cat $(find . -maxdepth 1 -name "*.Rcheck" -type d)/tests/tests.Rout
Is there any trick in setup I should use to make travis-ci capable to run CI on regtest chain, including generate method?
Leaving the build links just for reference:
- generate method commented - CI passed: https://travis-ci.org/jangorecki/rpc.generate/builds/77207297
- use generate - CI failed: https://travis-ci.org/jangorecki/rpc.generate/builds/77208666
according to the generate method reference the method should be used especially in
– jangorecki – 2015-08-25T20:47:37.123regtestmode to mine blocks instantly without the computing cost, and that feature is a must for a platform like travis-ci. If you are asking forgenerate()body see this. It just works on two CI environments: ubuntu and vm ubuntu.@jangorecki That must have been added in v0.11.0, I'm currently running v0.10.2. The release notes don't say that a
generatemethod was added, though. What version ofbitcoindare you running? – morsecoder – 2015-08-25T20:57:44.413OK, I see I have
0.10.2on travis, this is the reason of no method found. I'm using same ppa so it should get the latest version of bitcoind, isn't it? you can put info about version to your answer so I will accept it. Thanks – jangorecki – 2015-08-25T21:03:37.9631@jangorecki I guess the ppa is out of date. It's only one version out of date, at least. I have updated my answer to include version info. – morsecoder – 2015-08-25T21:09:10.567
https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin did they stop builds for ubuntu 12.04? – jangorecki – 2015-08-25T22:54:58.117
No, builds failed for 12.04, and they were never fixed. – Matt Corallo – 2015-08-26T19:38:59.810
@MattCorallo is it so difficult to make them work? this would allow any github project which uses travis-ci to run unit tests against own blockchain, quite a huge extension. – jangorecki – 2015-09-03T12:03:06.150