Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: bitcoin-cli - how to get coinbase address from earlier blocks
by
aplistir
on 17/06/2020, 20:31:02 UTC
⭐ Merited by nc50lc (1)
What he meant is P2PK scripts are Pay-to-Public-Key (read it literally to understand  Wink).
You shouldn't derive the address based from that Public Key because the owner wont be able to spend it using the "P2PKH" script even if he has the private key.
Fast forward, 11 years later. Some of my fans are doing tribute payments. Small amounts keep coming. Through the years i accumulated over 18 bitcoins. However lots of them were made by doing a P2PKH-payment to the 1A1...DifNa address. For example:

So why can't I spent the above output when I have all the ingredients needed for prove? Genuine question, I'm sure I miss something. Also: if I can't spent these kind of outputs it would mean all these tribute transactions are unspendable (assuming thet have been paid using P2PKH transactions, not P2PK).

Well...
You can spend the extra "donations", because they are in a P2PKH address, that you DO have a private key to. The private key is the same for both P2PK and P2PKH "addresses" made from the same key.
The only difference is that P2PK address works with ONLY the one private key it was created with, but the P2PKH address works with 2^96 different private keys. So you could say the P2PK is safer in that way.

But Satoshi made the Genesis-block special. It is impossible to use the 50BTC block reward of the genesis block before all bitcoins are mined. The donated 18BTC can be used though.