Commit Graph

1727 Commits

Author SHA1 Message Date
Rusty Russell
b74d32f6c4 lightningd: add withhold option to fundchannel_complete.
This is just a polite way of telling us that if we close, don't bother broadcasting
since we didn't broadcast the funding tx.

Changelog-Added: JSON-RPC: `fundchannel_complete` new parameter `withhold` (default false).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-19 07:23:39 +10:30
Rusty Russell
39349965a6 lightningd: add withheld flag to listpeerchannels and listclosedchannels.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listpeerchannels` `funding` object `withheld` flag, and `listclosedchannels` `funding_withheld` flags, indicating fundchannel_complete was called with the `withheld` parameter true.
2025-11-19 07:23:39 +10:30
Rusty Russell
606aad07ed lightningd: expose funding PSBT (if we have it) in JSON API.
Changelog-Added: JSON-RPC: `psbt` field in `funding` in listpeerchannels, and `funding_psbt` in listclosedchannels.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-19 07:23:39 +10:30
Rusty Russell
ae9ecba375 sendpsbt: update channel psbts if this is a channel PSBT.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-19 07:23:39 +10:30
Rusty Russell
7c7f1e4235 lightningd: deprecate "message": null in channel_state_changed notifications.
Somehow I missed this when deprecating `short_channel_id` being null.

Changelog-Deprecated: Plugins: `channel_state_changed` notification `message` field being `null`: it will be omitted instead.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-18 14:28:22 +10:30
Rusty Russell
64563c51f4 schemas: allow *CLOSED* state in channel_state_changed notification.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-18 14:28:22 +10:30
Rusty Russell
1102d8063e askrene: add optional layers to reservations.
We have the issue of aliases: xpay uses scids like 0x0x0 for
routehints and blinded paths, and then can apply reservations to them.  But
generally, reservations are *global*, so we need to differentiate.

Changelog-Added: Plugins: `askrene-reserve` and `askrene-unreserve` can take an optional `layer` inside `path` elements.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-17 13:52:54 +10:30
Joseph Goulden
1ead6791fd chore: nix flake update
Switched to nixpkgs-unstable
Replaced postgresql dependency with much smaller libpq.
Utilise new inputs.self.submodules feature to simplify flake use
Moved apps to a separate file
Changelog-None
2025-11-13 15:35:51 +10:30
Lagrang3
4f1c8806d7 askrene: add askrene-bias-node rpc
Changelog-Added: askrene-bias-node: an RPC command to set a bias on node's outgoing or incoming channels.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2025-11-13 15:15:27 +10:30
Lagrang3
5769beb1db askrene: add timestamp to biases
We add one more field to biases: "timestamp".
With the timestamp variable old biases can be removed with the
askrene-age command.

Changelog-Added: Plugins: askrene channel biases now have an associated timestamp, and are timed out by askrene-age

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2025-11-13 15:15:27 +10:30
ShahanaFarooqui
529cc7d4bc docs: Updated contribute-to-core-lightning docs for v10 2025-11-13 15:07:00 +10:30
ShahanaFarooqui
367efcf643 docs: Updated developers-guide docs for v10 2025-11-13 15:07:00 +10:30
ShahanaFarooqui
6bba927fef docs: Updated node-operators-guide docs for v10 2025-11-13 15:07:00 +10:30
ShahanaFarooqui
5d907ca719 docs: Updated beginners-guide docs for v10 2025-11-13 15:07:00 +10:30
ShahanaFarooqui
4a6a667cc5 docs: Updated getting-started docs for v10 2025-11-13 15:07:00 +10:30
Rusty Russell
41e21d1d70 autoclean: don't increment num_cleaned when record wasn't even a candidate.
For example, `autoclean-once failedforwards` would count every non-failed forwards
as "uncleaned".

This is both technically correct and completely useless.

Changelog-Fixed: JSON-RPC: `autoclean-once` returns "uncleaned" number reflecting number of candidates which were too new to be cleaned, not all records we didn't delete.
Fixes: https://github.com/ElementsProject/lightning/issues/8632
Reported-by: @grubles and several other sharp-eyed users.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-13 13:58:13 +10:30
daywalker90
e9f3aaf8af docs: fix htlc states description regarding direction
Changelog-None
2025-11-13 12:21:44 +10:30
Peter Neuroth
22269eb646 lsp_plugin: add documentation for options
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-11-13 10:58:49 +10:30
Rusty Russell
ec05e5da91 autoclean: clean network events (30 days by default).
We also document this in the listnetworkevents command itself.

The test_autoclean_once was getting repetitive, so I cleaned that
up too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: `autoclean` will remove networkevents after 30 days by default.
2025-11-12 13:58:43 +10:30
Rusty Russell
9f54f01470 lightningd: delnetworkevent support
Changelog-Added: JSON-RPC: `delnetworkevent` to delete from listnetworkevents.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-12 13:58:43 +10:30
Rusty Russell
3b332948dd lightningd: implement listnetworkevents.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-12 13:58:43 +10:30
Rusty Russell
39b0e65a6a lightningd: add networkevents to wait API.
Changelog-Added: JSON-RPC: `wait` now has `networkevents` subsystem.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-12 13:58:43 +10:30
Peter Neuroth
5c93f12b08 lightningd: add peer_id to htlc_accepted_hook
In some cases it is helpful to know who offered us the HTLC.

Changelog-Changed: Plugins: The `htlc_accepted` hook now knows the
`peer_id` of the peer that offered us the HTLC.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-11-11 16:36:30 +01:00
Dusty Daemon
0a2f983a6e docs: Split Mac install instructions
Okay, so I think this is what happened to me:
1) I had brew installed on my Intel Mac
2) I got an Apple Silicon Mac
3) I setup my new Mac by copying over Intel Mac harddrive
4) I now have two brew's installed on my machine:
  a) /usr/local/bin/brew (for intel macs & cross-compiling)
  b) /opt/homebrew/bin/brew (for (for apple silicon)
5) The wrong brew was in my path (a)
Looking through our getting started docs, we seem to reference both /usr/local/... and  opt/homebrew/...

Update the installation document to mac this and related issues more clear for new users who might run into this problem.

Changelog-None
2025-11-11 11:39:21 +10:30
Peter Neuroth
21fb7600f3 lightningd: add invoice_amt to the htlc_accepted hook
This commit introduces a new field `invoice_msat` to the htlc_accepted
hook. If this field is specified it will replace the amount of the
invoice that belongs to the payment_hash of the HTLC on internal checks.

This is useful in scenarios where we actually expect a smaller amount
than initially specified in an invoice.

Changelog-Changed: Plugins: `htlc_accepted` hook can now override the
expected total amount of the invoice that belongs to the HTLC.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-11-10 15:05:27 +10:30
Rusty Russell
c9fdf60ac1 wallet: make p2tr the default address for newaddr.
Of course we still have to return a `bech32` for the deprecation period.

Changelog-Added: JSON-RPC: `newaddr` will now return a `p2tr` field by default.
Changelog-Deprecated: JSON-RPC: `newaddr` returning a `bech32` field if `addresstype` is not specified (use `p2tr`).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-07 10:51:04 +10:30
Rusty Russell
07c57b6015 askrene: implement 10-second deadline.
We have another report of looping.  This maxparts code is being completely
rewritten, but it's good to have a catchall for any other cases which might
emerge.

I had to make it customizable since our tests under valgrind are SLOW!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-03 12:54:37 +10:30
Rusty Russell
82fff3c74b Remove litecoin support.
No idea if it works, we don't test it and nobody runs it.  I guess not.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Config: non-functioning litecoin support (who knew we even had that?)
2025-10-26 20:31:45 +10:30
Rusty Russell
f3b227f8af external/libsodium: remove
We shipped our own because Ubuntu xenial (16.4) had an ancient one.

Changelog-Changed: Build: libsodium version >= 1.0.4 now required (released 2015-06-11)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-26 20:31:45 +10:30
Rusty Russell
226533958a external/lowdown: remove.
Every distribution we have packages this now.

Changelog-Changed: Build: lowdown is now required (we no longer bundle our own).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-26 20:31:45 +10:30
Sangbida Chaudhuri
310405761a schema: update schema to remove bip86 and add mnemonic to expose secret
This schema change updates newaddr to remove bip86 which was previously added, since don't want to make unnecessary schema changes this is being removed.

The generated files for the exposesecret schema change are also being added
2025-10-26 12:37:58 +10:30
Sangbida Chaudhuri
5f67e7dd9d doc: change encrypted-hsm to hsm-passphrase 2025-10-26 12:37:58 +10:30
Sangbida Chaudhuri
7f3a57cc41 tests: add BIP86 support 2025-10-26 12:37:58 +10:30
Sangbida Chaudhuri
de9c6305a1 exposesecret: Add support for mnemonic-based HSM secrets
Update the exposesecret plugin to work with the new unified HSM secret
format that supports BIP39 mnemonics.

Changelog-Added - exposesecret now has a mnemonic field
2025-10-26 12:37:58 +10:30
Sangbida Chaudhuri
218dc2fe20 hsmd: use the new mnemonic-compatible hsm_secret routines.
Changelog-Changed: hsmd: New nodes will now be created with a BIP-39 12-word phrase as their root secret.
Changelog-Deprecated: config: `encrypted-hsm` to require a passphrase (use `hsm-passphrase`).
Changelog-Added: config: `hsm-passphrase` indicates we should use a manual passphrase with the hsm secret.
2025-10-26 12:37:58 +10:30
Rusty Russell
71f164a454 autogenerate-rpc-examples.py: add examples for listchainmoves and listchannelmoves.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-24 11:30:17 +10:30
ShahanaFarooqui
9255c255cf gpg: Updating Shahana's expired keys
Also added Madeline's missing keys on security-policy  page.

Changelog-None.
2025-10-21 11:19:46 +05:30
ShahanaFarooqui
aa86e13745 doc: Add step for point release checklist to merge updates from update-versions and CHANGELOG.md into master
Changelog-None.
2025-10-21 08:16:59 +05:30
Sangbida Chaudhuri
7b1c4874ed makefile: use SED from configure in most places.
Some simple cases are left alone, but anything called from make uses $SED.
2025-10-17 10:40:17 +10:30
Lakshya Singh
ad040d0db8 docs: add frozen for uv sync
prevent updates to lock file which might leave working directory dirty 
resulting in a modded cln version build
2025-10-10 15:47:39 +10:30
Rusty Russell
350af1a3cf doc: pretty!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 15:32:54 +09:30
Rusty Russell
dfe6e3c293 lightningd: remove --experimental-quiesce and --experimental-offers
Deprecated 24.11, disabled 25.05 (they're the default now).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Config: --experimental-offers and --experimental-quiesce (default since v24.11)
2025-10-01 15:32:54 +09:30
Rusty Russell
d73b60c550 lightningd: remove blinding field from onion_message_recv hook.
Changelog-Removed: Plugins: `onion_message_recv` hook `blinding` field (use `first_path_key` as per modern BOLT 4 naming).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 15:32:54 +09:30
Rusty Russell
ba75f7bcf1 offers: remove blinding from decode JSON-RPC.
Deprecated in 24.11, disabled in 25.05.

Changelog-Removed: JSON-RPC: `decode` field `blinding` (use `first_path_key` as per modern BOLT naming)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 15:32:54 +09:30
Rusty Russell
0d18b82dae plugins: cancelrecurringinvoice command.
`fetchinvoice` variant, for setting invreq_recurrence_cancel instead.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: `cancelrecurringinvoice` command to send new "don't expect any more invoice requests" msg to recurring bolt12 invoices.
2025-10-01 15:31:30 +09:30
Rusty Russell
54444e4337 BOLT12: Update recurrence to latest spec draft.
Changes:
* Fields renumbered to their draft values + billion.
* offer_recurrence now comes in compulsory or optional (backwards compat) flavors.
* `proportional_amount` is now inside `offer_recurrence_base` not `offer_recurrence_paywindow`.
* New field `invreq_recurrence_cancel`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: Draft specification for recurring offers changed: old recurring offers will no longer work.
2025-10-01 15:31:30 +09:30
Rusty Russell
e7ea57e130 BOLT12: Remove start_any_period from recurrence_base.
Offer_absolute_expiry should be used if you want to require starting at the start.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `start_any_period` removed, use expiry if you need to restrict when they can start using the offer.
2025-10-01 15:31:30 +09:30
Rusty Russell
05005475e3 BOLT12: Remove years from recurrence.
Use months instead.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `years` removed; use 12 x months.
2025-10-01 15:31:30 +09:30
Claudio Raimondi
13c5db51a9 Refactor Dockerfile, Add TODOs
all these changelogs only apply to the Docker image.

Changelog-Added: added verification of GPG keys for the bitcoin and litecoin tarballs.
Changelog-Fixed: fixed compilation on all target architectures; each had their own bugs (poetry, missing packages...).
Changelog-Fixed: fixed cargo cross compilation. it was mistakenly using QEMU before.
Changelog-Fixed: fixed CPU compatibility bug described in issue 8456
Changelog-Changed: improve build time by 8.8x
Changelog-Changed: improve image size by 2.07x

more detailed changelog can be found on the PR: https://github.com/ElementsProject/lightning/pull/8429
2025-09-28 20:56:07 +05:30
ShahanaFarooqui
16252fd72d doc: Update instructions for CI workflow Release 🚀
Changelog-None.
2025-09-10 12:38:12 +05:30