Commit Graph

13452 Commits

Author SHA1 Message Date
Rusty Russell 2042b50978 plugins/bcli: update minimum required bitcoind version.
Less than 22 is obsolete anyway, so we should increment this from 16.0 at least!

Closes: #6234
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-07 16:04:14 +09:30
ShahanaFarooqui 248b34acec docker: bitcoin and elements version update
Updated bitcoin and elements versions to 22.0.
2023-08-07 16:04:14 +09:30
Rusty Russell 91a58a0bdc channeld: don't send splice TLV fields unless negotiated.
This make ACINQ seize up, and not send revoke_and_ack.  Eventually,
this can cause a bad signature error, should payments go in both
directions, which is a separate bug, but this is the trigger.

See: #6500
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-07 15:22:38 +09:30
Christian Decker 0bf5ee6bba meta: Add the VLS team as codeowners of hsmd/hsmd_wire.csv
We use this file as a proxy for breaking changes in the signer
protocol. It may not catch all the breaking changes, but it's a
good first approximation.
2023-08-07 13:10:56 +09:30
Christian Decker f56ba464b8 meta: Remove ZmnSCPxj from codeowners 2023-08-07 13:10:56 +09:30
Dusty Daemon aa2df28faf splicing: Update documentation
Added documentation for splice_update & splice_signed and tweaked splice_init.

Added corresponding schemas for splice_* commands

Changelog-None
2023-08-07 12:38:36 +09:30
Rusty Russell 5faaa39773 docs: try to fix up readthedocs.io, so it has the latest man pages, but points to docs.corelighting.org for the rest
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-07 11:56:28 +09:30
Adi Shankara 49acafe653 random doc changes to test.
[Moved into a separate commit --RR]
2023-08-07 11:55:57 +09:30
Adi Shankara be829a1475 add workflow to sync rpc commands 2023-08-07 11:55:57 +09:30
Adi Shankara f64aaaf943 add script to sync rpc commands 2023-08-07 11:55:57 +09:30
Rusty Russell 84fe3dc940 build: more 32-bit printf fixes.
Reported-by: Shahana
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-07 11:52:40 +09:30
Rusty Russell 34b6731b82 lightningd: don't return to a default filter level if there are no per-file filters.
In this case, the user's default was info, but they specifically asked for debug
from one plugin.  Since there were no per-file filters, it set filtering to the
default level, info, and rejected it.  Since it's been explicitly filtered in,
we need to pass it at this point.

Reported-by: @wtogami
Fixes: #6503
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-06 14:37:49 +09:30
Rusty Russell be2cbe784f pytest: test for filtering bug.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-06 14:37:49 +09:30
Rusty Russell 3191ff7e32 doc: make staticbackup output autogenerated in man page.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-06 12:34:36 +09:30
Christian Decker 9074341ef6 msggen: Add `staticbackup` call to list of managed methods
Changelog-Added: cln-grpc: Added `staticbackup` support to cln-grpc
2023-08-06 12:34:36 +09:30
Christian Decker 3e14056ce0 doc: The SCB fields are hex-encoded binary TLVs, not strings
This makes them smaller when passing them over a binary-capable encoding.
2023-08-06 12:34:36 +09:30
ShahanaFarooqui 33ab1ce78b docker: Install clnrest dependencies from rquirements.txt
Changelog-None
2023-08-06 12:34:19 +09:30
ShahanaFarooqui 18b928046b plugin/clnrest: Downgrading pyln-proto versino from 23.08 to 23.5.2
Bug fix: pip install from plugins/clnrest/requirements.txt was unable to find "not yet released" pyln-proto version 23.08.
2023-08-06 12:34:19 +09:30
Dusty Daemon fb179f2d5e
splicing: Remove dependency on experimental_dual_fund
Splicing should work automatically on v1 or v2 channels so this requirement isn’t needed.

Changelog-None
[ Squashed fixup into a single commit --RR ]
2023-08-06 12:19:42 +09:30
ShahanaFarooqui 620a61ee09 makefile: py plugins installed twice with `make install`
Steps to Reproduce: Run `sudo make install` then again `sudo make install` without uninstalling plugins in between.
First command will install the plugin at `/usr/local/libexec/c-lightning/plugins/clnrest` as expected but the
second command will install it inside the first folder like `/usr/local/libexec/c-lightning/plugins/clnrest/clnrest`.

Fix: Check and delete if the folder already exists in `install-program`.

Changelog-None
2023-08-05 17:12:17 +09:30
Dusty Daemon 7c9f5e9847 renepay: Use macros instead of manual format types
Fixes 32-bit builds:

```
In file included from plugins/renepay/pay.c:5:
./plugins/renepay/pay_flow.h: In function 'fmt_payflow_key':
./plugins/renepay/pay_flow.h:54:17: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=]
   54 |                 "key: groupid=%ld, partid=%ld, payment_hash=%s",
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   55 |                 k->groupid,k->partid,
      |                 ~~~~~~~~~~
      |                  |
      |                  u64 {aka long long unsigned int}
```

etc
2023-08-04 20:33:20 +09:30
Rusty Russell 881d7efd6e wallet: don't BROKEN log id payments.total_msat is null.
This was changed by mistake in 23fafe98e3b4f4e15cdf764e1346d813d1eb8039: if
it's null we turn it into 0 (which is what the default call does, but it
does log BROKEN about it!):

```
2023-08-03T14:10:49.001Z **BROKEN** lightningd: Accessing a null column total_msat/15 in query SELECT  id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, paydescription, failonionreply, total_msat, partid, local_invreq_id, groupid, completed_at FROM payments ORDER BY id;
```

Fixes: #6501
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-04 20:31:14 +09:30
Rusty Russell 86d63a16ca doc: give an example for multifundchannel
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Closes: #4642
2023-08-04 13:01:49 +09:30
Rusty Russell 568f277835 channeld: replace `struct splice` with `struct splicing` for OpenBSD.
Since it's only for transitory splicing info, the new name makes sense.

```
cc channeld/channeld.c
In file included from channeld/channeld.c:23:
./channeld/splice.h:37:8: error: redefinition of 'splice'
struct splice {
       ^
/usr/include/sys/socket.h:140:8: note: previous definition is here
struct  splice {
        ^
```

Reported-by: @grubles
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: #6486
2023-08-03 13:43:35 +09:30
Rusty Russell a2830e22d2 CHANGELOG: Update.
Co-authored-by: Alex Myers <95372134+endothermicdev@users.noreply.github.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-03 09:05:59 +09:30
Rusty Russell 0c20cc70ab pyln-client, pyln-proto, pyln-testing: update to new versions.
I actually did this manually to send 23.08 to Pypi a few days ago, as it's
required for clnrest.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-03 09:05:59 +09:30
Rusty Russell 0f6687ec7b codex32: use "cl" instead of "ms" as our HRP.
This was strongly recommended by Russell O'Connor: the "ms" implies that
it's a BIP-32 master secret, and this is CLN specific.

If we changed the hrp to "cln" it would be better, but apparently that
means we no longer fit in a "standard billfold metal wallet" (and
our code assumes a 2-byte prefix anyway).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 16:12:32 +09:30
Rusty Russell 67e43ea868 renepay: clean up ARC_ADDITIONAL_BITS.
It's expressed in bits, but really it's clearer as a quantity, given
how it's used.

Suggested-by: @Lagrang3
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 11:40:52 +09:30
Rusty Russell 15c8a6f6fe renepay: switch from arc_t to struct arc.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 11:40:52 +09:30
Rusty Russell b793dc9224 renepay: implement an alternative to a union with bitsets.
This was actually relying on little-endian; if we want this, we need to be explicit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 11:40:52 +09:30
Rusty Russell e8b294d338 CCAN: update for base64 compile fix on ARM.
```
ccan/ccan/base64/base64.c:34:10: error: result of comparison of constant 255 with expression of type 'int8_t' (aka 'signed char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
        if (ret == (char)0xff) {
            ~~~ ^  ~~~~~~~~~~
ccan/ccan/base64/base64.c:44:57: error: result of comparison of constant 255 with expression of type 'const signed char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
        return (maps->decode_map[(const unsigned char)b64char] != (char)0xff);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
```

Reported-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 11:40:33 +09:30
Rusty Russell 1526b4e7e1 docs: document hsmtool getcodexsecret, refer to it for recover.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 08:42:50 +09:30
Rusty Russell 5900742b3a hsmtool: remove threshold arg.
It really has to be 0, since it's the complete secret.  And we didn't handle
it well, (`a` would be treated as 0, for example!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 08:42:50 +09:30
Rusty Russell 4dcd712d6e hsmtool: tighten checks for validity on getcodexsecret
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 08:42:50 +09:30
Rusty Russell e981a4f14a lightningd: pass signed tx through to close callback.
Thread the signed tx through so close's JSON return contains that,
rather than the unsigned channel->last_tx.

We have to split the "get cmd_id" from "resolve the close commands" though;
and of course, as before, we don't actually print the txids of multiple
transactions even though we may have multi in flight due to splice!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `close` returns a `tx` field with witness data populated (i.e. signed).
Fixes: #6440
2023-08-02 07:09:28 +09:30
Rusty Russell d90a185188 lightningd: clean up signing of last_tx.
Return a copy, don't sign in place then remove the signature after.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 07:09:28 +09:30
Rusty Russell 673d81adde pytest: test for bad 'tx' result from close.
We print it without the witness!

Reported-by: https://github.com/wtogami
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-02 07:09:28 +09:30
Adi Shankara aa2f4a1fa0
Fixing env reference for API key and path to doc (#6478)
* fix the env reference for the API key

* fix path to directory in the workflow file
2023-08-01 17:48:00 +05:30
Adi Shankara 572d71c50e
fix readme workflow (yet again) and test a dummy change (#6477) 2023-08-01 17:19:29 +05:30
Adi Shankara bb0286bb82
fix workflow file and test changes (#6476) 2023-08-01 13:19:29 +05:30
Shahana Farooqui 0a99f0e9cd docker: Dockerfile aarch images with pyln and clnrest
Changelog-None
2023-08-01 11:35:19 +09:30
Shahana Farooqui 59a0ed41ff docker: Dockerfile amd64 with pyln and clnrest 2023-08-01 11:35:19 +09:30
Shahana Farooqui e6a010e5fd docker: fedora builder update
- Updated Bitcoin version to 22.0
- Adding clnrest dependencies
2023-08-01 11:35:19 +09:30
Shahana Farooqui 85332f2bd4 tools: build release docker script update
tools: build release docker script update
2023-08-01 11:35:19 +09:30
Shahana Farooqui c96d0c2643 plugin/clnrest: Updated pyln version to 23.08 in requirements.txt 2023-08-01 11:35:19 +09:30
Rusty Russell 3974806e5a CI: Try not running group 2/10 UBSAN in parallel.
It's being killed with signal 143, which means docker isn't happy; too much memory consumption?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-31 21:00:22 +09:30
Dusty Daemon 0ed0a8f134 signed types: integer fix
integer was missing from the list of type conversions causing CI to fall over

ChangeLog-None
2023-07-31 21:00:22 +09:30
niftynei dd871d9e26 inflights: use ctx for making new ones
Also convert everything to an array thingy
2023-07-31 21:00:22 +09:30
niftynei 95b3943ffe contrib/startup: ignore db-updates 2023-07-31 21:00:22 +09:30
Dusty Daemon 4628e3ace8 channeld: Code to implement splicing
Update the lightningd <-> channeld interface with lots of new commands to needed to facilitate spicing.

Implement the channeld splicing protocol leveraging the interactivetx protocol.

Implement lightningd’s channel_control to support channeld in its splicing efforts.

Changelog-Added: Added the features to enable splicing & resizing of active channels.
2023-07-31 21:00:22 +09:30