So I'm researching SegWit, and as far as I'm aware, it re-organizes the data structure of transactions so that the ECDSA signature is not included in the preimage of the Tx Hash.
I am also aware that it doesn't even store the ECDSA on the blockchain. But where is it even stored then and how do nodes check for the signature when validating transactions?
Additionally, why does SegWit incorporate new address formats? I can't seem to understand how this would relate to changing the Tx Structure by moving the EDCSA's somewhere else.
All answers appreciated.
As for the storing of signatures under segwit, so basically the signature is still stored IN the transaction, but it isn't hashed as part of the TxID. Instead, theres a secondary ID called a "Witness TxID" which covers the whole Tx PLUS the signature included. (Meaning that witness ID is subject to malleability)
But then how does SegWit optimize Tx weight? Doesnt the Tx size increase
– bitcash complex Mar 20 '22 at 13:57