G7finance.com - Crypto Currency Updates logo G7finance.com - Crypto Currency Updates logo
2019-07-07 11:45:04

Bitcoin Transactions – Pay-to-Script-Hash?

Pay-to-Script-hash, or P2SH, are extension of the multisignature idea but reducing the burden on the Bitcoin infrastructure in terms of storage required.

A common 2-of-3 multisignature transaction can take up to five times as much space as a simple pay to address or pay to public key transaction.

They also reduce the complexity of the encoding, and shift the burden in terms of fees from the sender to the recipient – after all it’s their request to have the complexity in the conditions for the release of the funds. 

This is done by transferring the script used to spend the transactions to the <ScripSig> and making the <ScriptPubKey> hold a hash of the script. This means that a new address has been created – a script address.

 Bitcoin multisignature transaction logic

Script addresses are not made through the usual process of elliptic curve cryptography but are instead the hash of the <ScriptPubKey> of a multi signature transaction. A script address is appended with a value of five before being hashed, resulting in hashed script addresses starting with the number 3 – remember that standard Bitcoin addresses start with a 1 – with other variances for the testnet.

Structuring P2SH transactions should be done with care as an error can make the transaction unspendable. Another important point is that the details of the transaction script are not stored in the blockchain, only the hash, and therefore the creator of the transaction must keep a copy of the script or remember the route to generate the specific hash.

Read the Disclaimer : All content provided herein our website, hyperlinked sites, associated applications, forums, blogs, social media accounts and other platforms (“Site”) is for your general information only, procured from third party sources. We make no warranties of any kind in relation to our content, including but not limited to accuracy and updatedness. No part of the content that we provide constitutes financial advice, legal advice or any other form of advice meant for your specific reliance for any purpose. Any use or reliance on our content is solely at your own risk and discretion. You should conduct your own research, review, analyse and verify our content before relying on them. Trading is a highly risky activity that can lead to major losses, please therefore consult your financial advisor before making any decision. No content on our Site is meant to be a solicitation or offer