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

Feature suggestion: Better inspection of closed channels #4734

Closed
urza opened this issue Aug 22, 2021 · 11 comments · Fixed by #5967
Closed

Feature suggestion: Better inspection of closed channels #4734

urza opened this issue Aug 22, 2021 · 11 comments · Fixed by #5967
Assignees
Milestone

Comments

@urza
Copy link
Contributor

urza commented Aug 22, 2021

Inspecting closed channels is currently not easy with the cli. There is some information in db, but putting it together this way is obviously not ideal.

I noticed that this was already mentioned somewhere by @vincenzopalazzo but can't find it.

Ideally I would like to be able to get this with clightning-cli somehow:

  • list closed channels and their properties (e.g. was this public or private channel)
  • type of close (mutual, unilateral)
  • who initiated closing
  • closing onchain tx id
@vincenzopalazzo
Copy link
Collaborator

Hi @urza, I started to work on one PR #4568 to add this feature, but I think now it is a good moment to put this feature in the next release with this issue #4729

It looks like already been taken, lets see what happens.

@kandycoder
Copy link

@ALL, most of the data could be made available with an optional parameter to filter the peer channels by state (and I am happy to add that to issue #4729), but there would be two caveats with that approach:

  1. after 100 blocks the channels wouldn't be reported anymore, and
  2. the onchain tx id does not currently seem to be part of the peer channel data.

What is your advice?

@vincenzopalazzo
Copy link
Collaborator

I don't remember what are the data in the database about the closed channels, maybe @cdecker can help here. Or maybe you can tell MySQL to describe the table.

@kandycoder
Copy link

kandycoder commented Aug 24, 2021

Doing the documentation changes for this, I noticed there is a "scratch" tx id which I guess would be equivalent to @urza's onchain tx id of caveat 2 above. So I think the big points are covered at least.

If I've misunderstood anything, I stand to be corrected... thanks!

@kandycoder
Copy link

It's been recommended that this be made a plugin, and the use case is such that it should list historical data (older than 100 blocks), so it's really out of scope for inclusion with issue #4729.

@cdecker
Copy link
Member

cdecker commented Sep 6, 2021

Small correction: we no longer delete entries in the channels table as far as a I can see, so it should always be possible to retrieve at least some of the information in the table. We can definitely add an option to include closed channels as well, and should likely set that to true if we filter for state=closed as well.

@kandycoder
Copy link

Thanks for the note @cdecker. I am working on a plugin that will implement a GraphQL interface for querying the data that the user is interested in, which (in light of your note) should satisfy this feature request nicely.

@urza
Copy link
Contributor Author

urza commented Apr 15, 2022

Has there been any new development? What is the best way to inspect closed channels now? One of my channels was closed and I would like to know (using CLI):

  • was it cooperative close?
  • was it initiated by my node or my peer?
  • are funds safu (onchain tx / address where my balance went)

@vincenzopalazzo
Copy link
Collaborator

There is a PR working in progress #5022 after we have this one, I will try to include also the close channels with another PR

@urza
Copy link
Contributor Author

urza commented Oct 27, 2022

Hello friends, was there some development in this area? Is there some way how to better inspect closed channels?

#4734 (comment)

@vincenzopalazzo
Copy link
Collaborator

Hope to have this land #5568 in this release and I will work on the close channel after that :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants