Skip to content

reckless: rust rewrite - #9239

Open
daywalker90 wants to merge 20 commits into
ElementsProject:masterfrom
daywalker90:reckless-rs
Open

reckless: rust rewrite#9239
daywalker90 wants to merge 20 commits into
ElementsProject:masterfrom
daywalker90:reckless-rs

Conversation

@daywalker90

Copy link
Copy Markdown
Collaborator

Not ready for code review yet, we have not decided on some important aspects. Right now it is a drop-in replacement of the python reckless version.

Should
Fixes: #8439
Fixes: #8761
Fixes: #8775
Fixes: #8776
Fixes: #8794
and should supercede #8630

Key differences:

  • it is now a plugin only, the only use case to have a standalone binary, that i could come up with, is a broken plugin install where CLN won't start, but if you can call a binary you can uncomment a line in a config, right?
  • as a consequence, alot of options are no longer necessary and reckless-dir is a proper plugin option now
  • except for the help we always output json, so no more --json option
  • the rewrite does not adhere to the reckless schema in all places, e.g. listavailable, an array of strings is just not nice here
  • a tip function was added to tip plugin authors that have an offer in their manifest.json

@daywalker90
daywalker90 force-pushed the reckless-rs branch 2 times, most recently from 8644166 to 6889d36 Compare June 19, 2026 17:21

@vincenzopalazzo vincenzopalazzo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice to see that the manifest idea is taking over. Hope you are also using git for versioning, otherwise this would be another good thing to take from https://github.com/coffee-tools/coffee

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would be nice to reference the original reference implementation https://coffee-docs.netlify.app/support-coffee

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Would be nice to reference the original reference implementation https://coffee-docs.netlify.app/support-coffee

I was planning on giving full credit for the manifest/tip function to coffee in the README. But i want to lock down the functionality first before writing documentation.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

to save credit was also good to just include coffee, I do not think there are more features than coffee, we were also supporting ws (palanning to) to support interactive UX inside the web applications

But these days cloning is easy!

@daywalker90

Copy link
Copy Markdown
Collaborator Author

Nice to see that the manifest idea is taking over. Hope you are also using git for versioning, otherwise this would be another good thing to take from https://github.com/coffee-tools/coffee

If you mean installing a plugin with a git ref then yes, that is supported.

@vincenzopalazzo

Copy link
Copy Markdown
Collaborator

If you mean installing a plugin with a git ref then yes, that is supported.

Yeah, otherwise it's insanity! Nice, it would be nice to have two lines that reference coffee because the development died because Blockstream was moving to reckless. Referencing a good idea is what is left in this AI era, where rebuilding is easy

@madelinevibes madelinevibes added this to the v26.09 milestone Jun 22, 2026
@daywalker90
daywalker90 force-pushed the reckless-rs branch 3 times, most recently from 6658af8 to f6bbfb5 Compare July 1, 2026 17:09
@daywalker90
daywalker90 force-pushed the reckless-rs branch 5 times, most recently from 5833d8b to 853fe7d Compare July 8, 2026 15:34
@daywalker90
daywalker90 force-pushed the reckless-rs branch 4 times, most recently from f4513c8 to bf9e3e2 Compare July 14, 2026 12:39
@daywalker90
daywalker90 marked this pull request as ready for review July 14, 2026 13:11
@daywalker90
daywalker90 requested a review from cdecker as a code owner July 14, 2026 13:11
@daywalker90

daywalker90 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Some tests will fail for now because of #9283. If we decide not to fix it, i can do a workaround.

@madelinevibes madelinevibes added the QA Blockstream QA team have reproduced, or a test has been created! Look for the linked PR/Issue label Jul 17, 2026
@daywalker90
daywalker90 force-pushed the reckless-rs branch 2 times, most recently from 59f0030 to a0ca360 Compare July 21, 2026 11:04
@madelinevibes madelinevibes added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label Jul 23, 2026
let line = format!("creating venv at: {}", venv_dir.display());
logger.log(&line, LogLevel::INFO).await?;

let mut command = Command::new("python");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this command assuming the presence of python-is-python3? Couldn't we invoke python3 directly?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. Outside a venv it's best to call python3 on unix platforms.

.map(std::borrow::ToOwned::to_owned),
};

match enable_plugin(plugin.clone(), rl_plugin, install_args.options, &mut logger).await {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

reckless install plugin-a plugin-b is not possible anymore, as clearly stated in the README and --help, but if a user attempts it no error is raised. Since this was possible in the old version, I feel like we should somehow enforce this new behaviour, or at least raise an error if attempted.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

A second plugin name is currently not distinguishable from a config flag, since we don't require plugin config options to prefix with something like --. That is why you don't see an error on a command like you wrote. It will try to install plugin-a with the boolean flag plugin-b which at the end will fail since no such option exists in the plugin-a manifest:

l1-cli reckless install summary historian
...
"INFO: plugin installed: /tmp/l1/reckless/summary/summary.py",
"WARNING: option historian not found in manifest",
"WARNING: summary failed to start, it may require options, read the logs!"

Shahana said, that breaking with old reckless input/output format was ok since nobody really used it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

alright, then I guess the docs mentions are enough.

daywalker90 and others added 20 commits August 14, 2026 16:17
Changelog-Changed: reckless: complete rewrite with new subcommands `listinstalled` and `tip`. Replaced `search` with `listavailable`.
If the timestamp of the python file does not differ after an update
it will load the bytecode of the old version. We remove the pycache
to make sure this does not happen. Mostly a test environment issue as
in practive the timestamps should always differ.
After ElementsProject@fce9d6e
we can now use it.

Also fix writing flag options to config file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Blockstream QA team have reproduced, or a test has been created! Look for the linked PR/Issue Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

4 participants