17611 Commits

Author SHA1 Message Date
Rusty Russell
f799c4c556 pytest: fix flake in test_sql.
If l2 hasn't seen l1's node_announcement yet:

```
        # Correctly handles missing object.
>       assert l2.rpc.sql("SELECT option_will_fund_lease_fee_base_msat,"
                          " option_will_fund_lease_fee_basis,"
                          " option_will_fund_funding_weight,"
                          " option_will_fund_channel_fee_max_base_msat,"
                          " option_will_fund_channel_fee_max_proportional_thousandths,"
                          " option_will_fund_compact_lease"
                          " FROM nodes WHERE HEX(nodeid) = '{}';".format(l1.info['id'].upper())) == {'rows': [[None] * 6]}
E       AssertionError: assert {'rows': []} == {'rows': [[None, None, None, None, None, None]]}
E         
E         Differing items:
E         {'rows': []} != {'rows': [[None, None, None, None, None, None]]}
E         
E         Full diff:
E           {
E         -     'rows': [
E         +     'rows': [],
E         ?              ++
E         -         [
E         -             None,
E         -             None,
E         -             None,
E         -             None,
E         -             None,
E         -             None,
E         -         ],
E         -     ],
E           }

tests/test_plugin.py:4131: AssertionError
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-03 16:12:04 +10:30
Rusty Russell
5c31d33786 common: remove legacy onion translation.
This was added in 24.05, but LND since 0.18.3 no longer ever creates
such onions, and even that version (September 2024) is now a long way
behind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Protocol: we no longer support legacy onions (never sent by LND >= 0.18.3, which was the last)
2026-02-03 15:35:36 +10:30
Rusty Russell
2c0214f246 common: remove unused type field.
We always use modern TLV style: in fact, this field was never set!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-03 15:35:36 +10:30
Rusty Russell
6a937307b1 decode: don't treat every failure as a rune.
If we can't decode something, and it decodes as a rune (and all bech32
strings do!), then we would usually just complain it was a malformed
rune.  Be a big more useful, when the parameter looks like somthing else.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `decode` is now more informative with malformed strings (won't claim everything is a malformed rune!).
2026-02-03 13:05:23 +10:30
Rusty Russell
5053e2e3f6 common: enforce currency-requires-amount check.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-03 13:05:23 +10:30
Rusty Russell
1de4e1dc28 pytest: test for amountless offer with currency.
Should fail: see https://github.com/lightning/bolts/pull/1279

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-03 13:05:23 +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
Christian Decker
ff34e485bc feat: Enhance JUnit XML reporting with environment variables and add import to conftest.py
Changelog-None
2026-02-02 11:41:09 +01:00
21M4TW
d76e4e7149 lightningd: don't allow enableoffer on single-use offer.
Changelog-Fixed: enableoffer: Adding an error when trying to activate an used single use offer (don't crash!)
2026-02-02 10:31:02 +10:30
Rusty Russell
e2d17cea0c pytest: test for crash when enableoffer called on a used single-use offer.
Assertion happens here:

	newstatus = offer_status_in_db(s | OFFER_STATUS_ACTIVE_F);

Since OFFER_STATUS_SINGLE_F|OFFER_STATUS_USED_F|OFFER_STATUS_ACTIVE_F
is not a valid combination:

```
lightningd-3 2026-01-28T04:45:21.184Z **BROKEN** lightningd: offer_status_in_db: 7 is invalid
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v25.12-92-g7fff32d-modded)
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: common/daemon.c:83 (crashdump) 0x5a883759dbb7
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 ((null)) 0x79a2b0c4532f
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ./nptl/pthread_kill.c:44 (__pthread_kill_implementation) 0x79a2b0c9eb2c
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ./nptl/pthread_kill.c:78 (__pthread_kill_internal) 0x79a2b0c9eb2c
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ./nptl/pthread_kill.c:89 (__GI___pthread_kill) 0x79a2b0c9eb2c
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ../sysdeps/posix/raise.c:26 (__GI_raise) 0x79a2b0c4527d
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ./stdlib/abort.c:79 (__GI_abort) 0x79a2b0c288fe
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/log.c:1054 (fatal_vfmt) 0x5a8837509557
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/log.c:1064 (fatal) 0x5a88375095fe
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ./wallet/wallet.h:1451 (offer_status_in_db) 0x5a88375491dc
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: wallet/wallet.c:6160 (offer_status_in_db) 0x5a8837555388
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: wallet/wallet.c:6162 (wallet_offer_enable) 0x5a8837555388
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/offer.c:288 (json_enableoffer) 0x5a8837540939
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:769 (command_exec) 0x5a8837503198
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:910 (rpc_command_hook_final) 0x5a8837503198
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:884 (rpc_command_hook_final) 0x5a8837503198
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/plugin_hook.c:243 (hook_done) 0x5a8837535383
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/plugin_hook.c:343 (plugin_hook_call_next) 0x5a8837535383
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:998 (plugin_hook_call_rpc_command) 0x5a8837503c4f
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:1123 (parse_request) 0x5a8837503c4f
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:1217 (read_json) 0x5a8837503c4f
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:60 (next_plan) 0x5a88375eca38
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:422 (do_plan) 0x5a88375eca38
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:439 (io_ready) 0x5a88375eca38
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:470 (io_loop) 0x5a88375eead5
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:22 (io_loop_with_timers) 0x5a8837501f8e
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1492 (main) 0x5a88374d3c27
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ../sysdeps/nptl/libc_start_call_main.h:58 (__libc_start_call_main) 0x79a2b0c2a1c9
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: ../csu/libc-start.c:360 (__libc_start_main_impl) 0x79a2b0c2a28a
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x5a88374d5aa4
lightningd-3 2026-01-28T04:45:21.260Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-02 10:31:02 +10:30
Lagrang3
f1bf66c91f askrene: fixed a timeout corner case
Changelog-Fixed: askrene: fixed a class of corner cases that cause askrene main loop to timeout instead of quickly failing, thus wasting runtime.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-02-02 10:23:27 +10:30
Lagrang3
597da1fef9 askrene: add test that triggers infinite loop
Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-02-02 10:23:27 +10:30
Lagrang3
41a5c68aa8 askrene: consider fees during *explain failure*
We would try to explain a failure by simply finding a path between
source and destination and then checking the constraints.
However, we did not add fees.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-02-02 10:23:27 +10:30
Lagrang3
bb3be7e8f8 askrene: remove unnecessary print in test
Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-02-02 10:23:27 +10:30
Chandra Pratap
461ca68688 fuzz-tests: Add coverage increasing inputs to seed corpora
Improvements in the fuzz-testing scheme of
`fuzz-bolt12-offer-decode` led to the discovery of test inputs
that result in greater in code coverage.

Add these inputs to the test's seed corpus.
2026-01-30 15:23:11 +10:30
Chandra Pratap
557a744bb7 fuzz-tests: Make fuzz-bolt12-offer-decode roundrip
Changelog-None: Currently, the `BOLT #12` offer parsing test only
tests the offer decode function. Add a test for the encoding
function as well by making the test roundtrip.
2026-01-30 15:23:11 +10:30
Dusty Daemon
4c10cb7610 Docs: Update mac instructions to gmake
Apple bundles a rather old version of GNU Make: 3.81. Our Makefiles use the &: feature which requires version 4.3. Apparently Apple isn’t updating GNU Make anymore due to a licensing issue.

Switching the instructions over to using gmake installed from the brew package manager, which currently installs 4.4.1

Changelog-None
2026-01-30 10:22:53 +10:30
Rusty Russell
cc227ed2fa common: tighten restrictions on periods, as per latest draft.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-30 10:05:07 +10:30
Lagrang3
3822a67030 askrene: add auto.include_fees layer
Changelog-Added: askrene: add a new layer auto.include_fees thhat makes fees be deducted from the payment amount making in effect the receiver pay for routing fees.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-01-29 15:20:25 +10:30
Marcel Hernandez
3917cee83c fix: build on Alpine Linux
Reference: 53154a40a5
2026-01-28 17:23:00 +10:30
Rusty Russell
bb7602cd9c configure: remove gratuitous CSANFLAGS print.
It's printed at the bottom, no need to print as we're determining it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-28 10:44:55 +10:30
Rusty Russell
744432dd63 Build: add function sections.
This allows further reduction in binary sizes.

Size of all user before:
	   text		   data	    bss	    dec		    hex	filename
	64277932	 904968	 317576	65500476	3e7753c	(TOTALS)

After:
	52443036	 729560	 271720	53444316	32f7edc	(TOTALS)

Some are dramatic, such as lightning-cli not pulling in libbacktrace:

 174454	   2880	    296	 177630	  2b5de	cli/lightning-cli
  56633	   2608	    232	  59473	   e851	cli/lightning-cli

But most things get a 25% trim:

3972339	 363568	  21760	4357667	 427e23	lightningd/lightningd
3300337	 247768	  21664	3569769	 367869	lightningd/lightningd

Changelog-Changed: Build: most binaries are now about 20% smaller.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-28 10:44:55 +10:30
Rusty Russell
01c1264c5b patch configure-check-function-sections.patch 2026-01-28 10:44:55 +10:30
Rusty Russell
c8eb54be48 Makefile: improve print-binary-sizes to be more meaningful.
Users care about memory more than disk, and they care about programs
they run more than our test programs and tools.

Also, fix dependencies on print-binary-sizes, as spotted by
https://github.com/Lagrang3

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-28 10:44:55 +10:30
Rusty Russell
c7d313ea00 pytest: also make sure askrene doesn't suffer when reloading many layers on startup.
We used non-persistent layers before, but what if we save to the datastore and restore?

This takes it from 29 to 45 seconds.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 13:59:36 +10:30
Rusty Russell
a3946663ec askrene: speed up when using large number of layers.
Simple bench.

Before:
   Creating 20,000 layers:  20 seconds
   Creating 50,000 layers:  107 seconds

After:
   Creating 20,000 layers:  7 seconds
   Creating 50,000 layers:  15 seconds
   Creating 100,000 layers: 29 seconds

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 13:59:36 +10:30
Rusty Russell
ff60983319 pytest: add askrene layer creation bench.
This means it has to do a lookup and an insert.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 13:59:36 +10:30
Rusty Russell
fe5c3c958d wallet: conduct unit tests with both bip86 and bip32.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
1279a58910 pytest: changed old_hsmsecret to default to false.
This changes various tests in minor ways:

1. The "l2" secret key in tests/plugins/channeld_fakenet.c is updated.
2. The decompressed gossip data node id needs changing.
3. The coinmoves order changes in bookkeeper for anchors.
4. Various harcoded gossip constants change.
5. Some hardcoded makesecret results change.
6. zeroconf tests which hardcoded node ids change.
7. Arbitrary rune strings change.
8. A log message which uses node ids changes.
2026-01-27 09:32:49 +10:30
Rusty Russell
12bc5b04e2 pytest: use hsmtool's getsecret instead of deprecated getcodexsecret, parameterize test_recover_command.
This matters for mnemonic nodes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:32:49 +10:30
Rusty Russell
b2b03e6e46 pytest: parameterize test_showrunes.
Another one we want to make sure stays unchanged.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
129b207742 pytest: test upfront_shutdown_script with new-style hsm_secret too. 2026-01-27 09:32:49 +10:30
Rusty Russell
dae9140a8b pytest: parameterize test_payerkey and test_exposesecret.
These are explicitly written to check that the values don't accidentally change,
which applies to both old and new styles.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
c653955de1 tests: update test so use both node ids
This test has been split into two to assert on both the old and the new hsm_secret
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
9d331f5455 test: mark bookkeeper test to use old hsm secret
bookkeeper's fee tracking depends on deterministic channel structure, which depends on node ID ordering. I'm marking this with the old_hsmsecret option for now.
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
c076a100c2 test: use old hsmsecret format for hardcoded onion message 2026-01-27 09:32:49 +10:30
Rusty Russell
cb51b7ea91 pytest: test names for new nodes. 2026-01-27 09:32:49 +10:30
Rusty Russell
c7973b8ae0 pytest: make sure to use old_hsmsecret on downgrade tests.
We only support downgrade if you upgraded, so your hsm_secret will be old.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
81d1d4a367 pytest: use old hsm secret whenever a canned database files is used
Anything using a canned db depends on the node ids being generated from the old hsm seed.
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
02bfa4136f pyln-testing: add old_hsmsecret param to get_node.
This defaults to false for now: this breaks a lot of tests (since node ids change!)
once we switch to true.
2026-01-27 09:32:49 +10:30
Sangbida Chaudhuri
6a9bdb8087 pytest: determine scid direction dynamically
Since we have changed our hsm_secret seed the node ids have all change hence the asseertions on the scids break. This changes it so that the direction is determined when the test executes.
2026-01-27 09:32:49 +10:30
Rusty Russell
4d8f923a9a logging: switch to a simple ringbuffer.
We keep a history of logs internally, so we can drop them to disk on a
crash.  This "black box recorder" was some of the first code I wrote
for CLN, but I can't remember the last time we use a crash log to
diagnose a problem.

We attempt to prune it to keep it under 10MB, but the complexity
and cost is rarely worth it: simplify it to use a ringbuffer.

Changelog-Changed: lightningd: logging is now more efficient internally (no more pruning, simple ringbuffer).

```
     139993 DEBUG   lightningd: fixup_scan: block 786151 with 1203 txs
===>  55388 DEBUG   plugin-bcli: Log pruned 1001 entries (mem 10508118 -> 10298662)
      33000 DEBUG   gossipd: Unreasonable timestamp in 0102000a38ec41f9137a5a560dac6effbde059c12cb727344821cbdd4ef46964a4791a0f67cd997499a6062fc8b4284bf1b47a91541fd0e65129505f02e4d08542b16fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d61900000000000d9d56000ba40001690fe262010100900000000000000001000003e8000001f30000000000989680
      23515 DEBUG   hsmd: Client: Received message 14 from client
      22269 DEBUG   024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605-hsmd: Got WIRE_HSMD_ECDH_REQ
      14409 DEBUG   gossipd: Enqueueing update for announce 0102002f7e4b4deb19947c67292e70cb22f7fac837fa9ee6269393f3c513d0431d52672e7387625856c19299cfd584e1a3f39e0f98df13c99090df9f4d5cca8446776fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d61900000000000e216b0008050001692e1c390101009000000000000003e800000000000013880000004526945a00
      12534 DEBUG   gossipd: Previously-rejected announce for 514127x248x1
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: Got it!
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: ... , awaiting 1120
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: Sending master 1020
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:31:02 +10:30
Rusty Russell
6749c65641 getlog: fix schema.
getlog() only gets recent logs, not all of them (since it prunes, and soon will be a ringbuffer).

And "data" is actually an optional field, not required.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:31:02 +10:30
Rusty Russell
16e9116066 lightningd: move log_prefix and log_entry struct definitions into log.c.
They're only exposed because of the notifications, but they are better
off with explicit parameters anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:31:02 +10:30
Rusty Russell
e383e14cb3 connectd: don't be That Node when someone is gossipping crap.
As seen in my logs, we complain about nodes a *lot* (Hi old CLN!).

```
===>1589311 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-connectd: peer_out WIRE_WARNING
     139993 DEBUG   lightningd: fixup_scan: block 786151 with 1203 txs
      55388 DEBUG   plugin-bcli: Log pruned 1001 entries (mem 10508118 -> 10298662)
      33000 DEBUG   gossipd: Unreasonable timestamp in 0102000a38ec41f9137a5a560dac6effbde059c12cb727344821cbdd4ef46964a4791a0f67cd997499a6062fc8b4284bf1b47a91541fd0e65129505f02e4d08542b16fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d61900000000000d9d56000ba40001690fe262010100900000000000000001000003e8000001f30000000000989680
      23515 DEBUG   hsmd: Client: Received message 14 from client
      22269 DEBUG   024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605-hsmd: Got WIRE_HSMD_ECDH_REQ
      14409 DEBUG   gossipd: Enqueueing update for announce 0102002f7e4b4deb19947c67292e70cb22f7fac837fa9ee6269393f3c513d0431d52672e7387625856c19299cfd584e1a3f39e0f98df13c99090df9f4d5cca8446776fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d61900000000000e216b0008050001692e1c390101009000000000000003e800000000000013880000004526945a00
      12534 DEBUG   gossipd: Previously-rejected announce for 514127x248x1
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: Got it!
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: ... , awaiting 1120
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: Sending master 1020
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:31:02 +10:30
Rusty Russell
cef86d1e25 gossmap: don't log every time we don't like a cupdate.
This happens for about 300 channels, from every process that loads the gossmap.

It's not very useful to flood the logs, so just log a summary.

To be fair, on my node, this is only the 11th most common message, so we will
revisit the others too:

```
    1589311 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-connectd: peer_out WIRE_WARNING
     139993 DEBUG   lightningd: fixup_scan: block 786151 with 1203 txs
      55388 DEBUG   plugin-bcli: Log pruned 1001 entries (mem 10508118 -> 10298662)
      33000 DEBUG   gossipd: Unreasonable timestamp in 0102000a38ec41f9137a5a560dac6effbde059c12cb727344821cbdd4ef46964a4791a0f67cd997499a6062fc8b4284bf1b47a91541fd0e65129505f02e4d08542b16fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d61900000000000d9d56000ba40001690fe262010100900000000000000001000003e8000001f30000000000989680
      23515 DEBUG   hsmd: Client: Received message 14 from client
      22269 DEBUG   024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605-hsmd: Got WIRE_HSMD_ECDH_REQ
      14409 DEBUG   gossipd: Enqueueing update for announce 0102002f7e4b4deb19947c67292e70cb22f7fac837fa9ee6269393f3c513d0431d52672e7387625856c19299cfd584e1a3f39e0f98df13c99090df9f4d5cca8446776fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d61900000000000e216b0008050001692e1c390101009000000000000003e800000000000013880000004526945a00
      12534 DEBUG   gossipd: Previously-rejected announce for 514127x248x1
===>  12092 DEBUG   connectd: Bad cupdate for 641641x1164x1/1, ignoring (delta=80, fee=1073742199/58)
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: Got it!
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: ... , awaiting 1120
      10761 DEBUG   02e01367e1d7818a7e9a0e8a52badd5c32615e07568dbe0497b6a47f9bef89d6af-channeld-chan#70770: Sending master 1020
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-27 09:31:02 +10:30
Se7enZ
eba330566d devtools: Set pre-commit default versions for Python and NodeJS.
Default to Python 3 and NodeJS to use that which is on the system,
avoiding conflicts with `nodeenv`.
2026-01-24 09:40:49 +10:00
Se7enZ
2fa0feecc5 devtools: Replace Ruff with Flake8 in pre-commit. 2026-01-24 09:40:49 +10:00
Se7enZ
623300d6a3 devtools: Add commitlint to pre-commit. 2026-01-24 09:40:49 +10:00
Se7enZ
5ca181ec89 devtools: Add custom include-order-fixer to pre-commit.
Also fixes some exising file spacing issues. Preserves whitespace and
comments.

Assisted by Cursor Auto.
2026-01-24 09:40:49 +10:00