Why do we have P2WPKH and P2WSH? Why not just have P2WSH where the script hash needs to include OP_CHECKSIG? Why make P2WPKH run OP_CHECKSIG implicitly by the protocol?
pull down to refresh
10 sats \ 1 reply \ @netstatic 16 Dec 2023
A P2WPKH takes up 3 bytes less than a P2PKH output (22 bytes vs 25 bytes) and is 12 bytes less than the 34 bytes needed for P2WSH (which needs the version byte, the push data, and the 32 byte hash). A lower size means a lower threshold of required fees and this helped incentive the usage of spending to P2WPKH over P2PKH (whereas if they only had P2WSH, it would be cheaper to spend to a P2PKH output).
https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki
reply
0 sats \ 0 replies \ @katsu OP 17 Dec 2023
I thought it might have something to do with size but didn't think about comparing the size with P2PKH to see if there were any other incentives. Thank you for explaining this.
reply
0 sats \ 0 replies \ @TNStacker 16 Dec 2023
Strong question from a beginner!
https://m.stacker.news/8364
reply