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

ensureRegistered: ensureRegistered may not detect channel registration #207

Closed
matthiasgeihs opened this issue Sep 16, 2021 · 0 comments · Fixed by #208
Closed

ensureRegistered: ensureRegistered may not detect channel registration #207

matthiasgeihs opened this issue Sep 16, 2021 · 0 comments · Fixed by #208

Comments

@matthiasgeihs
Copy link
Contributor

matthiasgeihs commented Sep 16, 2021

Location

client/adjudicate.go

Problem

func ensureRegistered currently tries determines whether a channel is registered by checking whether a registered event is seen on the event subscription. However, since our subscription only returns the latest event, it may miss the registered event. In particular, it may see a ProgressedEvent or a ConcludedEvent, but not the corresponding RegisteredEvent, and in such a case will not detect the channel as registered.

(This, by the way, shows a downside of our subscription logic. I think it is worth discussing what are actually the benefits of only returning the latest events. At the moment I rather see disadvantages, namely a more complex implementation and potential problems in usage as described above.)

Proposal

To ensure that a registered channel is detected even if the RegisteredEvent is not the latest event on the subscription, we should additionally check for ProgressedEvent and ConcludedEvent.

This was referenced Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant