Hello, I was reading about transaction malleability and wondering if segwit solved it?
As far as my understanding of transactions in block goes, segwit's main purpose was to move signature to the different place in transaction hierarchy (from inputs section to whole new section). That effectively means that transaction ID represented by hash of transaction inputs+outputs+signature can't be tampered with anymore.
Segwit defines new output types which have their signatures moved to a new field called the witness. The witness is not part of the txid so the txid only consists of data that cannot be changed. Only transactions which spend from the segwit output types are non-malleable.