Commit graph

703 commits

Author SHA1 Message Date
Lagrang3
4299532652 downgrade tool: fix invalid memory bug
Fix a typo in the downgrade tool that produced an OOM error.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-08-04 18:51:43 -03:00
Rusty Russell
4d92628579 downgrade: we need to remove "impressions" from askrene datastore when downgrading to v26.06.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-08-04 18:51:43 -03:00
Rusty Russell
957696497a askrene: add APIs for "impressions" which are *relative* constraints.
Normal constraints are clamps on min/max caused by failed payments:
min for the channels that succeeded, max for the channel which failed.

Impressions are the results of successful payments, which alter both
min and max (negatively in the forward direction, positively in the
reverse).

impression: n
1. An effect, feeling, or image retained as a consequence of experience.
2. A vague notion, remembrance, or belief.
3. A mark produced on a surface by pressure.

Unlike constraints, this is the result of our own effect on the network: they're related
but different enough to get their own API and terminology.

The name conveys both we made an impression on the channel, and that
the results are a bit vague (due to other changes since then, which we
won't know about).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `askrene` layers now contain "impressions" representing the effects of successful payments we made through channels.
2026-08-04 18:51:43 -03:00
ekzyis
8480f6c298 lightning-hsmtool: Fix getsecret does not show mnemonic after typing passphrase
Changelog-Fixed: `lightning-hsmtool`: `getsecret` does not show mnemonic after typing passphrase
2026-08-03 19:04:13 +02:00
daywalker90
d6bce32506 release: CHANGELOG and version bumps for v26.06.6 2026-07-21 11:49:51 +02:00
Nicolas Dorier
02e06fc625 Fix: SIGINT was ignored by the cln docker container
Changelog-Fixed: Fix: SIGINT was ignored by the cln docker container
2026-07-20 19:47:55 +02:00
ShahanaFarooqui
92fbf33df1 build-release: fix VERSION build-arg and add --no-push for the docker target
Pass the computed VERSION as a build-arg, mirroring the docker-release workflow. Without it the container's VERSION is set-but-empty, `VERSION ?=` in the Makefile won't overwrite it, the git-describe fallback never runs, and `make install-program` fails with "git is required for generating version information".

Also add --no-push, so a release captain can do a full test build without publishing elementsproject/lightningd:$VERSION and :latest (the target always runs `docker buildx build --push`, since multi-arch images cannot be --load'ed into the classic docker store). The build only populates the builder's cache; a subsequent run without the flag pushes from cache quickly.

Co-Authored-By: Claude <claude@users.noreply.github.com>
2026-07-15 15:35:55 +09:30
daywalker90
c9b25bce98 release: CHANGELOG and version bumps for v26.06.2 2026-06-25 12:11:15 +09:30
Níckolas Goline
7224436387 Versions: post-release updates for v26.06
Co-Authored-By: Madeline <madeline@blockstream.com>
Changelog-None
2026-06-19 09:38:06 +09:30
ShahanaFarooqui
0b43e919a2 docker: Fix base image inconsistency in reprobuild for noble and resolute
Switch `Dockerfile.noble` and `Dockerfile.resolute` to noble / resolute to match the debootstrap-based minimal image approach.
2026-06-10 03:58:47 +02:00
ShahanaFarooqui
19992371ee tools: Fix sign and docker target detection when passed as single argument
The sign target detection uses pattern matching that requires spaces on
both sides of "sign" in the TARGETS variable. When only "sign" is passed
as an argument, TARGETS becomes " sign" (leading space only), causing
the condition to fail.

Add an additional pattern match to detect "sign" with a leading space
but no trailing space, which occurs when "sign" is the only target or
the last target in the list.

This regression seems to have been exposed by GitHub Actions runner
updates (Ubuntu 22.04 → 24.04), which changed argument passing behavior.

Changelog-None: Fixes the release signing issue in CI only.
2026-06-10 03:58:00 +02:00
Madeline
a98d2e46cc release: prepare v26.06 2026-06-04 14:21:19 +02:00
daywalker90
a0041a6ec7 CI: remove focal and add resolute Ubuntu builds
Changelog-None
2026-05-28 08:31:55 +02:00
Rusty Russell
d285d92a59 v26.06rc2: update versions
`uv run make update-versions NEW_VERSION=v26.06rc2`

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-22 12:31:36 +09:30
Sangbida Chaudhuri
abb0cddaaa v26.06rc1 2026-05-12 16:12:20 +10:00
Rusty Russell
427ee36dfd common: implement tal_arr_append and tal_arr_appendn, and use them.
These are useful for the common pattern of "append these bytes to this tal array".

As a bonus, we do memcheck() on all these callers, for extra checking
under valgrind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
86f459511f update-mocks: make handling of mocks in nested files deterministic.
update-mocks searches for prototypes, looking first in the local
directory, then in */*.h, and takes the first.  In the case of
plugins/bkpr/test/run-currencyrate_str.c referring to
jsonrpc_request_start_, this means it could get either the one in
libplugin (correct) or the one in lightningd (wrong!), depending on
directory order randomness.

Hack it a bit harder, to look one up from the local dir before */*.h.
This is redundant in most cases, but not for three-deep-nested dirs
like this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
9127050bb8 configure: delete non-working "do we have Python mako" test.
It would need to run under uv.  I noticed it failing while debugging the 32-bit CI build,
but it fails everywhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-05 15:17:25 +10:00
Rusty Russell
eefc9b9a2c tools/generate-wire.py: don't set TLV fields to NULL if they're empty.
There's a new BOLT 12 test, which checks that the ->currencies array isn't empty.
We were treating it as missing, which is wrong.  So allocate empty arrays when
they appear, instead of setting them to NULL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-30 20:09:31 +09:30
Rusty Russell
cc8c043f6c lightning-downgrade: prepare for downgrading to v26.04.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-30 20:09:31 +09:30
daywalker90
5fec682cda docs: generate notification and hook documentation from schemas
and publish them to the readme.com instance of course!

Changelog-None
2026-04-24 22:34:31 +02:00
Sangbida Chaudhuri
eba035f751 v26.04.1 2026-04-24 13:59:10 +10:00
Sangbida Chaudhuri
6f9356fb93 v26.04 2026-04-20 14:52:26 +10:00
Sangbida Chaudhuri
f2b701769b v26.04rc3 2026-04-13 15:01:41 +10:00
Sangbida Chaudhuri
39c243ce69 v2604.rc2
Changelog-None
2026-04-02 16:40:10 +10:00
Sangbida Chaudhuri
93c9adb415 v26.04rc1
Changelog-None
2026-03-23 14:48:59 +10:00
Rusty Russell
15ef2fd39c Build: don't use HAVE_FUNCTION_SECTIONS for update-mocks.
I ran `uv run make update-mocks` and many mocks vanished.  But that
broke MacOS (and maybe other archs) which doesn't support function
sections and no longer linked.

If this proves problematic, we might end up generating mocks properly:
1. Use #include "mocks-sphinx-xor_cipher_stream_gen.c"
2. Generate those separate files as necessary.
3. Don't commit them, build them locally.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-23 19:05:37 +10:30
wqxoxo
f318c13bf5 db: add STRICT tables with migration for old databases
Enables STRICT tables in developer mode, but old databases (~2019) may
have BLOB values in TEXT columns. Migration converts BLOB faildetail
to TEXT with UTF-8 validation, NULLs invalid data.

STRICT is only applied to fresh databases; existing databases being
upgraded skip STRICT to avoid type affinity issues with legacy data.

Also adds security pragmas in developer mode: trusted_schema=OFF,
cell_size_check=ON.

Fixes #5390.

Changelog-Added: Database: STRICT tables and security pragmas in developer mode
Changelog-Fixed: Database migration for old BLOB-typed faildetail values
2026-02-23 15:55:55 +10:30
Rusty Russell
acb8a8cc15 gossipd: dev-compact-gossip-store to manually invoke compaction.
And tests!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-16 17:23:33 +10:30
Rusty Russell
b1055aa0ac gossip_store: add UUID entry at front of the store.
We also put this in the store_ended message, too: so you can
tell if the equivalent_offset there really refers to this new
entry (or if two or more rewrites have happened).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-16 17:23:33 +10:30
Rusty Russell
d4c62f8c4c tools: delete gossip_store of needed for downgrade even if db hasn't changed.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-16 17:23:33 +10:30
Tatiana Moroz
0173610527 Fix Reckless search command not finding partial matches
The Reckless search command was only returning a result if you
searched a perfect match, which is not too helpful.  This updates the
command so that partial search matches return a result.

Before:
reckless search bolt
Search exhausted all sources
reckless search bol
Search exhausted all sources
reckless search bolt12-pris
Search exhausted all sources

After:
reckless search bolt
Plugins matching 'bolt':
  bolt12-prism (https://github.com/lightningd/plugins)
reckless search bol
Plugins matching 'bol':
  bolt12-prism (https://github.com/lightningd/plugins)
reckless search bolt12-pris
Plugins matching 'bolt12-pris':
  bolt12-prism (https://github.com/lightningd/plugins)

Changelog-Fixed: reckless search now returns partial matches instead of requiring exact plugin names.
2026-02-02 13:01:00 -06:00
Rusty Russell
ee0175b85f Makefile: update next and prev versions now we've released.
This means:
1. downgrade changes (we no longer fail due to node biases).
2. various deprecations no longer are

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-20 19:32:42 +10:30
ShahanaFarooqui
ec7d247f38 docker: Added fixed SOURCE_DATE_EPOCH flag for reproducible Fedora build
- Using environment variable `SOURCE_DATE_EPOCH` with fixed value will enforce a consistent timestamp for Fedora build.
. Similar to Ubuntu fix in commit 490fb0fc3b
- Locked cargo version
- Add `no-cache` to Fedora build

Changelog-Fixed: Core lightning builds for Fedora on all systems are deterministic.
2026-01-16 12:34:03 -08:00
ShahanaFarooqui
12ccfb5c65 script: Add Fedora as target for SHASUMS verification 2026-01-16 12:34:03 -08:00
Rusty Russell
d2123a94a5 lightning-hsmtool: fix dumponchaindescriptors for mnemonic hsm_secrets.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: `lightning-hsmtool`: handle mnemonic hsm_secret files (nodes created >= v25.12).
2026-01-14 17:18:56 +10:30
Rusty Russell
779a478437 lightningd: allow --recover / recover JSON RPC to take mnemonic.
In fact, you *must* use mnemonic to successfully recover a modern node!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `recover` takes a 12-word mnemonic for nodes created by v25.12 or later.
2026-01-13 22:36:01 +10:30
Rusty Russell
f975bb37d4 lightning-hsmtool: support extracting the mnemonic from hsm_secret.
We cannot use the codex32 or raw hex for recovery of 25.12 nodes,
since they will then use the incorrect derivation for all paths, and
be unable to spend (or even find!) their funds.

So implement `getsecret` to replace `getcodexsecret`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: `lightning-hsmtool`: `getsecret` replaces `getcodexsecret` for modern nodes (gives mnemonic).
Changelog-Deprecated: `lightning-hsmtool`: `getcodexsecret`.  Use `getsecret`.
2026-01-13 22:36:01 +10:30
ShahanaFarooqui
b895700fe2 tools: Update libsodium version for Ubuntu Noble
Changelog-None: Fixes release process only.
2026-01-12 18:00:09 -06:00
ShahanaFarooqui
a05150bd18 tools: Fixed shellcheck error from promote-stable script
Changelog-None: Fixed script.
2025-12-19 14:54:50 -08:00
ShahanaFarooqui
546272048b tools: Add script to update stable tag on Dockerhub
Changelog-None: Script for Docker tag only.
2025-12-15 22:10:35 -08:00
Christian Decker
16735c95b7 chore: Downgrade tool diff 2025-12-08 16:37:02 +01:00
Christian Decker
4b9cffe183 Add comprehensive coverage infrastructure with clang source-based coverage
This commit introduces a modern coverage infrastructure for Core Lightning:

- Migrate from ad-hoc coverage script to integrated Makefile targets
- Add LLVM source-based coverage support with per-test profraw organization
- Integrate coverage collection into pytest framework via TailableProc
- Add GitHub Actions workflow for nightly coverage reports
- Add Taskfile.yml for convenient task automation
- Add codecov.yml for Codecov integration
- Add comprehensive coverage documentation in COVERAGE.md
- Update contributor workflow docs with new coverage script path
- Add coverage data files to .gitignore (*.profraw, *.profdata)
- Remove obsolete contrib/clang-coverage-report.sh
- Remove obsolete tests/conftest.py (now using pyln-testing markers)
- Update pyproject.toml to include pyln-testing in main dependencies

The new infrastructure automatically collects coverage data when CLN_COVERAGE_DIR
is set, organizing profraw files by test name for granular analysis.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:37:02 +01: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
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
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