getrawtransaction not returning addresses for all txs #18409

issue kaplanmaxe opened this issue on March 23, 2020
  1. kaplanmaxe commented at 2:01 PM on March 23, 2020: contributor

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    getrawtransaction not returning addresses for all txs

    <!--- What behavior did you expect? -->

    Return addresses of all txs on RPC call

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    This tx will not show addresses block

    curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getrawtransaction","params":["0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098", true]}' -H 'content-type:text/plain;' http://REDACTED

    {
      "result": {
        "txid": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
        "hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
        "version": 1,
        "size": 134,
        "vsize": 134,
        "weight": 536,
        "locktime": 0,
        "vin": [
          {
            "coinbase": "04ffff001d0104",
            "sequence": 4294967295
          }
        ],
        "vout": [
          {
            "value": 50,
            "n": 0,
            "scriptPubKey": {
              "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG",
              "hex": "410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac",
              "type": "pubkey"
            }
          }
        ],
        "hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000",
        "blockhash": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048",
        "confirmations": 531576,
        "time": 1231469665,
        "blocktime": 1231469665
      },
      "error": null,
      "id": "curltext"
    }
    

    This tx will

    curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getrawtransaction","params":["996b41652355960f49d919328d7779a05aac09ff95001de12349774c91970407", true]}' -H 'content-type:text/plain;' http://REDACTED

    {
      "result": {
        "txid": "996b41652355960f49d919328d7779a05aac09ff95001de12349774c91970407",
        "hash": "a5a867046cc1a0d636bd56736f71e92994276fab724f322933ef44d78e713c96",
        "version": 1,
        "size": 290,
        "vsize": 263,
        "weight": 1052,
        "locktime": 0,
        "vin": [
          {
            "coinbase": "03440908fabe6d6d190a9a3473056b5ed4991b18554383d46005c5a0e9b7d6fcfd9eb6f269963442010000000000000021650600d8a7375fde0100d82e082f736c7573682f",
            "sequence": 0
          }
        ],
        "vout": [
          {
            "value": 12.72637075,
            "n": 0,
            "scriptPubKey": {
              "asm": "OP_DUP OP_HASH160 7c154ed1dc59609e3d26abb2df2ea3d587cd8c41 OP_EQUALVERIFY OP_CHECKSIG",
              "hex": "76a9147c154ed1dc59609e3d26abb2df2ea3d587cd8c4188ac",
              "reqSigs": 1,
              "type": "pubkeyhash",
              "addresses": [
                "1CK6KHY6MHgYvmRQ4PAafKYDrg1ejbH1cE"
              ]
            }
          },
          {
            "value": 0,
            "n": 1,
            "scriptPubKey": {
              "asm": "OP_RETURN 52534b424c4f434b3af7589972b6ab85da3b4b336c00b5132e61a3fdebea36ce35082ca04954ea1070",
              "hex": "6a4c2952534b424c4f434b3af7589972b6ab85da3b4b336c00b5132e61a3fdebea36ce35082ca04954ea1070",
              "type": "nulldata"
            }
          },
          {
            "value": 0,
            "n": 2,
            "scriptPubKey": {
              "asm": "OP_RETURN aa21a9ed42a090f9b2a1d534ded235e4d53d201a45d8911ba7ca35058fe3bb40c4693136",
              "hex": "6a24aa21a9ed42a090f9b2a1d534ded235e4d53d201a45d8911ba7ca35058fe3bb40c4693136",
              "type": "nulldata"
            }
          }
        ],
        "hex": "010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff4503440908fabe6d6d190a9a3473056b5ed4991b18554383d46005c5a0e9b7d6fcfd9eb6f269963442010000000000000021650600d8a7375fde0100d82e082f736c7573682f000000000393e6da4b000000001976a9147c154ed1dc59609e3d26abb2df2ea3d587cd8c4188ac00000000000000002c6a4c2952534b424c4f434b3af7589972b6ab85da3b4b336c00b5132e61a3fdebea36ce35082ca04954ea10700000000000000000266a24aa21a9ed42a090f9b2a1d534ded235e4d53d201a45d8911ba7ca35058fe3bb40c46931360120000000000000000000000000000000000000000000000000000000000000000000000000",
        "blockhash": "000000000000000000389683f489df4d697828df8d19374558fde545f7d80f88",
        "confirmations": 3188,
        "time": 1528511825,
        "blocktime": 1528511825
      },
      "error": null,
      "id": "curltext"
    }
    

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    System information

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    0.19.0 (seems to be working as expected on 0.18.0) with txindex=1

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    Ubuntu

  2. kaplanmaxe added the label Bug on Mar 23, 2020
  3. MarcoFalke commented at 2:56 PM on March 23, 2020: member

    p2pk does not have an address, only a scriptpubkey. This has been fixed in 6d803494b59ab5520079b6a72d97790d86d2a015

  4. kaplanmaxe closed this on Mar 23, 2020

  5. DrahtBot locked this on Feb 15, 2022
Labels

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-15 15:14 UTC

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