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

Does close all channel possible? #3499

Closed
jeffsnguyen opened this issue Feb 10, 2020 · 6 comments
Closed

Does close all channel possible? #3499

jeffsnguyen opened this issue Feb 10, 2020 · 6 comments
Labels

Comments

@jeffsnguyen
Copy link

Issue and Steps to Reproduce

Is there a command that can close all channel?

@ZmnSCPxj
Copy link
Contributor

Not yet. You could implement such in a plugin, however; listpeers for all channels in a CHANNELD_NORMAL CHANNELD_AWAITING_LOCKIN OPENINGD and close them all, then loop again (in case some other automated system opens new channels). Though if you are using any kind of autopilot plugin, you probably want to integrate this in the autopilot as well.

@m-schmoock
Copy link
Collaborator

@ZmnSCPxj @cdecker @niftynei

I don't think the command to close all channels should not be left as an 'you need a special plugin for this command' thing. Closing all channels is a basic and security relevant operation when someone decides to finish up with his node. For example if you think your host may be compromised or you want to relocate, but without using the same private keys, ...

If you agree we can open a 'good first issue', that will allow all as channel id in the close command that will basically do a loop. Remaining logic regarding the cooperative/force can stay the same, so after the first gentlemen's round there may be offline or uncooperative channels left.

@ZmnSCPxj
Copy link
Contributor

ZmnSCPxj commented Feb 26, 2020

@m-schmoock it might be useful to prevent fundchannel (via fundchannel_start) while this closing loop is on-going, to prevent automated systems like autopilots from opening channels as well.

How about a pair of new commands:


decommission
  • Closes all channels and prevents new channels from being funded (by us or by peers).
  • Channels will be force-closed.

recommission
  • Cancels a previous decommission command and allows new channels to be funded.

@m-schmoock
Copy link
Collaborator

Sounds very useful, I would add

Channels will be force-closed, if offline or uncooperative.

@m-schmoock
Copy link
Collaborator

@ZmnSCPxj I described this in detail in #3550 , this issue can be closed.

@ZmnSCPxj
Copy link
Contributor

Subsumed by #3550

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants