SegWit is meant to be backward-compatible. When a SigWit block is relayed to a non-SegWit node, the witness part is stripped. If this is the case, wouldn't it be invalid since the non-SegWit node sees no witness/signature in transaction input?
So output is changed to anyone-can-spend output? If so, what prevents it to be spent by anyone not the intended recipient?
scriptPubKeyfrom UTXO output, the old non-SegWit node still needsscriptSig/witness in input, which is missing. So it will treat the transaction invalid, no? IsscriptPubKeyremoved from output, like witness from input? – sinoTrinity May 13 '18 at 21:45scriptPubKeyfor SegWit outputs can be spent using an emptyscriptSig. However, for SegWit nodes it requires a valid witness to spend. Old nodes don't know or care about witnesses, and will accept with no signature at all (that's the definition of anyone-can-spend). – Pieter Wuille May 13 '18 at 22:22