Bitcoin Forum
May 08, 2024, 09:16:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why does some coinbase scripts not check public key hash?  (Read 847 times)
dbbit (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


View Profile
March 14, 2014, 06:52:30 PM
Last edit: March 14, 2014, 09:56:17 PM by dbbit
 #1

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 <public-key-hash> 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?):
<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.)

I HATE TABLES I HATE TABLES I HA(╯°□°)╯︵ ┻━┻ TABLES I HATE TABLES I HATE TABLES
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715202988
Hero Member
*
Offline Offline

Posts: 1715202988

View Profile Personal Message (Offline)

Ignore
1715202988
Reply with quote  #2

1715202988
Report to moderator
12648430
Full Member
***
Offline Offline

Activity: 144
Merit: 100


View Profile
March 14, 2014, 09:56:16 PM
 #2

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.
dbbit (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


View Profile
March 14, 2014, 10:01:16 PM
 #3

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).
12648430
Full Member
***
Offline Offline

Activity: 144
Merit: 100


View Profile
March 14, 2014, 10:06:32 PM
 #4

bitcoind's built-in cpu miner uses pay-to-pubkey; external mining software can choose its own transaction type.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!