<p>Some of the earlier transactions on the bitcoin network use a raw public key in a p2pk script, instead of the now-common p2pkh format.</p>

<p>Only the p2pkh format is representable as an address. The raw p2pk script has no corresponding address, and must be worked with as a script directly. Some explorers and other tools will attempt to show it as either a p2sh address for the hash of that script, or as its p2pkh version, but that is not accurate to the actual on-chain data.</p>

CC BY-SA 4.0
2020-03-10T06:33:37.250Z
Moreover, if you sent money to the "address" that's generated by the blockchain explorers, the wallet in question would never see that money as it isn't looking for P2PKH scripts. It's a really bad "feature" that many of them have implemented.
Claris
CC BY-SA 4.0
2020-03-10T06:13:31.400Z
2020-03-10T06:13:31.400Z
Raghav Sood
<p>If I try to get info in genesis block, there is 1 tx:</p>

<pre><code>  "scriptPubKey": {
    "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG",
    "hex": "410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac",
    "type": "pubkey"
  }
</code></pre>

<p>bitcoin-cli decodescript gives me this address:</p>

<pre><code>{
  "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG",
  "type": "pubkey",
  "p2sh": "3BgShGBxRQrczVD6Ftj4z51FfgJ761FdSX"
}
</code></pre>

<p>However any block chain explorers show address 12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX.
The same problem with 2, 3, 4... blocks. Why?</p>

<bitcoin-cli>
bitcoin-cli decodescript wrong output
Alexander Olnev
# bitcoin-cli decodescript wrong output

(Asked by: username_0 on 2020-03-10)

If I try to get info in genesis block, there is 1 tx:

```
  "scriptPubKey": {
    "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG",
    "hex": "410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac",
    "type": "pubkey"
  }

```

bitcoin-cli decodescript gives me this address:

```
{
  "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG",
  "type": "pubkey",
  "p2sh": "3BgShGBxRQrczVD6Ftj4z51FfgJ761FdSX"
}

```

However any block chain explorers show address 12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX.
The same problem with 2, 3, 4... blocks. Why?

**Tags:** bitcoin-cli


---

## 1 answers

### Answer by username_1 on 2020-03-10. Score: 2

Some of the earlier transactions on the bitcoin network use a raw public key in a p2pk script, instead of the now-common p2pkh format.

Only the p2pkh format is representable as an address. The raw p2pk script has no corresponding address, and must be worked with as a script directly. Some explorers and other tools will attempt to show it as either a p2sh address for the hash of that script, or as its p2pkh version, but that is not accurate to the actual on-chain data.

> **Comments:**
> **username_2**: Moreover, if you sent money to the "address" that's generated by the blockchain explorers, the wallet in question would never see that money as it isn't looking for P2PKH scripts. It's a really bad "feature" that many of them have implemented.  

---

