0

I've updated to bitcoincore 0.17 and I'm trying to create a raw transaction to be signed on an offline wallet.

I'm creating a raw transaction with createrawtransaction with no inputs and the desired outputs. With the hex generated I'm using fundrawtransaction to match inputs.

Since the online wallet is watch only I need to pass includeWatching as params. Also I want to send the change amount to a different address, so I add changeAddress the the options hash. This kills the entire bitcoind process with no warnings and no log messages

This is the commands I've tried and their output:

$ bitcoin-cli createrawtransaction '[]' '{"14XbnUUvc2Kt8TrnnEG9zjF1XM2jYD1h8x":0.001}'
020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000

$ bitcoin-cli fundrawtransaction 020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000
error code: -4
error message:
Insufficient funds

$ bitcoin-cli fundrawtransaction 020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000 '{"includeWatching":true}'
{
  "hex": "02000000016c4262fe490eb44becac4d4aa37f86b4433327ffa40a00a5498006c6ec5b0b240100000000feffffff02089a03000000000017a914ab7dd53603b6b64d3851569b90eeae8f39fd9f0087a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000",
  "fee": 0.00000675,
  "changepos": 0
}

$ bitcoin-cli fundrawtransaction 020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000 '{"includeWatching":true,"changeAddress":"185pJS3yVizdE3RtXKALtVbGRv9gzzypT1"}'
error: Could not connect to the server 127.0.0.1:8332 (error code 1 - "EOF reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

How can I see the error that killed bitcoind? Am I doing something wrong?

UPDATE

After using GDB I've found that this is the problem:

bitcoind: policy/feerate.cpp:25: CAmount CFeeRate::GetFee(size_t) const: Assertion `nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max())' failed.

Thread 7 "bitcoin-httpwor" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffebfff700 (LWP 22448)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

Any hints?

6
  • That's a strange error, not sure if this will help, but what OS are you on, and how did you install bitcoind?
    – JBaczuk
    Commented Nov 1, 2018 at 19:20
  • Sorry, forgot to add. I'm using ubuntu 18.04, i've installed via apt-get. Also, if you know how to downgrade bitcoind it should work too Commented Nov 1, 2018 at 19:22
  • You can download and install whichever binaries you want to your system folders from bitcoincore.org/en/releases
    – JBaczuk
    Commented Nov 1, 2018 at 19:33
  • That's what I wan't. But I'm not that good with ubuntu. Can you point me a guide to install binaries? Commented Nov 1, 2018 at 19:48
  • Depending on which version your downgrading to, all you need to do is replace the binaries that you want (probably bitcoind and bitcoin-cli in /usr/local/bin or wherever they are installed (try running $which bitcoind to find where they are).
    – JBaczuk
    Commented Nov 1, 2018 at 19:56

1 Answer 1

2

This is a known crasher in 0.17.

You need to either:

  • downgrade to 0.16.3
  • apply the patch given in the pull request and build Bitcoin Core yourself
  • wait until 0.17.1 is released to fix the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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