-
Notifications
You must be signed in to change notification settings - Fork 911
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
startup_regtest: configure clnrest and generate rune #6860
startup_regtest: configure clnrest and generate rune #6860
Conversation
0a58aa6
to
1dfccbb
Compare
rebased on #6857 and should now check if clnrest is running before generating runes and providing connection urls. |
lgtm. The only issue I found is that it generates a new rune each time we start the node. Even if the node already has a rune. We can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 1dfccbb
I just tried to run Everything works well with
In that second case, it seems that the node doesn't start because after disabling
|
cef53d0
to
e1ee2bd
Compare
That makes sense. I've updated it to test if clnrest loads before writing the config file. If any dependencies are missing I would expect it to fail there and we can just skip it. I'll squash these commits if this solution works for you. |
Now it also works without clnrest dependencies. But depending on how long it takes for the last node to be running, I got this message in the terminal:
This is due to the following call to wait_for_lightningd "$nodes"
active_status=$(clnrest_status "/tmp/$i-$network/log") using If I understand correctly, what you want to do in - wait_for_lightningd "$nodes"
- active_status=$(clnrest_status "/tmp/l$i-$network/log")
+ while ! $LCLI --lightning-dir=/tmp/l"$nodes"-"$network" getinfo > /tmp/null 2>&1; do sleep 1; done
+ active_status=$(clnrest_status "/tmp/l$nodes-$network/log") |
This allows use of clnrest + websocket in the regtest environment. If clnrest starts up, a rune is generated and provided along with the connection info. Also uses the snap installed bitcoind path if appropriate. Format of the start_ln output is: Commands: l1-cli, l1-log, l2-cli, l2-log, bt-cli, stop_ln, fund_nodes Node Info: l1 rest: https://127.0.0.1:3110 rune: "lgkWSp0PQK-pkbElLpjcNVQnX7yfEjouJaJHjLuW8w89OA==" l2 rest: https://127.0.0.1:3111 rune: "sUqGqkevGYG2r1e_JUiz8Me00GhtTv5-IuGk4o9Beyc9OQ==" Changelog-None
e1ee2bd
to
714de43
Compare
Rebased on latest; addressed last comment from @tonyaldon re: index for $i being out of scope/wrong. ACK 714de43 |
This configures the startup_regtest.sh nodes to enable clnrest + websocket while also providing output on their connection info (an unrestricted rune is generated as well.) Also uses the snap installed bitcoind path if appropriate.
Format of the start_ln output is:
Commands:
l1-cli, l1-log,
l2-cli, l2-log,
bt-cli, stop_ln, fund_nodes
Node Info:
l1 rest: https://127.0.0.1:3110 rune: "lgkWSp0PQK-pkbElLpjcNVQnX7yfEjouJaJHjLuW8w89OA=="
l2 rest: https://127.0.0.1:3111 rune: "sUqGqkevGYG2r1e_JUiz8Me00GhtTv5-IuGk4o9Beyc9OQ=="
Changelog-None