Commit graph

4518 commits

Author SHA1 Message Date
Rusty Russell
4e887c7c67 lightningd: add option to crash itself after some time.
We have CI runs which timeout (after 2 hours).  It's not clear why,
but we can at least eliminate CLN lockups as the answer.

Since pytest disabled the --timeout option on test shutdown, we could be
seeing an issue on stopping taking a long time?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-01-27 11:07:04 +10:30
Rusty Russell
b6c1ffa359 ccan/htable: update to explicit DUPS/NODUPS types.
The updated API requires typed htables to explicitly state whether they
allow duplicates: for most cases we don't, but we've had issues in the
past.

This is a big patch, but mainly mechanical.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-01-21 09:18:25 +10:30
Rusty Russell
d6217e2835 wallet: do proper memleak scan of outpoint htables, not notleak().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-01-21 09:18:25 +10:30
Rusty Russell
e998a72ef6 lightningd: fix overzealous memleak detection in json_add_datastore.
The lifetime is bound to the response, but memleak gets upset if it
sees it.  Use the standard take() pattern insteas.

```
lightningd-5 2024-11-28T05:02:27.503Z **BROKEN** lightningd: MEMLEAK: 0x55b58f329338
lightningd-5 2024-11-28T05:02:27.503Z **BROKEN** lightningd:   label=common/utils.c:150:char[]
lightningd-5 2024-11-28T05:02:27.504Z **BROKEN** lightningd:   alloc:
lightningd-5 2024-11-28T05:02:27.585Z **BROKEN** lightningd:     ccan/ccan/tal/tal.c:488 (tal_alloc_)
lightningd-5 2024-11-28T05:02:27.586Z **BROKEN** lightningd:     ccan/ccan/tal/tal.c:517 (tal_alloc_arr_)
lightningd-5 2024-11-28T05:02:27.586Z **BROKEN** lightningd:     ccan/ccan/tal/tal.c:861 (tal_dup_)
lightningd-5 2024-11-28T05:02:27.586Z **BROKEN** lightningd:     common/utils.c:150 (utf8_str)
lightningd-5 2024-11-28T05:02:27.589Z **BROKEN** lightningd:     lightningd/datastore.c:23 (json_add_datastore)
lightningd-5 2024-11-28T05:02:27.589Z **BROKEN** lightningd:     lightningd/datastore.c:205 (json_datastore)
lightningd-5 2024-11-28T05:02:27.590Z **BROKEN** lightningd:     lightningd/jsonrpc.c:808 (command_exec)
lightningd-5 2024-11-28T05:02:27.590Z **BROKEN** lightningd:     lightningd/jsonrpc.c:954 (rpc_command_hook_final)
lightningd-5 2024-11-28T05:02:27.590Z **BROKEN** lightningd:     lightningd/plugin_hook.c:196 (plugin_hook_call_next)
lightningd-5 2024-11-28T05:02:27.591Z **BROKEN** lightningd:     lightningd/plugin_hook.c:183 (plugin_hook_callback)
lightningd-5 2024-11-28T05:02:27.593Z **BROKEN** lightningd:     lightningd/plugin.c:663 (plugin_response_handle)
lightningd-5 2024-11-28T05:02:27.593Z **BROKEN** lightningd:     lightningd/plugin.c:775 (plugin_read_json_one)
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-20 15:36:07 +10:30
Rusty Russell
a2f58a28ba lightningd: injectpaymentonion can use scids of unannounced channels.
Cut & paste from the forwarding code, where we don't let onions use the
unannounced scids.  Obviously local commands can use them.

Reported-by: @michael1011
Changelog-Fixed: JSON-RPC: xpay now works through unannounced channels.
2024-12-17 15:59:30 +10:30
Rusty Russell
8202929a00 lightningd: populate listsendpays destination from injectpaymentonion if we can.
If they give us the invstring, we can at least set who signed the invoice.  Of course,
it might not be a real node_id (with blinded paths).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-17 08:14:45 +10:30
Rusty Russell
80c43ec97d injectpaymentionion: allow specification of actual amount which reaches destination.
This appears in listsendpays / listpays, and is useful information (if we know!).

This doesn't fix old payments, but means that xpay can use this for new payments.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-17 08:14:45 +10:30
Rusty Russell
73415d35c9 common: don't send trace messages by default, don't ratelimit at all.
We ratelimited DEBUG messages, but that can be annoying and cause us to miss things.
We demoted the worst offenders in the last release, to TRACE level.

Now, only log trace if it's wanted, and never suppress DEBUG.

Changelog-Changed: Logging: we no longer suppress DEBUG messages from subdaemons.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: https://github.com/ElementsProject/lightning/issues/7917
2024-12-16 09:48:51 +10:30
Christian Decker
1adbd70678 logs: Correct an sign mismatch printing the depth change
We are checking if `txw->depth` is `-1` and then print it, when we
clearly want `depth` instead.

Changelog-Fixed logs: When printing depths some unsigned numbers could overflow
2024-12-06 15:12:51 +10:30
Rusty Russell
e655f69b73 lightningd: notification for onionmessage_forward_fail.
Changelog-Added: Plugins: new notification `onionmessage_forward_fail`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-05 17:38:16 +10:30
Rusty Russell
8e4b589a9e connectd: message to tell lightningd if we couldn't forward an onion message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-05 17:38:16 +10:30
Rusty Russell
57b199bb16 lightningd: simplify injectonionmessage API.
It's undocumented and only used in one place, so we can change it (it
was new in 24.08).

We really want to be able to just handle a raw onionmessage: this allows
oblivious sending of messages, but also, in combination with the coming
onionmessage_forward_fail notification, allows us to connect then
reinject.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-05 17:38:16 +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
Alex Myers
b9984f876c lightningd: disable seeker autoconnect when --offline
Changelog-None
2024-11-28 19:02:35 +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
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
Rusty Russell
bfb94fe0c3 lightnind: make channel_set_state string arg const.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 20:23:21 +10:30
Rusty Russell
656ac34756 lightningd: make close_txs parameter to resolve_close_command const.
We don't need to change these txs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 20:23:21 +10:30
niftynei
193b4425ab nit: spelling fix 2024-11-25 20:23:21 +10:30
Rusty Russell
faf7ae6ad4 pytest: add test for connection ratelimiting.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Rusty Russell
15950bb7d4 connectd: reconnect for non-transient connections.
Rather than have lightningd call us repeatedly to try to connect, have
it tell us what peers are transient and aren't, and connectd will
automatically try to maintain that connection.

There's a new "downgrade_peer" message to tell it a peer is now
transient: to make it non-transient we simply tell connectd to
connect as a non-transient.

The first time, I missed that dual_open_control does its own state
transitions :(

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: `connectd` now handles maintaining/reconnecting to important peers, and we remember the last successful address we connected to.
2024-11-25 15:39:13 +10:30
Rusty Russell
ff290b19c9 recovery: save last_known_addr for peer if we know it.
This is more useful than the last address, which may be it connecting
to us.  And use it when we restore it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Rusty Russell
22a481fbaa common: routine to make wireaddr_internal from wireaddr.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Rusty Russell
68feb55dbf wallet: save last known address.
If we connected out, remember that address.  We always remember the last
address, but that may be an incoming address.  This is explicitly the last
outgoing address which worked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Rusty Russell
64af5db45c lightningd: generalize peer_any_channel to filter on entire channel, not just state.
We're going to use this to ask if there are any channels which make it
important to reconnect to the peer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Rusty Russell
4ee59e7a49 connectd: expose --dev-no-reconnect and --dev-fast-reconnect options.
Once connectd is controlling reconnections, it'll need these.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Rusty Russell
c6fce50951 gossipd: don't tell connectd what address to connect to.
In fact, only 951 of 17419 (5%) of node announcements are missing an address
(and gossipd doesn't know if we can connect to Tor addresses anyway) so
just check it *has* a node_announcement.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Rusty Russell
23dc10cf81 connectd: get our own addresses to contact node from node_announcements.
Let lightningd feed us hints to try first, but we can extract the
addresses from node_announcement messages ourselves.

(Lightningd used to ask gossipd on our behalf: this is far simpler!)

One side effect of this is that we don't hand back address hints given to us
by lightningd: it would use these again for reconnecting.  This is breaks
test_sendpay_grouping, so we disable it temporarily.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-25 15:39:13 +10:30
Christian Decker
57b9648d30 common: Resume the startup trace after exiting io_loop
This was a bit harder to identify: during an `io_loop` run we suspend
the current span before handing over to `io_loop`, and later when a callback
is called we resume the span again. Depending on how we return from
the `io_loop` instance that is used to drive the startup, we either
have resumed the last span, or we don't. Since we start a span before
`io_loop` and want it to be emitted afterwards, we need to take care
of the case where we returned from a callback that did not resume, and
therefore the current context is empty.

Making `trace_span_resume` idempotent means we can just resume it
manually.

Ideally we'd push the suspend / resume logic down into `io_loop`
itself, and then we'd have just one place. Maybe suspend and resume
callbacks that can be configured in `io_loop`?
2024-11-24 10:24:31 +10:30
Matt Whitlock
7a2006842f lightningd/test/Makefile: add missing dependency on header_versions_gen.h
lightningd/test/run-find_my_abspath.c includes ../lightningd.c, which includes
header_versions_gen.h, a generated header file.

lightningd/Makefile correctly declares that lightningd/lightningd.o depends on
header_versions_gen.h, but lightningd/test/Makefile lacks any such declaration
regarding lightningd/test/run-find_my_abspath.c, which leads to build failure:

In file included from lightningd/test/run-find_my_abspath.c:5:
lightningd/test/../lightningd.c:64:10: fatal error: header_versions_gen.h: No such file or directory
   64 | #include <header_versions_gen.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~

Declare the missing dependency in lightningd/test/Makefile so that Make will
ensure that header_versions_gen.h is generated before it attempts to build
lightningd/test/run-find_my_abspath.o.

Changelog-None
2024-11-23 13:03:00 +01:00
Alex Myers
363b721cd3 gossipd: use autoconnect-seeker-peers setting 2024-11-22 15:21:45 +10:30
Alex Myers
dc878dc937 lightningd: add option for minimum seeker autoconnect peers
Changelog-added: Added option --autoconnect-seeker-peers, allowing seeker to reach out to new nodes for additional gossip.
2024-11-22 15:21:45 +10:30
Alex Myers
dff5c893e7 gossipd: seeker: select random peer and tell lightningd
This does not validate a node announcement and address, but it
does select a node at random from the gossmap and asks lightningd
to attempt a connection to it.
2024-11-22 15:21:45 +10:30
Alex Myers
7fc214a67f gossipd: add request to connect to new gossip peer
Gossipd uses this to ask lightningd -> connectd to initiate
a connection to a new gossip peer.  This can be used when
there are insufficient peers already connected to gossip with.

Changelog-Changed: Gossipd can now request connections to additional nodes for improved gossip sync
2024-11-22 15:21:45 +10:30
Rusty Russell
799acc90e6 lightningd: tell gossipd channel is closed if it tells us about our channel and is wrong.
While we have (I hope!) fixed the underlying sync problem, this can still happen with
older gossip.  So now we tell it the channel is dead, so it won't happen more than once.

Fixes: #7703
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-21 15:42:06 +10:30
Dusty Daemon
6d63e68e99 splice: Update messages to spec
Changelog-Changed: Splicing moved from test numbers to spec numbers.
2024-11-21 14:15:36 +10:30
Dusty Daemon
03d7d8f45a splice: Update funding pubkey on splice lock
Set the remote funding pubkey on both lightningd and channeld when mutual splice lock is achieved.

This will be needed once rotating funding keys is enabled during splicing

Changelog-None.
2024-11-21 14:15:36 +10:30
Dusty Daemon
5f330b3cd6 channeld: tx_abort should skip reestablish
`tx_abort` should not send reestablish message and instead go into ‘reconnect only mode’

Changelog-None
2024-11-21 14:15:36 +10:30
Dusty Daemon
42440e3bee splice: Pass remote_funding between ld and channeld
Update lightningd and channeld interface to pass the remote funding pubkey back and forth to both daemons.

Changelog-None
2024-11-21 14:15:36 +10:30
Dusty Daemon
560ca00a2b splice: Add remote_funding to database
Enable storing the remote funding pubkey in DB if the channel peer decides to change it during splicing. It needs to be in DB incase of restarts mid-splice.

Changelog-None
2024-11-21 14:15:36 +10:30
Dusty Daemon
4b3643d209 splice: Clean up error messages for RPC
Added and updated error messages when splicing to make it more clear to the user why a splice is failing.

Changelog-Changed: Improved error messaging for splice commands.
2024-11-21 14:15:36 +10:30
Rusty Russell
1160e35669 lightningd: send errors inside blinded paths correctly.
Don't reply with update_fail_malformed_htlc, even though WIRE_INVALID_ONION_BLINDING
has BADONION set.  Fail it with a normal error message.

This fixes a known FIXME.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Protocol: entry to blinded paths return more useful errors (e.g if it's the final node, you get a real error, otherwise you get invalid_onion_blinding).
2024-11-20 12:29:27 +01:00
Rusty Russell
e38f5d8c27 common: provide readable explanation when onion payload is invalid.
I had to use fprintf, which is terrible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-20 12:29:27 +01:00
Vincenzo Palazzo
6f0dbbb20f bolt12: allow to inject payer_metadata
Payer metadata is a field that controls the payer ID
provided during the fetchinvoice process.

There are use cases where this is highly useful, such as
proving that the payer has paid for the correct item.

Imagine visiting a merchant's website to pay for multiple offers, where
one of these offers is a default offer (with no description and no set amount).

In this scenario, the merchant could claim not to have received
payment for a specific item. Since the same offer may be used to
fetch invoices for different products, there needs to be a way to
identify which product the invoice corresponds to.

With this commit, it will be possible to inject payer metadata,
which helps solve the issue described above.

For example, possible payer metadata could be `to_hex(b"{payer_node_id}.{product_id}.{created_at}")`.

Changelog-Added: JSON-RPC: `fetchinvoice` allows setting invreq_metadata via `payer_metadata` parameter.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-11-19 22:54:22 +01:00
Rusty Russell
6c347a4050 pytest: fix flake in test_gossip_pruning
We actually pruned before we got all the channels.  Extend the pruning time,
which unfortunately makes the test slower.

```
2024-11-18T02:13:11.7013278Z node_factory = <pyln.testing.utils.NodeFactory object at 0x7ff72969e820>
2024-11-18T02:13:11.7014386Z bitcoind = <pyln.testing.utils.BitcoinD object at 0x7ff72968fe20>
2024-11-18T02:13:11.7014996Z 
2024-11-18T02:13:11.7015271Z     def test_gossip_pruning(node_factory, bitcoind):
2024-11-18T02:13:11.7016222Z         """ Create channel and see it being updated in time before pruning
2024-11-18T02:13:11.7017037Z         """
2024-11-18T02:13:11.7017871Z         l1, l2, l3 = node_factory.get_nodes(3, opts={'dev-fast-gossip-prune': None,
2024-11-18T02:13:11.7018971Z                                                      'allow_bad_gossip': True})
2024-11-18T02:13:11.7019634Z     
2024-11-18T02:13:11.7020236Z         l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
2024-11-18T02:13:11.7021153Z         l2.rpc.connect(l3.info['id'], 'localhost', l3.port)
2024-11-18T02:13:11.7021806Z     
2024-11-18T02:13:11.7022226Z         scid1, _ = l1.fundchannel(l2, 10**6)
2024-11-18T02:13:11.7022886Z         scid2, _ = l2.fundchannel(l3, 10**6)
2024-11-18T02:13:11.7023458Z     
2024-11-18T02:13:11.7023907Z         mine_funding_to_announce(bitcoind, [l1, l2, l3])
2024-11-18T02:13:11.7025183Z         l1_initial_cupdate_timestamp = only_one(l1.rpc.listchannels(source=l1.info['id'])['channels'])['last_update']
2024-11-18T02:13:11.7026179Z     
2024-11-18T02:13:11.7027358Z         # Get timestamps of initial updates, so we can ensure they change.
2024-11-18T02:13:11.7028171Z         # Channels should be activated locally
2024-11-18T02:13:11.7029326Z >       wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True] * 4)
```

We can see in logs, it actually started pruning already:

```
2024-11-18T02:13:11.9622477Z lightningd-1 2024-11-18T01:52:03.570Z DEBUG   gossipd: Pruning channel 105x1x0 from network view (ages 1731894723 and 0)
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-19 17:51:18 +10:30
Rusty Russell
1e8cbf2645 lightningd: don't access after free on plugin crash
tests/test_plugin.py::test_important_plugin does this, and it's inelegant:

```
lightningd-1 2024-11-18T07:33:09.433Z **BROKEN** plugin-fail_by_itself.py: Plugin marked as important, shutting down lightningd!
lightningd-1 2024-11-18T07:33:09.451Z DEBUG   lightningd: io_break: lightningd_exit
lightningd-1 2024-11-18T07:33:09.533Z DEBUG   connectd: REPLY WIRE_CONNECTD_START_SHUTDOWN_REPLY with 0 fds
lightningd-1 2024-11-18T07:33:09.575Z DEBUG   lightningd: io_break: connectd_start_shutdown_reply
lightningd-1 2024-11-18T07:33:09.802Z DEBUG   lightningd: Looking for [autoclean,failedforwards,num]
{'github_repository': 'ElementsProject/lightning', 'github_sha': '0729de783e95c5208b1706f7d27b23904596bb71', 'github_ref': 'refs/pull/7835/merge', 'github_ref_name': 'HEAD', 'github_run_id': 11887300979, 'github_head_ref': 'guilt/fix-flakes8', 'github_run_number': 11566, 'github_base_ref': 'master', 'github_run_attempt': '1', 'testname': 'test_important_plugin', 'start_time': 1731915163, 'end_time': 1731915190, 'outcome': 'fail'}
----------------------------- Captured stderr call -----------------------------
No plugin for askrene-create-layer ?
Lost connection to the RPC socket.Reading JSON input: Connection reset by peerReading JSON input: Connection reset by peerReading JSON input: Connection reset by peerReading JSON input: Connection reset by peer
--------------------------- Captured stdout teardown ---------------------------
------------------------------- Valgrind errors --------------------------------
Valgrind error file: valgrind-errors.28639
==28639== Invalid read of size 8
==28639==    at 0x168310: command_exec (jsonrpc.c:808)
==28639==    by 0x168A98: rpc_command_hook_final (jsonrpc.c:954)
==28639==    by 0x1AD48C: plugin_hook_call_next (plugin_hook.c:196)
==28639==    by 0x1AD407: plugin_hook_callback (plugin_hook.c:183)
==28639==    by 0x1A6074: plugin_response_handle (plugin.c:663)
==28639==    by 0x1A62F0: plugin_read_json_one (plugin.c:775)
==28639==    by 0x1A652D: plugin_read_json (plugin.c:826)
==28639==    by 0x390200: next_plan (io.c:60)
==28639==    by 0x390E56: do_plan (io.c:422)
==28639==    by 0x390EBD: io_ready (io.c:439)
==28639==    by 0x3932F1: io_loop (poll.c:455)
==28639==    by 0x1ABBE4: shutdown_plugins (plugin.c:2588)
==28639==  Address 0x5d25a20 is 48 bytes inside a block of size 88 free'd
==28639==    at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==28639==    by 0x3A31FB: del_tree (tal.c:456)
==28639==    by 0x3A317B: del_tree (tal.c:447)
==28639==    by 0x3A34DC: tal_free (tal.c:532)
==28639==    by 0x1ABAF3: shutdown_plugins (plugin.c:2575)
==28639==    by 0x16E0D3: main (lightningd.c:1514)
==28639==  Block was alloc'd at
==28639==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==28639==    by 0x3A2BCA: allocate (tal.c:256)
==28639==    by 0x3A3252: tal_alloc_ (tal.c:473)
==28639==    by 0x1A815E: plugin_rpcmethod_add (plugin.c:1425)
==28639==    by 0x1A83F9: plugin_rpcmethods_add (plugin.c:1470)
==28639==    by 0x1A965A: plugin_parse_getmanifest_response (plugin.c:1850)
==28639==    by 0x1A971F: plugin_manifest_cb (plugin.c:1872)
==28639==    by 0x1A6074: plugin_response_handle (plugin.c:663)
==28639==    by 0x1A62F0: plugin_read_json_one (plugin.c:775)
==28639==    by 0x1A652D: plugin_read_json (plugin.c:826)
==28639==    by 0x390200: next_plan (io.c:60)
==28639==    by 0x390E56: do_plan (io.c:422)
==28639==
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-19 17:51:18 +10:30