Commit Graph

15781 Commits

Author SHA1 Message Date
Se7enZ
79273220f4 build: Add architecture to Ubuntu repro artifacts ([#6228]).
Changelog-Changed: Added architecture identifier to Ubuntu release
artifacts. ([#6228])
2024-12-03 11:56:23 +10:30
Se7enZ
f2716092be build: Remove unused Dockerfiles, scripts and Github action. 2024-12-03 11:56:23 +10:30
Se7enZ
659d607fc4 doc: Update release checklist for CI build. 2024-12-03 11:56:23 +10:30
Se7enZ
f789f9cb21 build: Allow for signing releases without building a zip.
Adds a `--without-zip` parameter default `false` which optionally
skips the archive, to allow for signing releases from CI.
2024-12-03 11:56:23 +10:30
Se7enZ
b9b81c6918 build: Matrix strategy for release builds ([#7776]).
Also modifies the `build-release.sh` script to optionally
accept specific distribution targets for Ubuntu releases.
2024-12-03 11:56:23 +10:30
Se7enZ
c99b72da1c build: Release build automation ([#7776]).
Changelog-None
2024-12-03 11:56:23 +10:30
Rusty Russell
b5d1acee45 wire: call unknown types "UNKNOWN X" not "INVALID X".
It's freaking people out when they see things like:

```
 2024-11-11T05:26:41.281Z DEBUG ...53c-connectd: peer_out INVALID 22859
```

Fixes: https://github.com/ElementsProject/lightning/issues/7802
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: connectd: log unknown messages as "UNKNOWN" not "INVALID" to avoid freaking people out.
2024-12-02 15:09:45 +10:30
Rusty Russell
113156858b xpay: don't excees maxfee *overall*.
We were handing "maxfee" to every getroutes call, even if we had already
used some of the fees.

Reported-by: @daywalker90
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: xpay is new this release.
2024-12-02 14:31:11 +10:30
Rusty Russell
d0b470618e pytest: test for maxfee compliance.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-02 14:31:11 +10:30
ShahanaFarooqui
06d7971813 doc: Update info on 'cl-repro' script
Changelog-None.
2024-11-30 14:38:27 +01:00
Rusty Russell
b8e5b122d2 decode: don't fail to decode just because a bolt12 invoice has expired.
In fact, there are several places where we try to decode old invoices,
and they should all work.  The only place we should enforce expiration is
when we're going to pay.

This also revealed that xpay wasn't checking bolt11 expiries!

Reported-by: hMsats
Fixes: https://github.com/ElementsProject/lightning/issues/7869
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `decode` refused to decode expired bolt12 invoices.
2024-11-30 13:17:55 +01:00
Rusty Russell
14cb0574f7 pytest: test (fails) for decoding expired bolt12 invoices.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-30 13:17:55 +01:00
Rusty Russell
996fff94fd plugins/Makefile: make cln-grpc depend on ALL THE THINGS.
```
error[E0277]: the trait bound `cln_rpc::model::requests::AskrenereserveRequest: From<pb::AskrenereserveRequest>` is not satisfied
    --> cln-grpc/src/server.rs:3994:56
     |
3994 |         let req: requests::AskrenereserveRequest = req.into();
     |                                                        ^^^^ the trait `From<pb::AskrenereserveRequest>` is not implemented for `cln_rpc::model::requests::AskrenereserveRequest`, which is required by `pb::AskrenereserveRequest: Into<_>`
     |
     = note: required for `pb::AskrenereserveRequest` to implement `Into<cln_rpc::model::requests::AskrenereserveRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::AskreneageRequest: From<pb::AskreneageRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4026:52
     |
4026 |         let req: requests::AskreneageRequest = req.into();
     |                                                    ^^^^ the trait `From<pb::AskreneageRequest>` is not implemented for `cln_rpc::model::requests::AskreneageRequest`, which is required by `pb::AskreneageRequest: Into<_>`
     |
     = note: required for `pb::AskreneageRequest` to implement `Into<cln_rpc::model::requests::AskreneageRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::GetroutesRequest: From<pb::GetroutesRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4058:51
     |
4058 |         let req: requests::GetroutesRequest = req.into();
     |                                                   ^^^^ the trait `From<pb::GetroutesRequest>` is not implemented for `cln_rpc::model::requests::GetroutesRequest`, which is required by `pb::GetroutesRequest: Into<_>`
     |
     = note: required for `pb::GetroutesRequest` to implement `Into<cln_rpc::model::requests::GetroutesRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::AskrenedisablenodeRequest: From<pb::AskrenedisablenodeRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4090:60
     |
4090 |         let req: requests::AskrenedisablenodeRequest = req.into();
     |                                                            ^^^^ the trait `From<pb::AskrenedisablenodeRequest>` is not implemented for `cln_rpc::model::requests::AskrenedisablenodeRequest`, which is required by `pb::AskrenedisablenodeRequest: Into<_>`
     |
     = note: required for `pb::AskrenedisablenodeRequest` to implement `Into<cln_rpc::model::requests::AskrenedisablenodeRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::AskreneinformchannelRequest: From<pb::AskreneinformchannelRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4122:62
     |
4122 |         let req: requests::AskreneinformchannelRequest = req.into();
     |                                                              ^^^^ the trait `From<pb::AskreneinformchannelRequest>` is not implemented for `cln_rpc::model::requests::AskreneinformchannelRequest`, which is required by `pb::AskreneinformchannelRequest: Into<_>`
     |
     = note: required for `pb::AskreneinformchannelRequest` to implement `Into<cln_rpc::model::requests::AskreneinformchannelRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::AskrenecreatechannelRequest: From<pb::AskrenecreatechannelRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4154:62
     |
4154 |         let req: requests::AskrenecreatechannelRequest = req.into();
     |                                                              ^^^^ the trait `From<pb::AskrenecreatechannelRequest>` is not implemented for `cln_rpc::model::requests::AskrenecreatechannelRequest`, which is required by `pb::AskrenecreatechannelRequest: Into<_>`
     |
     = note: required for `pb::AskrenecreatechannelRequest` to implement `Into<cln_rpc::model::requests::AskrenecreatechannelRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::AskreneupdatechannelRequest: From<pb::AskreneupdatechannelRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4186:62
     |
4186 |         let req: requests::AskreneupdatechannelRequest = req.into();
     |                                                              ^^^^ the trait `From<pb::AskreneupdatechannelRequest>` is not implemented for `cln_rpc::model::requests::AskreneupdatechannelRequest`, which is required by `pb::AskreneupdatechannelRequest: Into<_>`
     |
     = note: required for `pb::AskreneupdatechannelRequest` to implement `Into<cln_rpc::model::requests::AskreneupdatechannelRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::AskrenebiaschannelRequest: From<pb::AskrenebiaschannelRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4218:60
     |
4218 |         let req: requests::AskrenebiaschannelRequest = req.into();
     |                                                            ^^^^ the trait `From<pb::AskrenebiaschannelRequest>` is not implemented for `cln_rpc::model::requests::AskrenebiaschannelRequest`, which is required by `pb::AskrenebiaschannelRequest: Into<_>`
     |
     = note: required for `pb::AskrenebiaschannelRequest` to implement `Into<cln_rpc::model::requests::AskrenebiaschannelRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::AskrenelistreservationsRequest: From<pb::AskrenelistreservationsRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4250:65
     |
4250 |         let req: requests::AskrenelistreservationsRequest = req.into();
     |                                                                 ^^^^ the trait `From<pb::AskrenelistreservationsRequest>` is not implemented for `cln_rpc::model::requests::AskrenelistreservationsRequest`, which is required by `pb::AskrenelistreservationsRequest: Into<_>`
     |
     = note: required for `pb::AskrenelistreservationsRequest` to implement `Into<cln_rpc::model::requests::AskrenelistreservationsRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::InjectpaymentonionRequest: From<pb::InjectpaymentonionRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4282:60
     |
4282 |         let req: requests::InjectpaymentonionRequest = req.into();
     |                                                            ^^^^ the trait `From<pb::InjectpaymentonionRequest>` is not implemented for `cln_rpc::model::requests::InjectpaymentonionRequest`, which is required by `pb::InjectpaymentonionRequest: Into<_>`
     |
     = note: required for `pb::InjectpaymentonionRequest` to implement `Into<cln_rpc::model::requests::InjectpaymentonionRequest>`

error[E0277]: the trait bound `cln_rpc::model::requests::XpayRequest: From<pb::XpayRequest>` is not satisfied
    --> cln-grpc/src/server.rs:4314:46
     |
4314 |         let req: requests::XpayRequest = req.into();
     |                                              ^^^^ the trait `From<pb::XpayRequest>` is not implemented for `cln_rpc::model::requests::XpayRequest`, which is required by `pb::XpayRequest: Into<_>`
     |
     = note: required for `pb::XpayRequest` to implement `Into<cln_rpc::model::requests::XpayRequest>`
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-29 09:46:17 +10:30
Rusty Russell
b9cd30bde8 CHANGELOG: update for rc2.
Somehow it was doubled up, so fixed.

Several crashes fixed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-29 09:46:17 +10:30
Alex Myers
bb30049eca gossipd: seeker: try to autoconnect with no peers
Testing autoconnect in --offline mode, the autoconnect never functions
if the seeker has not gotten out of the startup state.  This commit
overloads the  counter to start the autoconnect
attempt on the second round through the seeker_check.

Changelog-None
2024-11-28 19:02:35 +10:30
Alex Myers
b9984f876c lightningd: disable seeker autoconnect when --offline
Changelog-None
2024-11-28 19:02:35 +10:30
daywalker90
2ba05ef2b8 msggen: add missing rpc commands new to 24.11
Changelog-None
2024-11-28 17:39:26 +10:30
daywalker90
703c11515d msggen: add support for short_channel_id_dir and pubkey
Changelog-None
2024-11-28 17:39:26 +10:30
Rusty Russell
2e90f59dfe connectd: fix crash when we get an incoming conn while outgoing attempt is ratelimited.
```
Program received signal SIGSEGV, Segmentation fault.
0x000000001014e9d8 in io_set_finish_ (conn=0x0, finish=0x0, arg=0x0) at ccan/ccan/io/io.c:137
137             conn->finish = finish;
(gdb) bt
    incoming=true) at connectd/connectd.c:394
```

Fixes: #7871
Reported-by: grubles
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: broken in this release
2024-11-28 17:24:47 +10:30
daywalker90
36ad654fc1 Makefile: ensure that cln-grpc depends on msggen generated rust files.
Changelog-None
2024-11-28 16:40:02 +10:30
Rusty Russell
020bd97a5a startup_regtest: fix clnrest detection.
The .py extension gets stripped from the plugin name, so it didn't work.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-28 16:37:33 +10:30
Rusty Russell
39fbced71e contrib/startup_regtest: set grpc-port so we can start more than one.
A side-effect of having grpc start by default.  Annoyingly, if it
can't bind it simply exits, with no message, so I had to guess what
was happening.

Reported-by: @daywalker90
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-28 16:37:33 +10:30
ShahanaFarooqui
a3a33fe3be doc: Add GENERATE_EXAMPLES env
- Run with environment variable `GENERATE_EXAMPLES`
- Update cln version in getinfo example on `make update-versions`
- Added two `dev` configs, dev-no-plugin-checksum and dev-no-version-checks, to match CI listconfigs
- Changed commando rpc example from `getinfo` to `newaddr` to avoid unneccessary file updates for future builds
- Stabilized `bkpr-editdescriptionbyoutpoint`, `listclosedchannels` and `listaddresses` examples
2024-11-28 15:56:16 +10:30
ShahanaFarooqui
075f180596 doc: Add GENERATE_EXAMPLES details
Changelog-None.
2024-11-28 15:56:16 +10:30
ShahanaFarooqui
0a7956b6d4 ci: Add GENERATE_EXAMPLES env in CI & docker build script 2024-11-28 15:56:16 +10:30
ShahanaFarooqui
b8b4e7c7fd make: add repeat-doc-examples in Makefile for easier future testing 2024-11-28 15:56:16 +10:30
ShahanaFarooqui
9c3bef0da0 make: Added update-doc-examples in update-versions 2024-11-28 15:56:16 +10:30
ShahanaFarooqui
7ff6852073 pyln: Add GENERATE_EXAMPLES environment variable for Testing 2024-11-28 15:56:16 +10:30
Rusty Russell
9499d5c682 gossipd: fix crash in seeker rotation code.
Reported-by: hMsats
Fixes: https://github.com/ElementsProject/lightning/issues/7875
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: introduced in rc1
2024-11-28 15:56:05 +10:30
Alex Myers
d099f9fe5b connectd: force our own channel gossip to more peers
Large nodes were not always getting their own channel gossip out
reliably.  The number of peers we spam our own channel gossip to
is limited to save large nodes on startup, but this should be
relaxed slightly to ensure propagation.

Changelog-Fixed: Own-channel gossip is broadcast to more peers on connect.
2024-11-28 14:54:08 +10:30
ShahanaFarooqui
11b294d18e doc: pre-build CI fix due to newly tagged version
Changelog-None.
2024-11-28 08:55:18 +10:30
Rusty Russell
034d3c9628 Build: update to version 24.11rc1
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-27 06:27:50 +10:30
Rusty Russell
437042057d CHANGELOG: v24.11-rc1
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-27 06:27:50 +10:30
ShahanaFarooqui
2e30f96d92 doc: Updated section for Generating Examples in Schema 2024-11-26 21:45:19 +10:30
ShahanaFarooqui
fffafe53eb make: Add check-doc-examples in Makefile for check-source 2024-11-26 21:45:19 +10:30
ShahanaFarooqui
e568d69867 doc: Lock askrene example values 2024-11-26 21:45:19 +10:30
ShahanaFarooqui
9592facf83 doc: Lock example values
Changelog-Added: Test script generates all RPC documentation examples now.
2024-11-26 21:45:19 +10:30
ShahanaFarooqui
01ede70e80 gitignore: cln-xpay plugin 2024-11-26 21:45:19 +10:30
Rusty Russell
fba738b65e askrene: really fix race between layer creation and persistent layer loading.
Using jsonrpc_request_sync, layers are loaded before we finish init,
so we never can be asked to create a layer before we've loaded it
(xpay creates a layer immediately on startup).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: persistent layers new this release.
2024-11-26 16:04:13 +10:30
Rusty Russell
d256e11108 askrene: reorder functions.
No code changes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-26 16:04:13 +10:30
Rusty Russell
af629e600e askrene: don't re-save layers as we restore them!
Create lower-level versions of routines to create biases, layers,
constraints, etc and only save the ones called from the public APIs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: persistent layers were only added in this release
2024-11-26 16:04:13 +10:30
Rusty Russell
efacada7dd spender: fix multifundchannel ids.
They're not always 34 (aka '"').  This is a side-effect of ids
changing from u64 to strings quite a while ago.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-26 16:04:13 +10:30
Rusty Russell
20257c3308 lightningd: --dev-low-prio-anchor-blocks and test for low-priority anchors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-26 14:49:36 +10:30
Rusty Russell
de30f9c4b2 anchors: create low priority anchor to spend commit tx within a week.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Protocol: we now create a low-priority (2016 down to 12 blocks fee target) anchor for low-fee unilateral closes even if there's no urgency.
2024-11-26 14:49:36 +10:30
Rusty Russell
737ae8e1eb lightningd: separate routine to gather utxos and create anchor.
We're going to call this twice.  But this patch also takes care
that a failed attempt to create an anchor doesn't alter other
variables!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-26 14:49:36 +10:30
Rusty Russell
0332babdb9 lightningd: minor anchorspend cleanups.
1. merge_deadlines can't really fail.
2. We don't care about incoming HTLCs with no preimage.
3. Debug print anchor points as soon as we calc them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-26 14:49:36 +10:30
Rusty Russell
1cbc96f0d9 lightningd: remember when we started closing channel.
This lets us maintain a reasonable 2 week target for commitment tx.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-26 14:49:36 +10:30
Christian Decker
7b18030ee2 grpc: Do not print wildcard notifications that don't have a handler
Changelog-Fixed: grpc: We no longer log a warning if a notification does not have a handler
2024-11-25 15:41:43 +01:00
niftynei
46fde419b1 pytest: fix up coin_move tests now anchors don't get redundantly spent/ 2024-11-25 20:23:21 +10:30
Rusty Russell
5192eebef9 lightningd: wire channel closing tx through channel_fail_permanent.
Cleans up the API: we have two functions now, one which is explicitly for
"I'm failing this because I saw this tx onchain".

Now we can correctly report the tx which closed the channel (previously
we would always report our own tx(s)!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `close` now correctly reports the txid of the remote onchain unilateral tx if it races with a peer close.
Changelog-Fixed: Protocol: we no longer try to spend anchors if a commitment tx is already mined (reported by @niftynei).
Fixes: #7526
2024-11-25 20:23:21 +10:30