1

I have two client Bitcoin, 0.17.0 and 0.12.0 and I want to see the difference between the same transaction. 0.17 has segwit, 0.12 doesn't have. If I do that RPC call in 0.17.0

/bin/bitcoin-cli -datadir=./datadir getrawtransaction 6b6d286189a73d1fde6710cf7d168d0414e12d7a71e156e538e101ddc05f247a true

I can see the transaction in detail. If I repeat the same call in 0.12 I can see the same result. I expected that the node (0.12) stripped field like txinwitness I use the same datadir for each node.

Why I can see this result inside vin

"scriptSig": {
        "asm": "001458f0440b4c57e6f537f519f2e991e7ee1b7bae36",
        "hex": "16001458f0440b4c57e6f537f519f2e991e7ee1b7bae36"
      },

What is 001458f0440b4c57e6f537f519f2e991e7ee1b7bae36? Another question, how can I find a P2WPKH transaction?

-- Update --

I try to add rpcserialversion=0 in one node, and when I use getrawtransaction I can see the hex without segwit elements. I can see in wiki

-rpcserialversion Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: 1)

In fact if I use verbose I can see txinwitness. txinwitness is stripped in node legacy?

  • I don't have all the version numbers in my head anymore, but you may need to go even older. Core actually implemented segwit fully for more than a year before it got activated. – Jannes Apr 23 at 12:29
  • @Jannes bitcoin.org/en/release/v0.13.1 this is the release with segwit. – monkeyUser Apr 23 at 12:32
  • That's when the soft fork was introduced, but I'm fairly confident earlier versions were already prepared to accept and parse segwit blocks. That was done on purpose so people are not forced to update once segwit got activated. – Jannes Apr 23 at 12:39
  • @Jannes thanks for your reply, I'm trying to download older by the links are broken – monkeyUser Apr 23 at 12:41
  • 1
    0.13.0 contained code for segwit but not the activation code. 0.12.0 does not have segwit. However, you should not be using the same datadir between 0.17 and 0.12. In fact, the same datadir should not work and should cause 0.12 to error on startup due to database changes that happened in 0.15. The fact that it doesn't indicates that you are not actually running 0.12 when you think you are. – Andrew Chow Apr 23 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.