Commit Graph

20 Commits

Author SHA1 Message Date
Christian Decker 1621c6216f rs: Fix the manifests for publication 2023-10-26 15:51:07 +02:00
Tony Aldon 7bea339f2f cln-grpc: do not generate cerficates when no autostart.
Changelog-None
2023-10-13 10:25:36 +02:00
Christian Decker 8e2e7b1c51 rs: Bump crate versions before publishing
Changelog-None
2023-08-28 11:19:30 +02:00
Christian Decker 23088911f7 grpc: The plugin needs to use the `server` feature on `cln-grpc` 2023-06-01 13:41:21 +09:30
Christian Decker 5ed6f618b3 rust: Bump the versions of cln-rpc, cln-grpc, cln-plugin and grpc-plugin
We haven't uploaded the new v23.05 version just yet, and this includes
a couple of bugfixes that happened since too.
2023-05-30 10:06:10 +09:30
Christian Decker 97de4f8e0f grpc: make the mTLS private keys user-readable only
Fixes #6064
Reported-by: denis2342 <@denis2342>

Changelog-Changed: grpc: The mTLS private keys are no longer group-readable
2023-03-24 00:23:43 +00:00
Christian Decker 465d9121bf rs: Bump crate versions for publication 2022-12-22 15:42:12 +01:00
Christian Decker 8e75232205 rs: Update outdated dependencies
This commit updates outdated dependencies and hangs all
bitcoin-related dependencies off of the `bitcoin` crate, using its
re-exports. This means that as long as the bitcoin crate matches, all
of its dependents will also match.

Changelog-None
2022-12-22 15:42:12 +01:00
Christian Decker 64aa42e85b doc: Add a readme to the `cln-grpc` proxy
These are some common questions that come up from time to time, so
let's make sure we address them.
2022-11-25 16:06:41 +01:00
Christian Decker 8898511cf6 cln-plugin: Defer binding the plugin state until after configuring
We had a bit of a chicken-and-egg problem, where we instantiated the
`state` to be managed by the `Plugin` during the very first step when
creating the `Builder`, but then the state might depend on the
configuration we only get later. This would force developers to add
placeholders in the form of `Option` into the state, when really
they'd never be none after configuring.

This defers the binding until after we get the configuration and
cleans up the semantics:

 - `Builder`: declare options, hooks, etc
 - `ConfiguredPlugin`: we have exchanged the handshake with
   `lightningd`, now we can construct the `state` accordingly
 - `Plugin`: Running instance of the plugin

Changelog-Changed: cln-plugin: Moved the state binding to the plugin until after the configuration step
2022-09-25 15:13:12 +02:00
Christian Decker 1efa5c37be cln-plugin: Notify waiting tasks if the lightningd connection closes
This is usually a signal that lightningd is shutting down, so notify
any instance that is waiting on `plugin.join()`.

Changelog-Fixed: cln-plugin: Fixed an issue where plugins would hang indefinitely despite `lightningd` closing the connection
2022-07-21 14:19:06 +09:30
Christian Decker b359a24772 cln-plugin: Handle --help invocations better
We now have ternary outcomes for `Builder.configure()` and
`Builder.start()`:

 - Ok(Some(p)) means we were configured correctly, and can continue
   with our work normally
 - Ok(None) means that `lightningd` was invoked with `--help`, we
   weren't configured (which is not an error since the `lightningd` just
   implicitly told us to shut down) and user code should clean up and
   exit as well
 - Err(e) something went wrong, user code may report an error and exit.
2022-04-11 15:20:32 +09:30
Christian Decker 8717c4e5a2 cln-grpc: Add midstate between configuration and replying to init
This is a bit special, in that it allows us to configure the plugin,
but then still abort startup by sending `init` with the `disable` flag
set.
2022-04-10 14:16:35 +09:30
Christian Decker 9826402c99 cln-grpc: Do not exit if grpc-port is not set
Exiting doesn't mesh well with builtin plugins, so just sit there and
do nothing

Changelog-None
2022-04-10 14:16:35 +09:30
Christian Decker 09ee28cb51 cln-grpc: Do not start unless a `grpc-port` is specified
For now we don't want to autostart.

Suggested-by: Rusty Russell <@rustyrussell>
2022-03-30 12:15:55 +10:30
Christian Decker bf7ad86ef2 cln-grpc: Rename the grpc plugin and binary
Suggested-by: Rusty Russell <@rustyrussell>
Changelog-Added: plugins: `cln-grpc` first class GRPC interface for remotely controlling nodes over mTLS authentication
2022-03-30 12:15:55 +10:30
Christian Decker dd66c85fcb grpc-plugin: Make the grpc port to listen on configurable
Changelog-Added: cln-grpc-plugin: The plugin can be configured to listen on a specific port using the `grpc-port` option
2022-03-30 12:15:55 +10:30
Christian Decker 647ed6a8c8 cln: Add grpc port as configurable option 2022-03-30 12:15:55 +10:30
Christian Decker 27e468d2ae grpc-plugin: Generate mTLS certificates and use them in grpc 2022-03-30 12:15:55 +10:30
Christian Decker a17edeb839 cln-grpc-plugin: Add basic grpc-plugin 2022-03-30 12:15:55 +10:30