Segregated Witness
From CryptoWiki
Basics
- Segregated Witness aka SegWit
- Implemented in Bitcoin.
- Was put forth by Blockstream
- Segregated Witness is described across five BIPs: 141, 142, 143, 144, and 145. BIP141 describes SW in general. BIP142 describes the format for native pay-to-witness-public-key-hash (P2WPKH) and pay-to-witness-script-hash (P2WSH) addresses. BIP143 goes into the detail of transaction verification in SW, and how this solves the quadratic signature hashing. BIP144 discusses the changes to the network messages as a result of SW. Finally BIP145 covers changes to the getblocktemplate JSON-RPC call for the bitcoin core client.
- “It removes the signatures (witness) from the inputs of a txn, instead putting it into a special ‘extension’ section of the block. Where the signature used to be, it will just put a dummy empty string”.
- It’s outputs are marked as ‘anyone can spend’. Which means non-upgraded miners can technically try to steal the coins in any segwit txn. This is why they need 95% support of the miners to agree not to do this. (by running segwit enabled clients)
- It gives a discount to witness data, it gets a 75% discount in the fees/byte calculation. This is the ‘fudge’ to get effectively more txns in the same 1mb blocks.
Critiques
- List of posts against SegWit can be found here.
Usage
- Gemini exchange has announced (4-2019) full support of deposits and withdrawals for SigWit, becoming the first major exchange to add the 2017 Bitcoin upgrade.
- From Our Network (29-2-2020):
"SegWit was introduced in August 2017. Since then, SegWit usage has increased every year. On January 1st, 2020, about 55% of Bitcoin transactions were using SegWit, compared to about 35% on January 1st, 2019."