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

Much more powerful check command, and new recover command #6772

Merged
merged 8 commits into from
Oct 26, 2023

Conversation

rustyrussell
Copy link
Contributor

Closes: #6616

With a fairly simple sweep, I could make check powerful enough that check recover does what the proposed recover-possible command was for. Overall, really happy with this change!

So now, you can get a node to recover through the RPC api, great for front-ends like RTL, Zeus, etc.

@rustyrussell rustyrussell added this to the v23.11 milestone Oct 14, 2023
@rustyrussell rustyrussell requested a review from cdecker as a code owner October 14, 2023 05:08
@rustyrussell rustyrussell force-pushed the guilt/recover-json branch 2 times, most recently from 13d668e to d9028e3 Compare October 20, 2023 00:41
@rustyrussell rustyrussell force-pushed the guilt/recover-json branch 2 times, most recently from ff10663 to d1cae99 Compare October 23, 2023 11:33
```
**BROKEN** connectd: dev_report_fds: 5 open but unowned?
```

Signed-off-by: Rusty Russell <[email protected]>
…cking.

We often want to do more parameter checks after param(), so allow a
new param_check(), with the proviso that the caller needs to also return
command_check_done() after other checks if command_check_only(cmd) is true.

Signed-off-by: Rusty Russell <[email protected]>
… write to db.

Put an assertion inside db.c, and run every command we do (in testing) through
a `check` variant.

I inserted a deliberate bug (made addpsbtoutput call wallet_get_newindex()
before returning when running `check`, and indeed, backtrace as expected.

Signed-off-by: Rusty Russell <[email protected]>
We already do this in param_invstring now.

Signed-off-by: Rusty Russell <[email protected]>
This makes `check` much more thorough, and useful.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Added: JSON-RPC: `check` now does much more checking on every command (not just basic parameter types).
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Added: Config: `--recover` can take a 32-byte hex string, as well as codex32.
Changelog-Added: JSON-RPC: `recover` command to force (unused) lightningd node to restart with `--recover` flag.
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I like the added check functionality and test coverage.

ACK 598c809

@rustyrussell rustyrussell merged commit 13fec8d into ElementsProject:master Oct 26, 2023
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recover command so front-ends can do node recovery
2 participants