script – Why wrapping P2PK inside P2SH did not catch on?

on

|

views

and

comments


Name it a pay-to-public-key-script-hash (P2PKSH), like so:

  • Locking script:
    OP_HASH160 OP_DATA_20 redeem_script OP_EQUAL
  • Redeem script:
    OP_DATA_20 pubkey OP_CHECKSIG
  • Unlocking script:
    <push signature> <push redeem_script>.

Both method, wallets must course of an inventory of keys and compute a 20-byte hash and tackle corresponding to every key, however tackle era could be barely completely different.
Complete dimension of prevout + enter could be the identical in both case:

  • P2PKH tackle (25 bytes):
    0x76a914 || hash160(pubkey) || 0x88ac
  • P2PKSH tackle (23 bytes):
    0xa914 || hash160(0x21 || pubkey || 0xac) || 0x87

Spending enter script would even be barely completely different:

  • P2PKH spend (66 + 34 bytes):
    <push signature> <push pubkey>
  • P2PKSH spend (66 + 36 bytes):
    <push signature> <push (0x21 || pubkey || 0xac)>

Word: || signifies byte concatenation.

Each would require assist by functions comparable to wallets, and each would have the identical transaction (enter+output) dimension.
The P2PKSH choice has some benefit in that it might make the tackle comparatively smaller and in that it might make all 20-byte outputs indistinguishable from one another.

It would not make sense to start out utilizing this type of tackle now, however there was a window of alternative within the interval 2012-2016 so I questioned. If Bitcoin had shipped with P2SH proper from the beginning, would we now have only one tackle sort?

Share this
Tags

Must-read

‘Lidar is lame’: why Elon Musk’s imaginative and prescient for a self-driving Tesla taxi faltered | Tesla

After years of promising traders that thousands and thousands of Tesla robotaxis would quickly fill the streets, Elon Musk debuted his driverless automobile...

Common Motors names new CEO of troubled self-driving subsidiary Cruise | GM

Common Motors on Tuesday named a veteran know-how government with roots within the online game business to steer its troubled robotaxi service Cruise...

Meet Mercy and Anita – the African employees driving the AI revolution, for simply over a greenback an hour | Synthetic intelligence (AI)

Mercy craned ahead, took a deep breath and loaded one other process on her pc. One after one other, disturbing photographs and movies...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here