Commit Graph

17275 Commits

Author SHA1 Message Date
Christian Decker
5c749fe4ee ci: Mark some tests as rerun 2025-12-06 12:32:38 +01:00
Christian Decker
fa31e6e4c2 git: Ignore two more binaries 2025-12-06 12:32:38 +01:00
Christian Decker
7c28fdb689 ci: Run with rerunfailures rather than flaky 2025-12-06 12:32:38 +01:00
Christian Decker
287abfbd90 ci: Add a simple plugin to report test results to our falkiness tracker
Changelog-None
2025-12-06 12:32:38 +01:00
ShahanaFarooqui
d18efbb0b7 doc: Add instructions to run CLN node with remote_hsmd_socket 2025-12-05 10:25:19 -08:00
ShahanaFarooqui
a5268e5780 ci: Add new version-vls tag for Docker image
Changelog-Added: Added a new `version-vls` tag with includes  VLS's `remote_hsmd_socket` binary with the Core Lightning image.
2025-12-05 10:25:19 -08:00
ShahanaFarooqui
be471e598f docker: Add vls remote_hsmd_socket binary
This Dockerfile builds the VLS binaries during the builder stage and copies only the `remote_hsmd_socket` binary into the `lightningd-vls-signer` target.
2025-12-05 10:25:19 -08:00
ShahanaFarooqui
c03288cff7 doc: Update release instructions 2025-12-04 16:29:39 -08:00
ShahanaFarooqui
bc64d92b23 tools: Capture Shasums for current version only
Fixes #8753.

Changelog-None: Release process fix.
2025-12-04 16:29:39 -08:00
Madeline Paech
ed439772a8 release branch for 25.12 release 2025-12-04 10:44:56 +10:30
ShahanaFarooqui
af5d02a9fa gitignore: Ignore lightning-downgrade and check-bolt tools
Changelog-None.
2025-12-03 06:24:04 -08:00
Rusty Russell
e02f76bdd8 CHANGELOG: update for 25.12rc3
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-29 10:32:47 +10:30
Dusty Daemon
377802ce9c contrib: Update startup_regtest for taproot
Wallet address default to taproot now — update the startup_regtest.sh script to use taproot addresses.

Changelog-None
2025-11-29 08:35:49 +10:30
Matt Whitlock
6db80536cc tests/test_misc.py: fix another "AF_UNIX path too long"
Also, avoid resource leak by explicitly closing socket.

Changelog-None
2025-11-29 08:35:09 +10:30
wqxoxo
3c08a8bdb9 xpay: fix misleading "route hint" label in error messages
describe_scidd() was labeling any channel as "the invoice's route hint"
when there was a single-hop route hint, even if the error occurred on
an unrelated intermediate channel.

Now we check the channel actually matches the route hint's
short_channel_id before using that label.

Fixes: #8252
Changelog-Fixed: xpay: error messages no longer incorrectly label intermediate channels as "the invoice's route hint".
2025-11-29 08:33:37 +10:30
Rusty Russell
9d4a150b7f pytest: add test that we correctly scan back for missed UTXOs.
I took the node from the original test which missed the UTXO, and
added some more blocks.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-29 08:18:20 +10:30
Rusty Russell
6c60375651 lightningd: scan back to seek missing UTXOs.
We only do this once, and not on new nodes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-29 08:18:20 +10:30
Rusty Russell
1e66414b9e wallet: make sure we re-watch outpoints after blocks are rolled back.
At startup, we load the outpoints to watch, *then* roll back 15
blocks.  If there were things in those blocks we wanted to watch, we
no longer do!

1. We load the utxoset into memory: everything in the utxoset table
   which has spendheight null.
2. We roll back 15 blocks to re-read.  Deleting a block from the
   database causes the utxo spentheights referring to it to be set
   to null.
3. We roll forward, but we didn't update the in-memory utxoset,
   so we're not watching those utxos which are spent.

The main symptom of this is that we spam peers with obsolete gossip
(if we get sent a channel announcement for a closed channel, we can
think it isn't spent yet).  But it could *also* mean we don't notice
onchain txs, if we restart at the wrong time!

Changelog-Fixed: lightningd: we could miss tx spends which happened in the past blocks when we restarted.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-29 08:18:20 +10:30
Rusty Russell
8caffde0fa pytest: test for watching utxos over restart reorg.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-29 08:18:20 +10:30
ShahanaFarooqui
534e3ae8f8 ci: Remove lowdown and configure from the sign release job step
Changelog-None: Fixes draft release job creation in CI.
2025-11-28 20:27:02 +10:30
Rusty Russell
7e9ec3ef2d tools: remove accidentally-committed obsolete hsmtool binary.
And keep it in the .gitignore, as others may have old ones lying around too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 15:45:06 +10:30
Madeline Paech
c59d9beab3 second release candidate for 25.12 2025-11-28 10:48:43 +10:30
Rusty Russell
385b6a9e2f doc: generate documentation for askrene-bias-node.
I noticed it was missing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
640888aa91 CI: add test that we can downgrade the node and run it under v25.09.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
39a92116a8 doc: add a manual page.
In particular, document when downgrades are not possible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
4d8f1d33e9 pytest: add failing downgrade test.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
a45c907200 lightningd-downgrade: downgrade askrene's layer info too.
If they had a channel bias, and ran xpay, it will update the bias
to a v2 bias (with a timestamp).  We must downgrade that, or the
older version won't load!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
eb83a205b9 askrene: move datastore wire functions into separate file for lightning-downgrade to use.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
2a066b92fc wallet: separate datastore access functions for the lightning-downgrade tool to access.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
9981e238a3 tools/lightning-downgrade: tool to downgrade (offline) v25.12 to v25.09.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: tools: `lightningd-downgrade` can downgrade your database from v25.12 to v25.09 if something goes wrong.
2025-11-28 09:16:53 +10:30
Rusty Russell
76ad32ec88 check-bolt: move to devtools, clean up tools/
And leave $(TOOLS) as user-visible tools.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
23f2141683 global: use lightning-hsmtool not hsmtool.
When installed, the name is `lightning-hsmtool`.  We actually copy
`tools/hsmtool` to `tools/lightning-hsmtool` but that's a silly step
which we should get rid of.

So:
1. Make sure our documentation always refers to it as lightning-hsmtool.
2. Make sure our tests invoke it as `lightning-hsmtool`.
3. Rename the C file.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
6dcf4e7bdd wallet: separate migration table into its own source file.
This will make it easier to share with the downgrade tool.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
378293d268 wallet: add optional sql and functions to downgrade db.
This will allow a downgrade tool to attempt to downgrade a node to the
previous version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
f052408832 wire: add explicit-length fromwire_peektype variant.
Useful for continuous streams.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-28 09:16:53 +10:30
Rusty Russell
fc23b538cd lightningd: print UNUSUAL log message if a command is very slow.
We don't expect an internal command to take 5 seconds to service
without explicitly pausing: if it does, log at a higher level.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-27 15:04:20 +10:30
Rusty Russell
acc41ddc0c connectd: don't log at INFO level for known issue.
We get spammed by this, because we somehow missed occasional channel closes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-27 15:04:20 +10:30
ShahanaFarooqui
ff0ee6dfa0 doc: Fix mdx format errors generated due to Readme v2 migrations
Changelog-None: Documentation fixes only.
2025-11-27 14:10:18 +10:30
ShahanaFarooqui
edfb64c736 contrib: Remove litecoin keys as CLN has recently stopped supporting litecoin 2025-11-27 14:10:18 +10:30
Sangbida Chaudhuri
4c7e2d449d hsmd: fix HSM sent an unknown message type error
When we enter the wrong passphrase hsmd crashes like this with an unknown message type:

lightning_hsmd: Failed to load hsm_secret: Wrong passphrase (version v25.12rc1-7-g7713a42-modded)
0x102ba44bf ???
        send_backtrace+0x4f:0
0x102b0900f status_failed
        common/status.c:207
0x102af1a37 hsmd_send_init_reply_failure
        hsmd/hsmd.c:301
0x102af1497 load_hsm
        hsmd/hsmd.c:446
0x102af1497 init_hsm
        hsmd/hsmd.c:548
0x102b29e63 next_plan
        ccan/ccan/io/io.c:60
0x102b29e63 do_plan
        ccan/ccan/io/io.c:422
0x102b29d8b io_ready
        ccan/ccan/io/io.c:439
0x102b2b4bf io_loop
        ccan/ccan/io/poll.c:470
0x102af0a83 main
        hsmd/hsmd.c:886
lightningd: HSM sent unknown message type

This change swaps write_all() to wire_synce_write() because write_all() is missing the wire protocol length prefix. We also don't send a stack trace anymore if the user has entered the wrong passphrase and exit cleanly.
2025-11-27 14:06:17 +10:30
ShahanaFarooqui
192fc6ae60 doc: Update documentation for reproducible Fedora binaries
Changelog-None: Already added details in PR #8692.
2025-11-27 14:04:48 +10:30
ShahanaFarooqui
e04153f1df tools: Sort Fedora tar by name
And do not replace Fedora shasums from verification because Fedora binaries are deterministic now.
2025-11-27 14:04:48 +10:30
ShahanaFarooqui
4a67100c34 ci: Add skip_validation option to test the release on non-tagged commit
Changelog-None: Improved release action CI testing
2025-11-27 14:04:48 +10:30
Madeline Paech
7713a427b6 change log for release candidate 1 to include 8690 2025-11-25 10:24:46 +10:30
Rusty Russell
9627bf9ba1 CI: don't run configure on *host* for release.
It breaks, but more importantly we don't need to install lowdown any more,
since the check in build-release.sh has been removed.

```
Run sudo apt-get install -y lowdown
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  lowdown
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
Need to get 129 kB of archives.
After this operation, 314 kB of additional disk space will be used.
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
Get:2 http://azure.archive.ubuntu.com/ubuntu noble/universe amd64 lowdown amd64 1.1.0-1 [129 kB]
Fetched 129 kB in 0s (2971 kB/s)
Selecting previously unselected package lowdown.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 216225 files and directories currently installed.)
Preparing to unpack .../lowdown_1.1.0-1_amd64.deb ...
Unpacking lowdown (1.1.0-1) ...
Setting up lowdown (1.1.0-1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Not building database; man-db/auto-update is not 'true'.

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.
checking for getpagesize() in <unistd.h>... yes
checking for isblank() in <ctype.h>... yes
checking for little endian... yes
checking for memmem in <string.h>... yes
checking for memrchr in <string.h>... yes
checking for mmap() declaration... yes
checking for /proc/self/maps exists... yes
checking for qsort_r cmp takes trailing arg... yes
checking for __attribute__((section)) and __start/__stop... yes
checking for stack grows upwards... no
checking for statement expression support... yes
checking for <sys/filio.h>... no
checking for <sys/termios.h>... yes
checking for <sys/unistd.h>... yes
checking for __typeof__ support... yes
checking for unaligned access to int... yes
checking for utime() declaration... yes
checking for __attribute__((warn_unused_result))... yes
checking for #pragma omp and -fopenmp support... yes
checking for <valgrind/memcheck.h>... no
checking for working <ucontext.h... yes
checking for passing pointers via makecontext()... yes
checking for __builtin_cpu_supports()... yes
checking for closefrom() offered by system... yes
checking for F_CLOSEM defined for fctnl.... no
checking for close_range syscall available as __NR_close_range.... yes
checking for F_MAXFD defined for fcntl.... no
checking for zlib support... yes
checking for libsodium with IETF chacha20 variants... no
checking for sqlite3... yes
checking for postgres... yes
checking for User Statically-Defined Tracing (USDT)... no
checking for compiler is GCC... yes
checking for GCC version is 7 or above... yes
Writing variables to config.vars.2200... yes
Writing header to ccan/config.h.2200... yes
checking for python3-mako... not found
checking for lowdown... found
checking for sha256sum... found
checking for jq... found
Setting PREFIX... /usr/local
Setting CC... cc
Setting CONFIGURATOR_CC... cc
Setting CWARNFLAGS... -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -Wno-maybe-uninitialized -Wshadow=local
Setting CDEBUGFLAGS... -std=gnu11 -g -fstack-protector-strong
Setting COPTFLAGS... -Og
CSANFLAGS not found
FUZZFLAGS not found
FUZZER_LIB not found
LLVM_LDFLAGS not found
SQLITE3_CFLAGS not found
Setting SQLITE3_LDLIBS... -lsqlite3
Setting POSTGRES_INCLUDE... -I/usr/include/postgresql
Setting POSTGRES_LDLIBS... -L/usr/lib/x86_64-linux-gnu -lpq
SODIUM_CFLAGS not found
SODIUM_LDLIBS not found
Setting VALGRIND... 0
Setting DEBUGBUILD... 0
Setting COMPAT... 1
Setting PYTEST... python3 -m pytest
Setting STATIC... 0
Setting CLANG_COVERAGE... 0
Setting ASAN... 0
Setting UBSAN... 0
Setting TEST_NETWORK... regtest
Setting HAVE_PYTHON3_MAKO... 0
Setting SHA256SUM... sha256sum
Setting FUZZING... 0
Setting RUST... 1
Setting PYTHON... python3
Setting SED... sed
*** We need a libsodium >= 1.0.4 (released 2015-06-11).
Error: Process completed with exit code 1.
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-24 16:55:46 +10:30
wqxoxo
b906507968 Fix BOLT11 annotation loss after sendonion failure
Fixes #6978 where bolt11 annotations were lost when sendonion failed early and payment was retried.

When sendonion RPC fails before saving payment to database, invstring_used flag would remain true, causing retry attempts to omit bolt11 parameter. Successful retries would then save to DB without bolt11 annotation.

Move invstring_used flag setting from payment_createonion_success to payment_sendonion_success. This ensures the flag is only set after sendonion actually succeeds. The bolt11 will be sent with every sendonion attempt until the first successful one, accepting the minor redundancy for cleaner state management.
Changelog-Fixed: Plugins: `listpays` can be missing the bolt11 information in some cases where `pay` is used.
2025-11-24 14:32:24 +10:30
Rusty Russell
ea0b8040c2 doc: include delnetworkevent in generated documentation, and grpc.
Also added missing "added" annotation.  This meant that I had to manually
change contrib/msggen/msggen/patch.py to insert that added notation where it
was missing from .msggen.json.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: introduced this release.
2025-11-24 14:31:02 +10:30
daywalker90
b4ef5d9a8e msggen: fix primitive serialization for special names
Changelog-None
2025-11-24 14:30:29 +10:30
Madeline Paech
5166fd55bb release candidate PR for 25.12 with Shahana's Makefile update
Changelog-None
2025-11-24 02:50:41 +00:00
ShahanaFarooqui
147ffecc18 make: Remove printing the version from Makefile
Changelog-None: Fixes error from `tools/check-release.sh`
2025-11-24 13:15:52 +10:30