Author

Topic: Why does some coinbase scripts not check public key hash? (Read 868 times)

full member
Activity: 144
Merit: 100
bitcoind's built-in cpu miner uses pay-to-pubkey; external mining software can choose its own transaction type.
sr. member
Activity: 322
Merit: 250
The main benefit of using pay-to-pubkeyhash is that it allows for much shorter addresses (since a RIPEMD160 is much shorter than a pubkey); other than that it takes slightly more time and space than pay-to-pubkey. When mining, you don't need to share the address you're mining to except in the coinbase transaction itself, so there's no reason not to do it the slightly simpler way. (Historically, the reason is that pay-to-pubkey was originally the standard transaction type). The only benefit I can think of to mining to a pay-to-pubkeyhash instead of is the theoretical situation where a serious vulnerability in secp256k1 has been found; receiving via pay-to-pubkeyhash doesn't reveal your pubkey until you're in the act of spending from that address, and allows less opportunity for someone to crack your key. Of course, no one expects that to happen any time soon.

Thanks. That makes sense. So in Bitcoin I found that consistently older blocks are pay-to-pubkey and newer ones are pay-to-pubkeyhash.

In Mazacoin however I find these randomly all over the place.

Is it now generally the state of the world that pool software all use pay-to-pubkeyhash and individual -qt clients all use pay-to-pubkey? (I noticed all my solo-mined Mazacoin blocks are pay-to-pubkey for example).
full member
Activity: 144
Merit: 100
Originally, pay-to-pubkey was the standard transaction type. The main benefit of using pay-to-pubkeyhash is that it allows for much shorter addresses (since a RIPEMD160 is much shorter than a pubkey); other than that it takes slightly more time and space than pay-to-pubkey. When mining, you don't need to share the address you're mining to except in the coinbase transaction itself, so there's no reason not to keep doing it the slightly simpler way.

The only benefit I can think of to mining to a pay-to-pubkeyhash is the theoretical situation where a serious vulnerability in secp256k1 has been found; receiving via pay-to-pubkeyhash doesn't reveal your pubkey until you're in the act of spending from that address, and allows less opportunity for someone to crack your key. Of course, no one expects that to happen any time soon.
sr. member
Activity: 322
Merit: 250
The answer is probably staring me right in the face, but I'll blame it on a late night...


I notice that in some cases the Coinbase vout will require a full 'OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG' check:

E.g.
https://blockchain.info/tx/87282ec5f79d582a026f83de1e83fc1f1f7504459be9d5ec12966977379dd618


However, in other cases the Coinbase vout will just require a sig check (and a clear public key?):
OP_CHECKSIG

E.g.:
https://blockchain.info/tx/3168d7c390c411ff62102fddfc09b667f5b02bd5cb074ba790288784b831a996


What makes the difference? (i.e. is it a different mining client? Pool software vs. solo miner vs. version etc.)

Jump to: