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 Request: Locking Nodes #470

Open
michaelWuensch opened this issue May 31, 2021 · 5 comments
Open

Feature Request: Locking Nodes #470

michaelWuensch opened this issue May 31, 2021 · 5 comments
Labels
enhancement New feature or request up for grabs Anyone can work on this

Comments

@michaelWuensch
Copy link

Is your feature request related to a problem? Please describe.
The new lnd v0.13.0 version changed a lot in regards to unlocking nodes.
I would like to be able to test if unlocking in my application works by locking those nodes in Polar

Describe the solution you'd like
Ideally if a node was selected in the graph, in the details panel there could be a button "lock/unlock".
To avoid password hazzle a standard password that is always "polar" could be used, as this is solely for testing purposes anyway.

If this can already be acheived with Polar, then a short answer on how to do this would also be sufficient.

@michaelWuensch michaelWuensch added the enhancement New feature or request label May 31, 2021
@jamaljsr
Copy link
Owner

jamaljsr commented Jun 1, 2021

Hey @michaelWuensch, this is a good idea. However, "locking" of the LND node isn't possible as there isn't an RPC available to lock the node (see WalletUnlocker.proto). Unlocking the wallet would be possible but I think it may make sense to handle that in the app you're building, no?

@michaelWuensch
Copy link
Author

@jamaljsr
Unlocking the wallet is indeed handled by the app I am building.
And that is exactly what I want to test. I want to see, if the unlocking handling is still working in my app.
But for now wallets in polar are never locked, therefore I cannot test it with polar.
It is true, that there is no RPC to lock a wallet. But is it maybe possible to start a node in polar in a locked way?

@jamaljsr
Copy link
Owner

jamaljsr commented Jun 1, 2021

Ah yes, it is possible to startup the nodes in a locked state. Before starting the network, right-click on the v0.13 node, go to Advanced Options, click on the Pre-fill Default Command icon, then remove --noseedbackup from the command. Now when the node starts, it will remain locked.

The only drawback to this is if the node isn't unlocked within 2 minutes, Polar will mark it as failed to startup. You can still continue using the node from your app but you wont be able to interact with it from the Polar UI.

@michaelWuensch
Copy link
Author

Okay thanks, that should work if I can setup that node.
How can I run the terminal on that node though? When I remove --noseedbackup I cannot hit the Launch Terminal Button, as the node never went online. If I can run the terminal, I should be able to do the rest.
My app does not support setting up the node, thats why I have to do that within polar/terminal.

@jamaljsr
Copy link
Owner

jamaljsr commented Jun 1, 2021

Oh right. Polar won't show you the option to open a Terminal if it thinks the node hasn't started properly. You could bypass Polar in this instance and connect directly to the docker container using a command such as:

docker-compose -f ~/.polar/networks/1/docker-compose.yml exec alice bash

The path of the compose file assumes you only have one network defined in Polar. If you have multiple, you'll need to change the 1 to a 2 or 3 based on the order that they were created. Also change alice to the name of node you want to connect to.

@jamaljsr jamaljsr added the up for grabs Anyone can work on this label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request up for grabs Anyone can work on this
Projects
None yet
Development

No branches or pull requests

2 participants