segregated witness – Can The Redeem Script Consist Of Only one Public Key In P2SH Transactions:

Home » segregated witness – Can The Redeem Script Consist Of Only one Public Key In P2SH Transactions:

Earlier than the adoption of BIP16: Pay to Script Hash, multisig was doable, however solely within the type of naked outputs. The multisig can be straight outlined within the ScriptPubKey (the output script). This had three disadvantages. There was no handle customary for encoding these versatile constructions, the ensuing large output script needed to be paid for by the sender however was for the advantage of the receiver, and the large output script would additionally trigger the UTXO can be a lot bigger than different UTXOs, which then would should be saved by all full nodes till it obtained spent.

BIP16 launched a stage of indirection. As a substitute of straight encoding the situation script within the ScriptPubKey, the ScriptPubKey accommodates a P2SH Program which commits to 1 particular Redeem Script through a hash of it. The ScriptSig (the enter script) gives the precise spending situations within the type of the Redeem Script (matching the hash dedication within the output), and the script arguments to fulfill the Redeem Script.

The Redeem Script can include any legitimate Script expression, together with one which requires solely the signature of a single key to spend. This development can be much less blockspace environment friendly than utilizing a single-sig output sort within the first place, although.

For the reason that P2SH Program at all times had a set size, it was simple to make an handle customary for it, and the price of the outputs was not as burdensome.

enter image description here

About 35% of all transaction outputs at this time are P2SH outputs with the bulk encoding wrapped segwit outputs. We’ve got extra blockspace environment friendly output varieties now. Utilizing certainly one of P2WPKH, P2WSH, and P2TR it might be capable to obtain any equal situation script utilizing much less blockspace.

Leave a Reply

Your email address will not be published.