Why SegWit Anyway? [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2017-11-25T15:41:44+00:00


Summary:

Segregated Witness (SegWit) has several benefits, as discussed in a post by Adán Sánchez de Pedro Crespo. One of these benefits is that SegWit signatures can be cheaper to verify compared to traditional signatures, which were vulnerable to denial-of-service (DoS) attacks using forged transactions. These attacks could take several minutes to verify and were highly disruptive. There may be additional resources available for those interested in learning more about these types of attacks.SegWit transactions spend less "weight," allowing miners to fit more transactions into a block and use less power. They also provide reduced transaction fees, larger capacity for transactions, and increased security. While there is no direct incentive for miners to choose SegWit transactions over non-SegWit ones, artificially distorted block weight rules create an incentive for miners to select SegWit transactions and earn more fees.There have been concerns about changing the definition of TxID, as it would require a hardfork upgrade and potentially lead to a chain split if not everyone upgrades. To address this issue, BIP140 proposes using "normalized TxID" as a softfork solution to fix malleability issues without changing the definition of TxID. However, this approach makes the UTXO set permanently bigger as the database needs to store both txid and normalized txid.The discussion also touches upon the question of why the format of transactions needs to be changed in SegWit. Johnson Lau explains that different SIGHASH flags make it impossible to compute the Transaction ID the same way as the hash for signing the transaction. Changing the definition of TxID would require a hardfork change, while using BIP140 as a softfork solution avoids these complications.Another developer clarifies that SegWit does not separate signatures from the rest of the transaction data, but rather excludes them from the TXID. The serialization of SegWit on the p2p network encodes the witness field inside the transactions.In summary, SegWit offers various benefits such as cheaper signature verification, increased transaction capacity, and reduced fees. There are ongoing discussions about the best approach to address transaction malleability, with BIP140 proposing a softfork solution that avoids changing the definition of TxID. However, there are concerns about the increased size of the UTXO set with this solution. The format of transactions in SegWit has been changed to improve scalability and security, with signatures excluded from the TXID.


Updated on: 2023-08-01T22:09:44.996730+00:00