I've been decoding some transactions on Testnet, and I've found one that bitcoin-cli decoderawtransaction seems to "fail" to decode correctly.

Here's the TXID: 400bb081cfea4802a1cdd8c365c886b9ccc0da59addd3d0b1f92cf0c04870738

For example:

1) You can retrieve the raw data as normal:

bitcoin-cli getrawtransaction 400bb081cfea4802a1cdd8c365c886b9ccc0da59addd3d0b1f92cf0c04870738


2) But when you decode that same raw data, you get this TXID:

  "txid": "ec4529406c0f8fb337114a3b8e270dd6e3ec9712299daa3eb17d1fc69aa58251",
  "hash": "ec4529406c0f8fb337114a3b8e270dd6e3ec9712299daa3eb17d1fc69aa58251",
  "size": 192,
  "vsize": 192,


Why is decoderawtransaction returning this TXID?

This is a segwit transaction, and it is returning the full hash for the TXID (including the witness data). Why?


Here are some more:

  • a24cec50d5cf861d1af4b634f8ed1968c0e9484724bfef5af7f8c383605978c8 (testnet)
  • 1f3f7e0543f4eeb88d2e04a2e4d04e4ef321ebc69e58e9bfd607c7d2b565ea66 (testnet)
  • Can you include the full output of the decoderawtransaction?
    – Ava Chow
    Aug 30, 2017 at 15:16

1 Answer 1


decoderawtransaction in 0.14.2 has some issues with decoding segwit transactions. Sometimes it will decode segwit transactions as non-segwit. These should mostly be fixed in Bitcoin Core 0.15.0.


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.