But I'm talking about the scriptPubKey in the output. A normal transaction puts the public key hash here, but a coinbase transaction puts the actual public key here.
That is, the scriptPubKey of a normal transaction is:
OP_DUP OP_HASH160 addr OP_EQUALVERIFY OP_CHECKSIG
But the scriptPubKey of a coinbase transaction is different:
public-key OP_CHECKSIG
A consequence is that to spend something from a normal transaction, the next transaction will have the scriptSig:
But to spend something from a coinbase transaction, the next transaction will have the scriptSig alone without the pubkey:
As far as I can tell, there is no reason for the two transactions to be handled differently. I expect you could do either transaction either way.
My question is if there is a reason for these two different scripts? Or is it just an arbitrary implementation detail?