Why does segwit save space on the blockchain? 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?
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).