[bitcoin-dev] Why SegWit Anyway?

Adán Sánchez de Pedro Crespo adan at stampery.co
Tue Nov 21 13:16:48 UTC 2017


Yes.

1. SegWit transactions spend less "weight", which is limited for every
block. Base transaction data weights as much as 4x the witness data.

2. SegWit signatures can be cheaper to verify (linear instead of
quadratic). Prior to this, DoS attacks were possible by using forged
transactions including signatures which could take several minutes to
verify.

The immediate result of this is that miners can fit more transactions
into a block and at the same time spend less power building the blocks.

On 20.11.2017 19:04, Dan Bryant via bitcoin-dev wrote:
> Is there any incentive for miners to pick segwit transactions over
> non-segwit transaction.  Do they require less, equal, or more compute to
> process?
> 
> On Nov 20, 2017 11:46 AM, "Johnson Lau via bitcoin-dev"
> <bitcoin-dev at lists.linuxfoundation.org
> <mailto:bitcoin-dev at lists.linuxfoundation.org>> wrote:
> 
>     We can’t “just compute the Transaction ID the same way the hash for
>     signing the transaction is computed” because with different SIGHASH
>     flags, there are 6 (actually 256) ways to hash a transaction.
> 
>     Also, changing the definition of TxID is a hardfork change, i.e.
>     everyone are required to upgrade or a chain split will happen.
> 
>     It is possible to use “normalised TxID” (BIP140) to fix malleability
>     issue. As a softfork, BIP140 doesn’t change the definition of TxID.
>     Instead, the normalised txid (i.e. txid with scriptSig removed) is
>     used when making signature. Comparing with segwit (BIP141), BIP140
>     does not have the side-effect of block size increase, and doesn’t
>     provide any incentive to control the size of UTXO set. Also, BIP140
>     makes the UTXO set permanently bigger, as the database needs to
>     store both txid and normalised txid
> 
>>     On 21 Nov 2017, at 1:24 AM, Praveen Baratam via bitcoin-dev
>>     <bitcoin-dev at lists.linuxfoundation.org
>>     <mailto:bitcoin-dev at lists.linuxfoundation.org>> wrote:
>>
>>     Bitcoin Noob here. Please forgive my ignorance.
>>
>>     From what I understand, in SegWit, the transaction needs to be
>>     serialized into a data structure that is different from the
>>     current one where signatures are separated from the rest of the
>>     transaction data.
>>
>>     Why change the format at all? Why cant we just compute the
>>     Transaction ID the same way the hash for signing the transaction
>>     is computed?
>>
>>     -- 
>>     Dr. Praveen Baratam
>>
>>     about.me <http://about.me/praveen.baratam>
>>     _______________________________________________
>>
>>     bitcoin-dev mailing list
>>     bitcoin-dev at lists.linuxfoundation.org
>>     <mailto:bitcoin-dev at lists.linuxfoundation.org>
>>     https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>     <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>
> 
> 
>     _______________________________________________
>     bitcoin-dev mailing list
>     bitcoin-dev at lists.linuxfoundation.org
>     <mailto:bitcoin-dev at lists.linuxfoundation.org>
>     https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>     <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>
> 
> 
> 
> 
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> 

-- 
Adán Sánchez de Pedro Crespo
CTO, Stampery Inc.
San Francisco - Madrid


More information about the bitcoin-dev mailing list