union icon indicating copy to clipboard operation
union copied to clipboard

Correctly check connection and channel states during handshakes

Open benluelo opened this issue 1 year ago • 2 comments

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)

benluelo avatar Dec 19 '24 19:12 benluelo

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?

davidscottpope-gif avatar Sep 29 '26 20:09 davidscottpope-gif

go for it :)

benluelo avatar Sep 30 '26 05:09 benluelo