what would be the problem if both peers try to re-establish a channel with a non-final but mutually-agreed state? should they be able to restablish? (at the moment they can’t, it seems the node expects they to have the last state it had).
you can get a proof of inclusion for accounts and contracts. This PoI will have the very same root hash as the latest co-authenticated channel transaction
Regarding the question for re-establishing a channel with another different state that is not the very latest one according to the node - it makes perfect sense, I neither see a reason to forbid it, nor I see how it could be enforced in any way. From a tech perspective - we want participants to be able to take their state from Node1, migrate it to Node2 and re-establish from Node2. With this in mind, Node2 has no notion if the state that it received was really the very latest one or rather a mutually agreed one. From a greater perspective - this is not a decision for the node to make in the first place - our priority is for participants to be in full control of their data and to make educated decisions about it. It is just that we haven’t even started working on migration of state from Node1 to Node2 and this will not be implemented for the Lima hard fork. To answer your question:
what would be the problem if both peers try to re-establish a channel with a non-final but mutually-agreed state?