Correctly check connection and channel states during handshakes
We do not currently check whether a channel is open or not while processing channel and connection handshakes. This can result in double submitting handshake datagrams, which will error. These states should be asserted in the transaction batch plugin (and perhaps elsewhere?) to ensure that the stored value is the same as the expected value (i.e. on open init, the stored state is open, etc)
I checked current main: the connection handshake branches in voyager/plugins/transaction-batch/src/call.rs query state but don't validate it, and the channel branches build proofs without checking state. I'd add expected-state checks for each transition, preserve proof verification, and test stale/already-advanced states and RPC failures. Would the core team welcome a focused PR for this?
go for it :)