> I would like to understand it a bit better, as I think it applies
equally to any pre-segwit node, yes? So let's say I am running 0.13.0
and someone sends me bitcoins to a P2PKH address, but that person
previously received them to a P2WPKH address.
Yes, this applies to all non-SegWit nodes.
> If I understand correctly, my node will accept the incoming tx inputs
but obviously will not perform any segwit related validation, thus those
inputs are not fully validated.
Yes.
So you have two choices to be fully secure:
1. Validate using the new rules of the network (in other words, run a SegWit node)
2. Avoid any chain of transaction that contains a SegWit transaction
> I don't yet understand how my node
thinks they are valid at all given that it does not understand P2WPKH
address format, so either it doesn't need to, or P2WPKH is somehow
already valid.
So how softforks often work is that you make the transaction appear to be always spendable for old nodes, regardless if it really was spendable or not. This will make sure it is a softfork, the update is backwards compatible.
If it would be the other way around, if new rules that the node doesn't understand would always be invalid, it would be hardfork, which is what we're trying to avoid in the first place.
> so if
someone can point me towards a document that explains it I'd be happy to
read that.
So the witness program is encoded in a new format that old nodes do not understand.
This means that for old nodes, a number >0 will be put on the stack. When the script is done, it will be evaluated to true (because of >0) and be counted as a valid spend.
Cheers
Hampus