3

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?

1 Answer 1

3

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?), 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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.