Repository navigation
v26.12rc3 - #9795
Merged
Merged
v26.12rc3#9795
Conversation
check.sh gets readelf and the pinned qemu-user from the host's nix, so without --host-nix `build` and `all` built every tarball and then failed the arm64 and armhf checks with "nix: not found" on a host that has only docker, coreutils and python3, which is all the driver says it needs. Run check.sh in the same pinned container as the build, with its tools from the flake's nixpkgs, and pass qemu in CHECK_QEMU_DIR. With --host-nix it runs on the host as before. The host-nix route also asked for an x86_64-linux qemu, which does not run on an aarch64 host; it now uses the current system. Changelog-None (cherry picked from commit 44bca56)
Without --version the artifacts are named by `git describe`, so on a commit without the release tag they get a label such as v26.12rc1-62-gafb7acb that no release has. For v26.12rc2 a co-signer checked out the release commit before fetching the tag, ran `zip`, and signed a file nobody else had. `sign` and `all` now refuse when HEAD is not exactly at a tag, unless --version is given or --no-sign is set, and point co-signers at `verify`, which takes the version from the manifest. `all` checks before it starts building. Changelog-None (cherry picked from commit 094491e)
- It pushed the tag to, and checked it against, the remote called origin, which on a captain's machine is often their fork. The target repository is now PUBLISH_GITHUB_REPO in publish.vars, and publish uses whichever remote points at it, for the tag and for the release. - It read the "Release 🚀" workflow state with `gh workflow view --json`, which gh does not have, so the check only ever warned. Ask the API instead, and refuse when the state cannot be read: a pushed tag cannot be taken back. - The release body linked the release's folder on the download host, which is a 404 because the bucket refuses listing, and only the zip, manifest and signatures were attached. Attach every published file, the tarballs included, and put the verification commands in the body. - Pass --s3-no-check-bucket: the publisher account may not create buckets, and rclone's existence check fails with 403 on some uploads. - Finish with the commands that re-enable the workflow and publish the pyln modules, which the tag push no longer does. Changelog-None (cherry picked from commit 9c5ddc4)
`all` ends with a smoke test that runs every row's container on this host, the arm ones under binfmt. A reboot drops binfmt handlers that were registered by hand, and for v26.12rc2 that surfaced only after the whole build. `all` now runs a trivial container per platform first and says how to register the handlers if one fails. Changelog-None (cherry picked from commit 98b9b64)
Under ASan these take 2-4GB each, and with four of them on the four workers of a GitHub runner the shard reaches its 16GB limit and the runner is lost. Put them in the heavy group, with test_xpay_maxparts_receiver_limit, so they run in turn. Changelog-None (cherry picked from commit 9a8ef54)
Open a zeroconf announced channel, quiesce it via `dev-quiesce` so both sides set `stfu_wait_single_msg = true`, then mine 1 block so both peers send `WIRE_ANNOUNCEMENT_SIGNATURES` while waiting for the first STFU protocol message. (cherry picked from commit a4a6cef)
BOLT ElementsProject#2 quiescence forbids channel state update messages (`update_*`, `commitment_signed`, etc.) after `stfu`, not BOLT ElementsProject#7 gossip messages. `announcement_signatures` does not mutate commitment state and is sent asynchronously via `connectd` when a funding or splice transaction confirms. Commit e11c2f6 exempted `WIRE_ANNOUNCEMENT_SIGNATURES` when in STFU mode with `!stfu_wait_single_msg`, but missed the `stfu_wait_single_msg` check immediately below it, causing `channeld` to warn (`Got invalid message during STFU mode: WIRE_ANNOUNCEMENT_SIGNATURES`) and disconnect. Exempt `WIRE_ANNOUNCEMENT_SIGNATURES` from the `stfu_wait_single_msg` check and preserve `stfu_wait_single_msg` so the following STFU protocol message is still accepted. (cherry picked from commit b30b028)
Both `disconnect_peer()` and `destroy_peer_conn()` removed unconnected (`subd->conn == NULL`) entries from `peer->subds` via `tal_arr_remove()` without calling `tal_free(peer->subds[i])`, unlike `free_all_subds()`. That left the `struct subd` orphaned under `struct peer`, triggering a `connectd` `MEMLEAK` if `dev-memleak` ran before `peer` was freed (e.g. in `test_restorefrompeer`). Add a unit test (`connectd/test/run-multiplex-disconnect.c`) covering both `disconnect_peer()` and `destroy_peer_conn()`. (cherry picked from commit ebb1058)
`json_add_string()` copies its string argument into the `json_stream` buffer, so allocating `tal_hex()` on `response` leaves an unreferenced `char[]` child attached to `struct json_stream` that `dev-memleak` reports as a leak. Add a unit test (`plugins/test/run-bcli-getutxout.c`) that runs `getutxout()` and verifies no `char[]` child remains attached to `captured_response`. (cherry picked from commit afd01c0)
Hold the `openchannel` / `openchannel2` hook on the fundee so `openingd` / `dualopend` blocks in `wire_sync_read(REQ_FD)`, then invoke `dev-memleak` before releasing the hook. (cherry picked from commit f6b5311)
`openingd` and `dualopend` can block in `wire_sync_read(REQ_FD)` while a plugin hook (such as `openchannel` / `openchannel2`) delays master's reply. If `lightningd` sends `WIRE_OPENINGD_DEV_MEMLEAK` (or `WIRE_DUALOPEND_DEV_MEMLEAK`) during that window, the daemon failed with `STATUS_FAIL_MASTER_IO` (`Error parsing 6105: 1791`). Loop on dev-memleak messages at those `wire_sync_read(REQ_FD)` call sites, matching the existing pattern in `dualopend.c`. (cherry picked from commit 08a26b2)
Verify `clnrest` with a custom `--clnrest-certs` path generates certificates without retrying for `cln-grpc`. (cherry picked from commit a58cfc2)
`cln-grpc` only writes certificates to the default lightning network directory, never to a custom `--clnrest-certs` path. Waiting 5 seconds (10 x 500ms) before generating certificates in a custom directory stalled startup unnecessarily. Also poll every 100ms instead of 500ms when waiting on the default directory so `cln-grpc` certs are picked up promptly. (cherry picked from commit fd69ca9)
During dev-memleak teardown, scan_for_pointers() tests every pointer-sized word in every tal allocation against memtable via memleak_ptr(). Previously each word ran siphash24() and probed the htable even for NULLs, small integers, and ASCII data, taking ~1.5s per node on debug builds. Use htable's existing common_mask/common_bits invariant to reject non-matching words before hashing, and replace siphash24 with a fast invertible pointer mix for this local-only dev table. Identical leak detection, ~20x faster dev-memleak. (cherry picked from commit b331d80)
The autouse jsonschemas fixture was function-scoped, reloading and compiling all 164 doc/schemas/*.json validators on every test (~150ms each). Similarly, checkPluginJSON() reloaded all 39 notification and hook schemas for every node in teardown (~30ms per node). Make jsonschemas session-scoped and lru_cache _extra_validator() and _plugin_schemas(). No test mutates the loaded schema dicts, and the exact same request, response, hook, and notification validations run. (cherry picked from commit 5c5731d)
NodeFactory.killall() previously checked dev_memleak and stopped each node sequentially, multiplying teardown latency by the number of nodes (especially noticeable on 5-14 node tests and under Valgrind). Run dev_memleak across all nodes in parallel via self.executor, then stop all nodes in parallel, preserving deterministic error reporting. Also cache lightningd --version per executable path in LightningD instead of spawning a subprocess for every node created. (cherry picked from commit dac6558)
Cheroot's Server defaults expiration_interval to 0.5s, causing each BitcoinRpcProxy.stop() to block for up to 500ms. BitcoinD.stop() also stopped all proxies sequentially before stopping bitcoind, adding ~0.5s per node to every test teardown (~2.5s on a 6-node test). Additionally, BitcoinRpcProxy.start() probed TCP connect to check readiness, which succeeds as soon as cheroot's prepare() calls listen(), before prepare() finishes starting worker threads and sets server.ready = True. Fast start=False tests could then enter teardown and call server.stop() while server.ready was still False, causing cheroot's stop() to return as a no-op before prepare() set ready = True and entered serve() forever, deadlocking proxy_thread.join(). Lower expiration_interval to 0.05s, wait for self.server.ready in start(), bound/retry proxy_thread.join() in stop(), and stop all proxies concurrently with bitcoind shutdown. (cherry picked from commit b48f15a)
…_for_logs wait_for() previously started at 0.25s and backed off up to 5s, while TailableProc.wait_for_logs() polled at a fixed 0.25s and wait_for_route() polled at 1s. Across thousands of sync_blockheight, node startup, and log waits, this added substantial idle sleep latency. Start wait_for() at 0.05s (capped at 1s, or 2s on SLOW_MACHINE), start wait_for_logs() at 0.02s backing off to 0.25s, and implement wait_for_route() using wait_for(). (cherry picked from commit 5c37f5a)
… by default Every lightningd startup was spawning all subdaemons with `--version` and allocating/reading/CRC32C-hashing ~1 GB of debug plugin binaries, nearly doubling startup time (~276ms -> ~145ms locally, and more under ASan/UBSan). Enable both dev flags unconditionally in `LightningNode`, intentionally trading away repeated per-node startup coverage of the subdaemon version check (`lightningd/lightningd.c`) and plugin binary checksum (`lightningd/plugin.c`) outside Valgrind. Both paths remain covered by dedicated tests (`test_version_reexec`, which now clears `dev-no-version-checks`, and `test_restart_on_update`, which already clears `dev-no-plugin-checksum`). (cherry picked from commit 9e394fe)
- Open PostgresDb's psycopg2 connection lazily on first Python query/exec instead of eagerly per node (most nodes never query Postgres from Python). - Fix the missing f-string in PostgresDb.stop(), close the client connection, and delegate database removal to PostgresDbProvider.drop_db(). - Guard CREATE/DROP DATABASE with a lock so parallel NodeFactory.get_nodes() calls are thread-safe, poll readiness every 50ms instead of 500ms, disable unnecessary durability settings for ephemeral test clusters, and add ScopedDbProvider for per-test database cleanup. (cherry picked from commit dabd55c)
Reuse one PostgreSQL cluster per pytest worker session instead of running initdb and starting/stopping a new postgres instance for every single test. NodeFactory wraps the session provider in ScopedDbProvider so every database created during a test (including bookkeeper accounts DBs) is dropped during fixture teardown once all nodes have stopped. (cherry picked from commit 127aab8)
- Add `*cln-lsps-client*` and `*cln-lsps-service*` to Valgrind's `--trace-children-skip` pattern, matching every other Rust plugin (`cln-grpc`, `clnrest`, `wss-proxy`, `cln-bip353`, `cln-currencyrate`). - Pass `--vgdb=no` to Valgrind to avoid per-process gdbserver FIFO/shm setup across thousands of subdaemon and plugin spawns without changing Memcheck error detection. - Avoid O(N^2) `getinfo()`/`listnodes(id)` RPC polling at the end of `NodeFactory.join_nodes()`. (cherry picked from commit 590e502)
Random sharding (`--test-group-random-seed=42`) created wide shard variance across Valgrind and first-integration shards. Add a zero-dependency `--balanced-group=G/N` option in `tests/conftest.py` that partitions collected tests via deterministic Longest Processing Time first (LPT) greedy bin-packing over `tests/test_durations.json` (and `tests/test_durations_valgrind.json` when `VALGRIND=1`, since CPU-heavy tests scale much more steeply than sleep-heavy tests under Valgrind): - Share `_skip_reason()` between `pytest_runtest_setup()` and LPT weighting so skipped `slow_test` / v2-only items cannot drift. - Preserve original collection order within each shard so heavy multi-node tests do not all launch simultaneously at t=0. - New tests not yet in the durations JSON fall back to a default weight and deterministically land in exactly one shard. - Add `tools/update-test-durations.py` to regenerate the duration tables from CI `report.xml` JUnit artifacts when shard balance drifts. (cherry picked from commit 7ba1264)
…n jobs - Add `TEST_ONLY=1` mode to `.github/scripts/setup.sh` so test-only jobs unpacking prebuilt artifacts skip heavy build/lint toolchains while keeping all runtime libraries and test tools; remove the unused `microsoft-prod` apt repo (which transiently 403s) and enable apt retries. - Skip redundant `git submodule sync && git submodule update` in the 6 pytest-only jobs (40 runners total) that never run `make` or touch `external/` C submodules, eliminating ~200 simultaneous GitHub clones that can trigger GitHub 403 rate limiting. - Switch `first-integration` (6), `integration-valgrind` (16), and `integration-sanitizers` (6) to `--balanced-group=G/N`. - Shard `full-integration` postgres (3) and liquid (3) plus `min-btc-support` (2). - Start `integration-valgrind` and `min-btc-support` directly after `compile`. (cherry picked from commit 5a31571)
And fix prototypes which caused mocks to break. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from commit c345de5)
We're going to need it if lightningd wants to double-check the tx it gets from simpleclosed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from commit ee673b0)
From lightningd's perspective, there are two messages: 1. We got a signature on our closing tx. 2. We got a signature on their closing tx. The closer/closee naming is confusing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from commit bd2f3d9)
simpleclosed checks it, but for thoroughness (and to prevent bugs and avoid any potential exploits in it) we need to check it too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from commit 3157629)
We want our own closing tx, but theirs might be too low-fee to use. Broadcast it, as a courtesy, but don't *rely* on it! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `experimental-simple-close` now doesn't save peer's closing transaction, so it can't be stuck with a too-low-fee tx. (cherry picked from commit 0c90fa6)
In theory, it can change between us telling simpleclosed, and checking. Simplest answer is to save the value. Reported-by: https://github.com/Andezion Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from commit 2ff616a)
Add --developer options --dev-htlc-offer-timeout-secs (default 30), --dev-plugin-startup-timeout-secs (default 120), and --dev-stable-connection-secs (default 60) so integration tests can exercise these timers without long wall-clock sleeps, leaving production defaults unchanged. (cherry picked from commit 6e13a9f)
…ves.py check_coin_moves() iterated over enumerate(expected_moves) (so isinstance(m, list) was always False) and compared expected_count against all accounts' moves rather than account_id's moves, triggering an unconditional 5-second sleep on nearly every call. Count per-account moves properly and poll with wait_for(..., timeout=10) only when lagging. In test_coinmoves.py, wait for 'onchaind complete, forgetting peer' before checking final moves instead of sleeping 5 seconds six times. (cherry picked from commit e79fa12)
…cing tests Ten time.sleep(5) calls in test_splicing.py and test_splicing_disconnect.py waited to check either that no unilateral close tx was recorded in channeltxs (only written during chaintopology block processing) or that channel_funding_inflights cleared. Replace them with sync_blockheight(bitcoind, [l1, l2]) and wait_for(), saving ~50s across splicing tests while making the checks deterministic. (cherry picked from commit cbed9b2)
- Add --dev-bkpr-currencyrate-tolerance (defaulting to 60s) in bookkeeper so test_bkpr_currencyrate_warns_for_old_events can test stale-event warning without two 61s sleeps (~116s saved), and wait for the Unix second to advance past inv2 before paying inv3 so inv2's 1s cached rate does not cover inv3. - In test_bkpr_currencyrate_persisted, l1.restart() already clears cln-currencyrate's cache, so sleep(1) suffices for a new timestamp instead of sleep(61) (~60s saved, matching test_bkpr_currencyrate_ranges). - In test_bkpr_listaccountevents_realtime, wait_for() the datastore entry instead of a blind sleep(10) (~9.5s saved). - In test_currencyrate_rounding, test all three sources on one node instead of starting three nodes sequentially, and lower fake_rateserver slow_delay from 1s to 0.2s. (cherry picked from commit 6335c20)
- In `test_createrune`, use `rate=6` (10s) and `rate=3` (20s) instead of `rate=3` (20s) and `rate=1` (60s), leaving ~10s of margin for RPCs under Valgrind, and use a 3s (8s under Valgrind) expiry for `rune3` instead of 15s (~69s saved). - In `test_createrune_per_restriction`, check all five 2s per-unit runes across a single 2.2s sleep instead of five sequential 3s sleeps, and verify `per=1min` stays rate-limited after 2.2s instead of sleeping 61s (~75s saved). (cherry picked from commit fcee696)
…t_behaviors test_lsps2_mock_transport_behaviors was parametrized across 8 transport configs, starting a fresh bitcoind and two lightningd nodes for each case only to call lsps2-mock-configure and lsps0.list_protocols. Run all 8 cases sequentially on a single node pair (lsps2-mock-configure replaces the config), cutting ~7 node-pair startups/teardowns with identical coverage. (cherry picked from commit 947f7e0)
In notifications_received_via_websocket(), sio.connect() already completes the Socket.IO namespace handshake before returning, so remove the 2s pre-RPC sleep and replace the 2s post-RPC sleep with wait_for() on the expected notification key. Also drop the two 2s sleeps in test_websocket_upgrade_header() where sio.connect() already failed. (cherry picked from commit 5a1cbae)
- Replace time.sleep(5) with wait_for() on listforwards() in test_forward_local_failed_stats and wait_for_logs() on dev_ignore_htlcs in test_htlcs_cltv_only_difference. - Use timeout=2 instead of 10 for the intentional timeout check in test_fetchinvoice. - Use shorter recurrence/expiry/enforcedelay windows (scaling up on VALGRIND or SLOW_MACHINE) in test_fetchinvoice_recurrence, test_recurrence_expired_offer, test_recurring_currency_invoice_refresh, and test_setchannel_enforcement_delay, while still checking 1minutes recurrence parsing and next_period calculation. (cherry picked from commit 22656e9)
Add an open_channels() helper that funds all channels in one sendmany transaction and confirms/announces them in a single block batch, and replace sequential join_nodes() loops in test_xpay_limited_max_accepted_htlcs, test_xpay_unknown_next_peer_excludes_node, setup_failing_hub, test_xpay_maxparts, and test_xpay_maxparts_unannounced_retry (waiting for l2 to sync l1's public channels via gossip before creating the unannounced invoice so listincoming includes the routehint). Also use retry_for=2 instead of 10 for the intentional timeout check in test_xpay_blockheight_mismatch. (cherry picked from commit 52736b3)
Scale invoice expiry durations down on fast machines (keeping larger margins under VALGRIND or SLOW_MACHINE) in test_invoice_expiry and test_expiry_startup_crash, and verify the invoice status is expired after restart in test_expiry_startup_crash. (cherry picked from commit 2961ba3)
Use shorter autoclean-cycle intervals on non-Valgrind runs in test_autoclean and test_autoclean_batch, poll more frequently in test_autoclean, and sleep 4s instead of 20s (with an explicit getinfo liveness check) in test_autoclean_timer_crash. (cherry picked from commit 8b8fe94)
- Use --dev-htlc-offer-timeout-secs in test_htlc_failed_noclose instead of sleeping 35 seconds. - Synchronize mock_donothing with a threading.Event in test_fundee_node_unconfirmed instead of sleeping 10 seconds. (cherry picked from commit 62c0b96)
Use node_factory.get_nodes() instead of starting peers sequentially, and pass allow_bad_gossip=True on peers since l1 closes all four announced channels before peers finish receiving each other's channel_announcements. (cherry picked from commit a94d2ec)
Use the existing start_channels() helper in test_mpp, test_errors, and test_limits instead of pairs of sequential join_nodes() calls, and deduplicate nodes in start_channels(). (cherry picked from commit 2dba266)
Wait only until the clock passes after_12 + 1 instead of sleeping 10 seconds unconditionally between creating the two channels. (cherry picked from commit c4fc629)
Both cln-currencyrate and tests/plugins/currencyUSDAUD5000.py register the currencyconvert RPC method at manifest time. Match test_offer, test_fetchinvoice, and test_recurring_currency_invoice_refresh by passing disable-plugin=cln-currencyrate in test_fetchinvoice_invoice_expiry and test_xpay_currency_offer to avoid a startup duplicate-method race. (cherry picked from commit aee7e46)
Mark the remaining 7 high-memory tests not covered by ElementsProject#9787 (`test_onchain_multihtlc_our_unilateral`, `test_onchain_multihtlc_their_unilateral`, `test_funding_v2_cancel_race`, `test_payerkey`, `test_commando_stress`, `test_xpay_fee_insufficient_bias`, and `test_xpay_fee_insufficient_disable`) with `@pytest.mark.xdist_group("heavy")` so they serialize on one worker under ASan/UBSan. (cherry picked from commit fabb23c)
Pass --dev-plugin-startup-timeout-secs (10s, or 30s under Valgrind) in test_plugin_slowinit, test_plugin_command, test_failing_plugins, and test_plugin_startdir_lol, and --dev-stable-connection-secs (25s under Valgrind, 10s on SLOW_MACHINE, 5s otherwise) in test_last_stable_connection. (cherry picked from commit ba85b70)
In test_reservations_leak_under_load, 300 concurrent HTLCs across 6 Valgrind nodes on a 4-vCPU runner can briefly exceed connectd's 5s wake-delay threshold; allow the 'connectd: wake delay for' log under VALGRIND. (cherry picked from commit f204015)
…ttle Pass --dev-gossip-cpu-budget=500000 under VALGRIND so Valgrind's ~20x CPU overhead does not blow the 1500usec dev CPU budget and stall out4 past connectd's ping timeout, while keeping the 1000-byte/s traffic throttle active. (cherry picked from commit 877dedb)
In test_splice_upgrade_with_pending_splice, connect and wait for WIRE_CHANNEL_REESTABLISH on both l1 and l2 before calling bitcoind.generate_block(6), matching test_splice_reconnect_after_lock_no_channel_ready. Under Valgrind, l1's reconnect could take longer than block generation, causing l2 to process all 6 blocks while channeld was detached and never send WIRE_SPLICE_LOCKED after reconnecting. (cherry picked from commit 5fefae0)
nGoline
requested review from
Lagrang3,
cdecker and
daywalker90
as code owners
December 1, 2026 23:25
Changelog-None
inv1 was created with a 5-second expiry. Under Valgrind, creating the invoice, running the pay check, and redirecting pay->xpay can take over 5 seconds, so xpay rejects the invoice as already expired before any HTLC or WIRE_COMMITMENT_SIGNED is sent, leaving wait_for_log to time out. Use a 30-second expiry under Valgrind/SLOW_MACHINE (10s otherwise), and wait explicitly until strictly past expires_at and l2 marks inv1 expired instead of a fixed sleep. Changelog-None (cherry picked from commit 1d7af90)
nGoline
merged commit Dec 2, 2026
6f1f044
into
ElementsProject:release-26.12
105 of 122 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v26.12rc3: cherry-picks from master, then the changelog and package versions.
Cherry-picked in master order, with
-xso each commit names its original. Nothing else merged since rc2 is included.VALGRIND/SLOW_MACHINEimport it adds)The
v26.12rc3commit moves the CHANGELOG heading to rc3 and adds entries for #9784, #9788 and #9792 (which went in as Changelog-None), and runsupdate-versions(uv.lockchanges only the three pyln versions). The commit after it gives the release its final name, "Unjammable Taproot Channels", with the namer line, in the format v26.06 used.Every pick applied without conflicts. Locally the full
check-source, the build, unit tests and the simple-close, quiescence, openingd memleak, forward stats, rune and currencyrate integration tests pass.Changelog-None