go-nitro icon indicating copy to clipboard operation
go-nitro copied to clipboard

Protect against `isFinal` attack.

Open geoknee opened this issue 2 years ago • 0 comments

If a counterparty sends us an isFinal=true state, they can check out with that state at any time if they get all the countersignatures.

I think there are two protection mechanisms:

  1. Check all incoming states and refuse to countersign an isFinal=true state unless doing so under the context of running a directdefund or virtualdefund protocol.
  2. If we get such a state is some other context, follow the usual rules for closing a channel (as if receiving a CloseChannel request). i.e. reject existing objective, spawn a direct/virtualdefund objective.

https://docs.statechannels.org/protocol-tutorial/0070-finalizing-a-channel/#on-chain-calling-conclude

geoknee avatar Jul 14 '23 13:07 geoknee