user103208: 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?

user7272: 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.

103208: <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>
 7272: <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>
