-
Notifications
You must be signed in to change notification settings - Fork 19
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
Closing a ledger channel too early silently fails #883
Comments
This is similar to #744 where we receive a message to start a new objective before we're ready. In this particular case we also swallowed the error so it wasn't apparent that the objective had failed. |
What do you think is the correct behaviour of Here's one suggestion: Option 1
This way, we can still detect inactivity on the Option 2Stick with the existing behaviour but surface the error instead of swallowing it. Then the "user" needs to keep trying until they successfully spawn the objective. This means more boilerplate for the consuming application to write, and I think this option is probably just avoiding the bigger problem. |
For the short term (and maybe medium term?) solution I think the client reporting an error is sufficient enough. I think the client would only run into this if they're attempting to close a ledger channel before they're done using it so it's easy to avoid. In the testground test we weren't properly waiting for virtual defund objectives so that explains why we ran into this. Longer term I think something like your option 1 makes sense. It would be nice to apply this to virtual defunding as well to address #744. My preference would be create a new issue to implement option 1 and tackle that later.
I wonder the best way to tackle this. Maybe something similar to channel ownership we already do in the |
Decision in standup today: For now we will generate an error when this happens (we don't expect it often but we can't rule it out). We will save the longer -term solutions for a future time. |
Currently if we attempt to start a
DirectDefund
objective but there are running guarantees in the ledger channel we return an error.However we swallow that error in the engine. This means if a someone calls
client.CloseLedgerChannel
too early the objective silently fails. To the caller ofclient.CloseLedgerChannel
it looks like the API succeeded (since the API returns an objective id) but in reality the objective doesn't even get created!The text was updated successfully, but these errors were encountered: