I've had a hard time finding a good source online that explains segwit. I've read the basic idea is to store the scriptSigs separately as the scriptSig is potentially malleable, and then compute the txid without the scripSig. But the scriptSig still needs to be somewhere on the blockchain, so how does this save space?
-
2It doesn't. See bitcoin.stackexchange.com/q/52196/208– Pieter WuilleCommented May 3, 2017 at 5:11
-
I don't get it. It sounds like you're putting the scriptSig in a separate place you're not calling a block, but still using the same amount of space. Why not just keep it in the block, and just compute the txid ignoring the scriptsig to get the non-malleability advantage?– relGCommented May 3, 2017 at 9:20
-
1Softforks are not a holy grail. A softfork that freezes some specific person's coins would be a very bad thing. But what you're saying is an overstatement: old nodes indeed can't fully verify spends from segwit outputs, but they also don't care about them.– Pieter WuilleCommented May 3, 2017 at 15:18
-
2See segwit.org/on-the-security-of-soft-forks-2c0a00077399– Pieter WuilleCommented May 3, 2017 at 15:24
-
1Does this answer your question? Is SegWit a blocksize increase or more efficient use of blockspace?– Antoine PoinsotCommented Sep 4, 2020 at 23:08
|
Show 2 more comments
1 Answer
It doesn't save space, as it still stores the witness data somewhere, but it allows the blocks (according to some canonical definition of "block") to increase in a subtle manner while being a soft-fork instead of a hard-fork (this basically means it doesn't break compatibility with previous Bitcoin clients).