This set of changes simplifies the protocol used in Xayaships. In particular, instead of the loser signing a winner statement off-chain and the winner using that to close the channel on-chain, the loser can directly declare their loss on-chain to close the channel. This gets rid of one step in the off-chain game flow, and it also makes the on-chain move simpler as there is no need for a signature at all if the loser does it.
The new move to declare loss looks like this:
{"l": {"c": CHANNEL-ID}}
It is automatically sent from the channel daemon, similar to how the winner statement was done previously.
In case the loser does not declare their loss, the winner can put the final state on-chain with a resolution, which will also close the channel if the state already has a determined winner.
Since this is a hard fork and there has not been any non-testing use of Xayaships yet, this also just resets the game world to a recent block to improve syncing speed for the future.
This set of changes simplifies the protocol used in Xayaships. In particular, instead of the loser signing a winner statement off-chain and the winner using that to close the channel on-chain, the loser can directly declare their loss on-chain to close the channel. This gets rid of one step in the off-chain game flow, and it also makes the on-chain move simpler as there is no need for a signature at all if the loser does it.
The new move to declare loss looks like this:
It is automatically sent from the channel daemon, similar to how the winner statement was done previously.
In case the loser does not declare their loss, the winner can put the final state on-chain with a resolution, which will also close the channel if the state already has a determined winner.
Since this is a hard fork and there has not been any non-testing use of Xayaships yet, this also just resets the game world to a recent block to improve syncing speed for the future.
This implements #103.