When cooperation breaks down, it is possible to finalize a state channel without requiring on-demand cooperation of all participants. This is the so-called 'sad' path to finalizing a channel, and it requires a supported (but
isFinal = false) state(s) being submitted to the chain.
forceMove function allows anyone holding the appropriate off-chain state to register a challenge on chain. It is designed to ensure that a state channel can progress or be finalized in the event of inactivity on behalf of a participant (e.g. the current mover).
States and signatures that imply a support proof are submitted (in an optimized format), and once relevant checks have passed, an
outcome is registered against the
channelId, with a finalization time set at some delay after the transaction is processed. This delay allows the challenge to be cleared by a timely and well-formed respond or checkpoint transaction. We'll get to those shortly. If no such transaction is forthcoming, the challenge will time out, allowing the
outcome registered to be finalized. A finalized outcome can then be used to extract funds from the channel (more on that below, too).
The challenger needs to sign this data:
in order to form
challengerSig. This signals their intent to forceMove this channel with this particular state. This mechanism allows the forceMove to be authorized only by a channel participant.
We provide a handy utility function
signChallengeMessage to form this signature.