Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Risk of conflicting channel states #380

Open
matthiasgeihs opened this issue Oct 14, 2022 · 0 comments
Open

Risk of conflicting channel states #380

matthiasgeihs opened this issue Oct 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@matthiasgeihs
Copy link
Contributor

Location

Package client

Problem

Consider the situation where two clients propose an update to each other at the same time. The following will happen:

  1. Clients will have locked their channel before sending update proposal.
  2. Clients receive update from other client, but need to wait until channel unlocked.
  3. Update proposal lock will eventually time out and be released.
  4. Update proposal will now be processed.
  5. Potentially both clients could now accept the update from the other client, and thereby end up in conflicting states.

Proposal

We must be able to detect the situation where we are signing a state with the same version but different content. In this case, we should probably reject signing. This can be done in channel/machine.go; fn machine.Sig. If such a situation arises, we probably want to settle the channel afterwards, as we will probably not be able to continue updating the state.

In the future, we can also look for how to resolve the situation with a dedicated protocol. For example, we could raise the detected inconsistency and engage in a protocol that decides with which state to continue.

@matthiasgeihs matthiasgeihs added the bug Something isn't working label Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant