Negative version of transaction using json-rpc #11561

issue dbdeadka opened this issue on October 25, 2017
  1. dbdeadka commented at 8:24 PM on October 25, 2017: none

    Hi!

    I have to ask about the strange transaction version, I get this data using bitcoin json-rpc API. If I posted this issue in another project, navigate me please certain url where I have to post my issue.

    Bitcoin-core version: bitcoind@machinename:/home/username$ bitcoin-cli -version Bitcoin Core RPC client version v0.14.2.0-gfc61c83

    OS version: Linux Ubuntu 16.04

    Problem: I try to get version of transaction with hash "c659729a7fea5071361c2c1a68551ca2bf77679b27086cc415adeeb03852e369"

    See the curl output below:

    root@machinename:/tmp# curl --data-binary '{"method":"getrawtransaction","id":"a2e8f6b0-5c03-4315-a067-050a9adb6dfc","params":["c659729a7fea5071361c2c1a68551ca2bf77679b27086cc415adeeb03852e369",1]}' "http://name==@127.0.0.1:18833" {"result":{"hex":"f0b47b9a01ecf5e5c3bbf2cf1f71ecdc7f708b0b222432e914b394e24aad1494a42990ddfc000000008b483045022100852744642305a99ad74354e9495bf43a1f96ded470c256cd32e129290f1fa191022030c11d294af6a61b3da6ed2c0c296251d21d113cfd71ec11126517034b0dcb70014104a0fe6e4a600f859a0932f701d3af8e0ecd4be886d91045f06a5a6b931b95873aea1df61da281ba29cadb560dad4fc047cf47b4f7f2570da4c0b810b3dfa7e500ffffffff0240420f00000000001976a9147eeacb8a9265cd68c92806611f704fc55a21e1f588ac05f00d00000000001976a914eb3bd8ccd3ba6f1570f844b59ba3e0a667024a6a88acff7f0000","txid":"c659729a7fea5071361c2c1a68551ca2bf77679b27086cc415adeeb03852e369","hash":"c659729a7fea5071361c2c1a68551ca2bf77679b27086cc415adeeb03852e369","size":258,"vsize":258,"version":-1703168784,"locktime":32767,"vin":[{"txid":"fcdd9029a49414ad4ae294b314e93224220b8b707fdcec711fcff2bbc3e5f5ec","vout":0,"scriptSig":{"asm":"3045022100852744642305a99ad74354e9495bf43a1f96ded470c256cd32e129290f1fa191022030c11d294af6a61b3da6ed2c0c296251d21d113cfd71ec11126517034b0dcb70[ALL] 04a0fe6e4a600f859a0932f701d3af8e0ecd4be886d91045f06a5a6b931b95873aea1df61da281ba29cadb560dad4fc047cf47b4f7f2570da4c0b810b3dfa7e500","hex":"483045022100852744642305a99ad74354e9495bf43a1f96ded470c256cd32e129290f1fa191022030c11d294af6a61b3da6ed2c0c296251d21d113cfd71ec11126517034b0dcb70014104a0fe6e4a600f859a0932f701d3af8e0ecd4be886d91045f06a5a6b931b95873aea1df61da281ba29cadb560dad4fc047cf47b4f7f2570da4c0b810b3dfa7e500"},"sequence":4294967295}],"vout":[{"value":0.01000000,"n":0,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 7eeacb8a9265cd68c92806611f704fc55a21e1f5 OP_EQUALVERIFY OP_CHECKSIG","hex":"76a9147eeacb8a9265cd68c92806611f704fc55a21e1f588ac","reqSigs":1,"type":"pubkeyhash","addresses":["1Ca5R26xpiQCwjz3aFq1fuCR3fuEe8tmjE"]}},{"value":0.00913413,"n":1,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 eb3bd8ccd3ba6f1570f844b59ba3e0a667024a6a OP_EQUALVERIFY OP_CHECKSIG","hex":"76a914eb3bd8ccd3ba6f1570f844b59ba3e0a667024a6a88ac","reqSigs":1,"type":"pubkeyhash","addresses":["1NSoVKD8ciGUUQE5rN4AMbKSg9SEXb34Q3"]}}],"blockhash":"0000000000000007bed1f8466a98c8bc483369ba611c59443895348a1f7ef8ce","confirmations":234887,"time":1378684263,"blocktime":1378684263},"error":null,"id":"a2e8f6b0-5c03-4315-a067-050a9adb6dfc"}

    Notice: "version":-1703168784 negative version.

    Expected behaviour

    positive version of transaction

    Actual behaviour

    negative version of transaction

    What version of bitcoin-core are you using?

    Bitcoin Core RPC client version v0.14.2.0-gfc61c83

    Machine specs:

    • OS: Linux Ubuntu 16.04
    • CPU: 8
    • RAM: 8 GB
    • Disk size: 800 gb
    • Disk Type (HD/SDD): SSD
  2. MarcoFalke added the label Tests on Feb 14, 2018
  3. MarcoFalke removed the label Tests on Feb 14, 2018
  4. MarcoFalke added the label Tests on Feb 14, 2018
  5. MarcoFalke commented at 1:32 PM on February 14, 2018: member

    nVersion of a transaction is int32_t. We might as well add a tiny functional test to check that the type.

  6. MarcoFalke added the label good first issue on Feb 14, 2018
  7. l2a5b1 commented at 1:15 AM on February 15, 2018: contributor

    Thanks @MarcoFalke! I took a stab at this test in PR #12436.

  8. jnewbery commented at 6:10 PM on April 4, 2018: member

    This seems to be working as expected (nVersion is signed). Closing.

  9. jnewbery closed this on Apr 4, 2018

  10. MarcoFalke removed the label good first issue on Apr 4, 2018
  11. laanwj referenced this in commit 6e67754e48 on Apr 24, 2018
  12. PastaPastaPasta referenced this in commit d771f38538 on Nov 10, 2020
  13. PastaPastaPasta referenced this in commit 4fef156283 on Dec 11, 2020
  14. PastaPastaPasta referenced this in commit 28c66ee89b on Dec 12, 2020
  15. PastaPastaPasta referenced this in commit e80c73ae16 on Dec 15, 2020
  16. PastaPastaPasta referenced this in commit 6f37eab266 on Dec 15, 2020
  17. PastaPastaPasta referenced this in commit a6e332134a on Dec 18, 2020
  18. MarcoFalke locked this on Sep 8, 2021
  19. gades referenced this in commit c472011f69 on May 4, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me