<p>This is a pay-to-pubkey (P2PK) script, where the transaction contains the destination public key itself. These were common in the early days of Bitcoin, and were originally the type of script that would be created by default by miners (see <a href="https://bitcoin.stackexchange.com/questions/32639/why-does-the-default-miner-implementation-use-pay-to-pubkey/32642">Why does the default miner implementation use pay-to-pubkey?</a>), though nobody seems to know why this was chosen.</p>

<p>Nowadays the norm is to use a pay-to-pubkey-hash (P2PKH) script, which as you know contains the hash160 of the public key, rather than the key itself.  You can note that such a script looks different, e.g.</p>

<pre><code> DUP HASH160 PUSHDATA(20)[536ffa992491508dca0354e52f32a3a7a679a53a] EQUALVERIFY CHECKSIG 
</code></pre>

<p>Blockchain.info is taking the pubkey from the transaction, computing its hash, and converting it to a base58 address.  This is just a convenience for the user, so that one can think of either P2PK or P2PKH transactions as crediting an "address".  So Satoshi could use the same private key to spend a P2PKH transaction sent to the address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, as to spend the genesis coinbase transaction (disregarding the fact that it actually <a href="https://bitcoin.stackexchange.com/questions/10009/why-can-t-the-genesis-block-coinbase-be-spent">can't be spent at all</a>).</p>

CC BY-SA 3.0
2017-09-07T13:24:53.050Z
2017-09-07T13:24:53.050Z
Nate Eldredge
<p>Accordingly to blockchain.info, the first bitcoin transaction ever spends 50 BTC to the address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.</p>

<p>The pubkey script of that transaction is</p>

<pre><code>PUSHDATA(65)[04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f] CHECKSIG'
</code></pre>

<p>The hash160 of 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa is 62e907b15cbf27d5425399ebf6f0fb50ebb88f18, but I don't see any occurrences of it in pubkey script above (yes, I'm aware about endianness issues). How could Blockchain.info ever know that an output of that transaction is 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?</p>

<genesis-block>
How we decode output address from Bitcoin genesis transaction
vdudouyt
# How we decode output address from Bitcoin genesis transaction

(Asked by: username_0 on 2017-09-07)

Accordingly to blockchain.info, the first bitcoin transaction ever spends 50 BTC to the address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.

The pubkey script of that transaction is

```
PUSHDATA(65)[04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f] CHECKSIG'

```

The hash160 of 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa is 62e907b15cbf27d5425399ebf6f0fb50ebb88f18, but I don't see any occurrences of it in pubkey script above (yes, I'm aware about endianness issues). How could Blockchain.info ever know that an output of that transaction is 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?

**Tags:** genesis-block


---

## 1 answers

### Answer by username_1 on 2017-09-07. Score: 3 | Accepted answer

This is a pay-to-pubkey (P2PK) script, where the transaction contains the destination public key itself. These were common in the early days of Bitcoin, and were originally the type of script that would be created by default by miners (see [Why does the default miner implementation use pay-to-pubkey?](https://bitcoin.stackexchange.com/questions/32639/why-does-the-default-miner-implementation-use-pay-to-pubkey/32642)), though nobody seems to know why this was chosen.

Nowadays the norm is to use a pay-to-pubkey-hash (P2PKH) script, which as you know contains the hash160 of the public key, rather than the key itself. You can note that such a script looks different, e.g.

```
 DUP HASH160 PUSHDATA(20)[536ffa992491508dca0354e52f32a3a7a679a53a] EQUALVERIFY CHECKSIG 

```

Blockchain.info is taking the pubkey from the transaction, computing its hash, and converting it to a base58 address. This is just a convenience for the user, so that one can think of either P2PK or P2PKH transactions as crediting an "address". So Satoshi could use the same private key to spend a P2PKH transaction sent to the address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, as to spend the genesis coinbase transaction (disregarding the fact that it actually [can't be spent at all](https://bitcoin.stackexchange.com/questions/10009/why-can-t-the-genesis-block-coinbase-be-spent)).


---

