EP
← All projectsElements Project

Core Lightning

Modular C implementation of the Lightning Network protocol and node stack.

BitcoinLightning NetworkNormal
Repository coverage

1856 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

158security candidates263second-pass queue1853AI analyses
140commits · 30 days
225commits · 60 days
803commits · 180 days
1839commits · 365 days
Backfill bands
Aug 5 → Feb 61049 seen37 candidatesComplete
Feb 6 → Jun 6579 seen10 candidatesComplete
Jun 6 → Jul 678 seen1 candidatesComplete
Jul 6 → Aug 5147 seen16 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

70/100 average clarity
432Strong · 80–100
1164Adequate · 60–79
231Thin · 40–59
29Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
dovgopoly15015164
Rusty Russell95873958072
Sangbida Chaudhuri14731146066
Dusty Daemon771377066
ShahanaFarooqui931093063
daywalker9090589062
Níckolas Goline40540076
Lagrang376476069
Christian Decker36436072
Vincenzo Palazzo838080
Chandra Pratap56256082
ekzyis222063
Analysis record

Published AI watches

Last scanned 32 minutes ago

Informational 15 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Revert "doc: require Homebrew GNU make and gpatch on macOS"

This commit is a simple documentation revert. It undoes a previous change that told macOS users to install GNU make and GNU patch from Homebrew and to put those tools first in their command path. The reverted instructions now omit gpatch a…

0cfa949fby Sangbida Chaudhuri+4−81 file
No security note in commit
Informational 15 AI analysisMessage 75 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Revert "tests: drop obsolete x-prefix in compacter-slow.sh"

This commit re-adds an old-style 'x' prefix to a string comparison in a test helper script. It is a test-only change with no effect on the actual Core Lightning node software, user funds, network behavior, or security. The change simply re…

116fd7cdby Sangbida Chaudhuri+1−11 file
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: require Homebrew GNU make and gpatch on macOS

This commit only updates macOS installation instructions in the documentation. It tells macOS users to install newer GNU versions of 'make' and 'patch' from Homebrew because Apple's built-in tools are too old for building and running sourc…

d3ff1474by Sangbida Chaudhuri+8−41 file
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: drop obsolete x-prefix in compacter-slow.sh

This commit is a trivial shell script cleanup. It removes an old-fashioned 'x' prefix from a string comparison in a test helper script so that a newer version of the Shellcheck linter stops warning about it. The change does not alter progr…

474c272aby Sangbida Chaudhuri+1−11 file
No security note in commit
Informational 18 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

common: hoist amount+currency parsing into common code.

This commit moves existing code that parses payment amounts (Bitcoin millisatoshis, 'any' amount, or fiat currency amounts) from one plugin file into a shared library so it can be reused by a future feature. It is a code refactoring with n…

Refactoring of amount-parsing code into a shared helperAddition of explicit u64 overflow guards (mul_overflows_u64, add_overflows_u64) in the new common codeNo change to wire protocol or RPC interface semantics
e0f86c17by Rusty Russell+112−723 files
No security note in commit
Informational 17 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: internal cleanups since all non-command JSON IDs are strings.

This is a routine internal cleanup commit in Core Lightning. It removes an unused helper function and simplifies how JSON-RPC request IDs are stored and formatted, since the project now always uses string IDs for non-command JSON traffic. …

No security-relevant keywords in commit title or messageNo CVE, advisory, or bug reference presentChanges are refactor/cleanup in nature
a70ae963by Rusty Russell+25−378 files
No security note in commit
Informational 15 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

common: hoist hash_str helper into its own header.

This commit is a routine code cleanup: it moves a small string-hashing helper function into a shared header file so it can be reused without being copied and pasted. There is no change to behavior, no bug fix, and no security relevance.

581bbb1fby Rusty Russell+16−176 files
No security note in commit
Informational 23 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

downgrade: we need to remove "impressions" from askrene datastore when downgrading to v26.06.

This is a database downgrade helper fix, not a live network vulnerability. Core Lightning's downgrade tool previously failed to strip out new 'channel impression' records when rolling a database back to version v26.06. The patch teaches th…

Database downgrade path could leave incompatible records in older schemaOffline tool only; no remote or on-chain triggerFix prevents potential node startup failure after version rollback
4d926285by Rusty Russell+43−111 file
No security note in commit
Low 31 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

downgrade tool: fix invalid memory bug

This commit fixes a typo in a database downgrade helper tool. The bug caused the tool to pass a negative number (turned into a huge positive size) when copying data, which led to an out-of-memory (OOM) error. The fix swaps two variable nam…

Integer underflow / negative-to-size_t wrap leading to excessive allocationOut-of-memory crash in maintenance toolMemory corruption potential if allocation somehow succeeded
42995326by Lagrang3+8−81 file
No security note in commit
Informational 24 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

xpay: actually tell askrene when a payment succeeded.

This commit fixes a bookkeeping bug in Core Lightning's xpay plugin. Previously, when a payment succeeded, xpay did not tell the askrene routing-helper that the route worked. As a result, askrene kept stale or overly pessimistic ideas abou…

Missing success feedback to routing layer can degrade payment reliabilityStale negative impressions may bias future path selection toward worse or failing routesNo direct funds-loss primitive is introduced or fixed
a66fabd4by Rusty Russell+40−02 files
No security note in commit
Low 49 AI analysisMessage 58 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

askrene: correctly order constraints.

This commit fixes a bug in Core Lightning's routing helper (askrene) where two kinds of channel information—hard limits called 'constraints' and usage estimates called 'impressions'—were being applied in the wrong order. Because impression…

Routing decision bug caused by incorrect ordering of time-relative channel statePotential payment failure or acceptance of an over-capacity routeRegression test added demonstrating incorrect route acceptance before fix
4b6fe4a1by Rusty Russell+211−1182 files
No security note in commit
Low 35 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

askrene: don't leak channel intel entries

This commit fixes a memory leak in the askrene plugin of Core Lightning. When individual channel intelligence entries were deleted, the code removed the entry from its array but forgot to free two internal pointers (impression and constrai…

Memory leak in plugin data structure cleanupMissing deallocation of nested pointers before array removalFix located in routing/intelligence plugin (askrene)
8891f414by Lagrang3+5−01 file
No security note in commit
Informational 15 AI analysisMessage 70 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

xpay: tests should expect the new error messages

This commit only updates test files so that automated checks expect slightly different error wording from the xpay payment command. It does not change any production code, so it cannot introduce a security vulnerability or fix one on its o…

0b67601fby Lagrang3+24−32 files
No security note in commit
Low 43 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

offers: limit invoices to 10 minutes for recurring offers in other currencies.

This change tightens the lifetime of recurring invoices priced in foreign currencies (like USD) to 10 minutes by default, and refreshes them with current exchange rates when they expire. Previously, such invoices could remain valid for the…

Fixes stale exchange-rate exposure for currency-denominated recurring invoicesAdds configurable expiry cap for recurring currency invoicesDistinguishes user-cancellation (0s expiry) from natural expiry to avoid misleading errors
446312cfby Rusty Russell+134−148 files
No security note in commit
Low 45 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

offers: limit expiry to offer limit, or 10 minutes with currency conversion.

This commit tightens the expiration time on invoices created from BOLT12 offers. Previously, all such invoices defaulted to a 2-hour payment window. Now, if the offer has an absolute expiry, the invoice expires when the offer expires; and …

BOLT12 invoice expiry now bounded by offer absolute expiryCurrency-converted invoices use short expiry to limit exchange-rate exposureNew regression test added for expiry behavior
a6cf4915by Rusty Russell+55−22 files
No security note in commit
Low 29 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

fetchinvoice: don't bother with checking recurrence timing.

This commit removes local timing checks in Core Lightning's fetchinvoice plugin for recurring payments. Instead of the plugin refusing too-early or too-late invoice requests, it now lets the remote node decide and report back. The change i…

Removal of local input-validation checks for recurring invoice requestsReliance on remote-party enforcement for recurrence period limits and pay windowsTest expectations changed from local rejection to remote failure messages
3e49d908by Rusty Russell+2−682 files
No security note in commit
Low 32 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: don't do previous invoice checking in createinvoicerequest.

This commit removes a local sanity check in Core Lightning's experimental 'createinvoicerequest' command. Previously, when creating a recurring invoice request, the code looked up past payments by label to verify the previous recurrence wa…

Removal of local payment-state validation for recurring invoice requestsParameter rename from recurrence_label to label in internal RPC callsTest expectations changed from local 'previous invoice has not been paid' errors to remote failure messages
4348d8acby Rusty Russell+5−1224 files
No security note in commit
Low 35 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

fetchinvoice: handle weird labels in recurrence_label parameter.

This commit fixes how the fetchinvoice plugin handles user-supplied labels that contain special characters such as backslashes, quotes, tabs, and newlines. Previously these labels were passed as raw strings, which could cause JSON encoding…

JSON injection / improper escaping of user-controlled input passed between RPC componentsPotential mismatch between label parsing and label serialization leading to functional failures or unexpected behaviorFix is narrowly scoped to a single plugin and parameter
d7f87f2dby Rusty Russell+37−102 files
No security note in commit
Informational 15 AI analysisMessage 70 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Add unit tests for str_to_u64

This commit only adds a new automated test file that checks how a helper function (str_to_u64) converts text strings to unsigned 64-bit integers. It does not change any production code, so it cannot by itself introduce a security vulnerabi…

dddb455dby Lagrang3+203−01 file
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

pytest: add tests for what we want askrene to do.

This commit only adds a new pytest test file. It does not change any production code. The test describes desired future behavior for the askrene routing module's error messages when a payment source or destination lacks enough channel capa…

518620aeby Rusty Russell+67−01 file
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityoffers: allow quantity_max = 1by Rusty Russell · 75e6c499 · Oct 1, 2025 · 1 fileMessage 58 · ThinInformational 19Details
Commit message · Rusty Russell

offers: allow quantity_max = 1

If you're doing just-in-time stock management, it would be annoying to
discover this wasn't allowed!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 19/100

This commit removes a small restriction in Core Lightning's BOLT 12 'offers' feature. Previously, when creating an offer, you were not allowed to set 'quantity_max' to exactly 1. The code now permits that value. The change is described by the author as a convenience for just-in-time stock management, not as a security fix. There is no evidence in the commit or supplied references that this addresses a vulnerability.

Lower-prioritywire: update to slight spec neating.by Rusty Russell · 512f3287 · Oct 1, 2025 · 4 filesMessage 60 · AdequateInformational 15Details
Commit message · Rusty Russell

wire: update to slight spec neating.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit is a simple renaming of a field and its comments from 'max_period' to 'max_period_index' to match a minor BOLT12 specification wording cleanup ('spec neating'). There is no functional code change, no bug fix, and no security relevance.

Lower-priorityplugins/offers: handle invoice_request with invreq_recurrence_cancelby Rusty Russell · 5e53af7d · Oct 1, 2025 · 3 filesMessage 73 · AdequateLow 45Details
Commit message · Rusty Russell

plugins/offers: handle invoice_request with invreq_recurrence_cancel

In this case, we make an immediately-expiring invoice. This correctly blocks
any successive requests for invoices, as per the spec requirement.

This means we have to handle invoice_requests without reply_path, amounts
or quantity *if* they specify invreq_recurrence_cancel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 45/100

This commit adds support for cancelling recurring Lightning invoices. Previously, the code rejected invoice requests that lacked a reply path, amount, or quantity. Now, if the request carries the special 'invreq_recurrence_cancel' flag, those requirements are relaxed and the node creates an immediately-expiring invoice instead of returning a usable one. This is a protocol-compliance change that prevents a cancelled recurring invoice from being paid again.

Lower-priorityplugins/fetchinvoice: allow send_message() to say "don't expect a reply"by Rusty Russell · 5a73bd34 · Oct 1, 2025 · 1 fileMessage 73 · AdequateInformational 18Details
Commit message · Rusty Russell

plugins/fetchinvoice: allow send_message() to say "don't expect a reply"

We're going to want this for sending invreq_recurrence_cancel invoice_requests.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This is a small, preparatory code change in Core Lightning's invoice-fetching plugin. It lets the plugin send a message without asking the recipient to send a reply back. The change itself does not fix a bug or close a security hole; it adds a capability that will be used later for canceling recurring invoice requests. There is no direct security impact visible in this commit.

Lower-prioritycommon: fix bolt12 quotes to bring them up-to-date.by Rusty Russell · 559e3fc4 · Oct 1, 2025 · 5 filesMessage 65 · AdequateInformational 20Details
Commit message · Rusty Russell

common: fix bolt12 quotes to bring them up-to-date.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 20/100

This commit updates Core Lightning's BOLT12 (recurring payment offers) implementation to match the latest specification wording and field names. It is primarily a code-comment and logic-alignment change, not a fix for a known active exploit. One small functional tightening is added: when an invoice request is not recurring, the code now also rejects a previously-allowed `invreq_recurrence_cancel` field. The rest of the changes rename internal checks to match the current spec and adjust when recurrence is detected, which could subtly change validation behavior for recurring offers.

Lower-priorityplugins/fetchinvoice: extract bip353 parsing to param helper.by Rusty Russell · 4e7c2fcf · Oct 1, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

plugins/fetchinvoice: extract bip353 parsing to param helper.

We're going to want this for cancelrecurringinvoice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit is a simple code cleanup: it moves the logic that parses BIP 353 human-readable names (like ₿name@domain.com) into a reusable helper function. The same validation rules are applied in the same order, and the behavior is unchanged. There is no security fix here.

Lower-priorityplugins: `cancelrecurringinvoice` command.by Rusty Russell · 0d18b82d · Oct 1, 2025 · 7 filesMessage 58 · ThinInformational 15Details
Commit message · Rusty Russell

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.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit adds a brand-new experimental RPC command called cancelrecurringinvoice to Core Lightning. It lets a user politely tell a recurring BOLT 12 invoice issuer 'please stop sending me further invoices.' The change is purely additive: it introduces a new command, its documentation, and the code to build and send a cancellation message. Nothing in the commit removes protections, weakens authentication, or changes existing behavior of other commands.

Lower-priorityplugins/fetchinvoice: extract recurrence invreq_metadata routine.by Rusty Russell · 551ecdf7 · Oct 1, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

plugins/fetchinvoice: extract recurrence invreq_metadata routine.

We're going to want this for cancelrecurringinvoice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit simply moves an existing block of code into a new helper function without changing what the code does. It is a routine code cleanup (refactoring) in preparation for a future feature called cancelrecurringinvoice. There is no security-relevant change visible in this patch.

Lower-priorityoffers: use param_check() for more thorough parameter validation.by Rusty Russell · 6476347c · Oct 1, 2025 · 2 filesMessage 65 · AdequateLow 28Details
Commit message · Rusty Russell

offers: use param_check() for more thorough parameter validation.

And fix incorrect comment on its use in the header!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 28/100

This commit tightens parameter validation in the 'offers' plugin of Core Lightning. It swaps a less strict validation helper for a stricter one and ensures that when the command is only being checked (not actually executed), the plugin reports completion correctly. The change also fixes an outdated comment describing the stricter helper. There is no direct evidence in the commit of an exploitable security bug, but the change removes a validation gap that could in principle let malformed or incomplete offers slip through.

Lower-priorityplugins/fetchinvoice: allow use of expired offers *for recurrence*.by Rusty Russell · b30e0634 · Oct 1, 2025 · 3 filesMessage 73 · AdequateLow 32Details
Commit message · Rusty Russell

plugins/fetchinvoice: allow use of expired offers *for recurrence*.

We added this to the recurrence spec: the offer expiration only applies to the
first request, not subsequent ones.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 32/100

This change updates how Core Lightning handles recurring payment offers after they expire. Previously, an expired offer could not be used at all. Now, the first invoice request must still happen before expiration, but follow-up recurring payments can continue even after the offer's expiration date. This is an intentional spec change, not a security bug, but it slightly loosens a time-based restriction.

Lower-priorityBOLT12: Remove years from recurrence.by Rusty Russell · 05005475 · Oct 1, 2025 · 7 filesMessage 60 · AdequateInformational 21Details
Commit message · Rusty Russell

BOLT12: Remove years from recurrence.

Use months instead.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `years` removed; use 12 x months.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 21/100

This commit removes the 'years' time unit from BOLT 12 recurring payment offers in Core Lightning, replacing it with 12-month equivalents. It is a protocol alignment change for an experimental feature, not a security fix. There is no indication it addresses an active vulnerability or attack.

Lower-prioritygossmap: use gossmap_disable_mmap() on corruption.by Rusty Russell · 5b3f3270 · Oct 1, 2025 · 1 fileMessage 65 · AdequateLow 45Details
Commit message · Rusty Russell

gossmap: use gossmap_disable_mmap() on corruption.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 45/100

This change makes Core Lightning's gossip map (the data structure tracking network routing announcements) fall back to non-memory-mapped file access when it detects internal inconsistencies. Previously the code just forced the gossip store file to disk with fsync and then crashed if the map still looked wrong. Now it disables memory mapping first and refreshes the view, only crashing if the mismatch persists. This is a robustness improvement that may avoid unnecessary node failures and could prevent or mask a class of crashes/undefined behavior caused by stale mmap views of the gossip store.

Lower-prioritycommon: remove unused push bit.by Rusty Russell · 7aec8cec · Oct 1, 2025 · 2 filesMessage 60 · AdequateInformational 15Details
Commit message · Rusty Russell

common: remove unused push bit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit simply removes an unused flag bit and its display in a developer debugging tool. There is no security-relevant change: no code behavior is altered, no vulnerability is fixed, and no new risk is introduced.

Lower-prioritygossmap: routine gossmap_disable_mmap() to force read() calls.by Rusty Russell · fe8c3b27 · Oct 1, 2025 · 2 filesMessage 65 · AdequateInformational 17Details
Commit message · Rusty Russell

gossmap: routine gossmap_disable_mmap() to force read() calls.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 17/100

This commit adds a way for Core Lightning to deliberately stop using memory-mapped file access for its network gossip data and fall back to ordinary read() calls. The change itself is a routine helper function; it does not fix a crash or stop an attacker on its own. It appears to be infrastructure for a follow-up change, likely to work around a consistency problem between mmap and pwritev() on OpenBSD.

Lower-prioritygossmap: refresh map even if size hasn't changed.by Rusty Russell · 06e3078a · Oct 1, 2025 · 1 fileMessage 60 · AdequateLow 34Details
Commit message · Rusty Russell

gossmap: refresh map even if size hasn't changed.

We might have not read the final entry.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 34/100

This change fixes a bug in how Core Lightning refreshes its network map (gossmap). Previously, if the gossip store file stayed the same size, the code would skip re-reading it entirely, even though the last entry might have been partially written or updated in place. Now it always re-parses the map contents, which can prevent stale or incomplete routing data from being used.

Lower-prioritygossip_store: wait for completed bit on reading.by Rusty Russell · 0e4b6ca1 · Oct 1, 2025 · 4 filesMessage 60 · AdequateLow 44Details
Commit message · Rusty Russell

gossip_store: wait for completed bit on reading.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 44/100

This commit hardens how Core Lightning reads its own 'gossip store' file so that it skips records that have not been fully written yet. Previously, readers could try to process half-written or incomplete records, which could lead to crashes, incorrect routing data, or corrupted state. The fix adds a 'wait for completed bit' check in C and Python gossip-map readers and in a diagnostic dump tool.

Lower-prioritygossmap: disable mmap on any read error.by Rusty Russell · e2cf4f80 · Oct 1, 2025 · 1 fileMessage 68 · AdequateLow 41Details
Commit message · Rusty Russell

gossmap: disable mmap on any read error.

This can happen with other subdaemons too, on ZFS on Linux:

```
2025-09-24T13:51:22.703Z **BROKEN** connectd: Bad checksum on gossmap record @9850670/9851114 should be 3379961343 (01009411e26cd56d68aabc285ee1c8ee43d59be6f939b0ce353d80213918680a7438356b9c5ea6bb001a6bb37a4dea93776f4abc8cd371525b4d1605a74b89d7cb1bfc8865ddf22288c7ea08b9d98b34155b4aed159eb81732957e6bf79b996752bf2a9995aaead1d65e7889e826ea0ba42f7746c176fe12f2fe6c04af1a74b4f0a262d20efd57133eb32693c789eb3f09caf4f4c6ecd2f734b3b36e751ffcc2748c58feabce4173c4ce6098a2c5397aabf1be5442cb67b5030be11ebd8b9841838dae127fe30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
```

Reported-by: @grubles
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 41/100

This change makes Core Lightning's network-map reader (gossmap) stop using memory-mapped file access whenever it hits a read error or bad checksum. On some filesystems like ZFS on Linux, mmap can return stale or partially written data, which makes the daemon think the gossip store is corrupt. The patch falls back to ordinary read calls, which should see the correct data. It is a robustness fix for a reliability problem rather than a clear-cut security vulnerability.

Lower-prioritypyln-client: update the gossmaps in test data to have the GOSSIP_STORE_COMPLETED_BIT set.by Rusty Russell · 74090b0a · Oct 1, 2025 · 3 filesMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

pyln-client: update the gossmaps in test data to have the GOSSIP_STORE_COMPLETED_BIT set.

Simply ran them through devtools/convert-gossmap, thought for gossip_store-part2 it
had to be appended to gossip_store-part1, converted, then cut off again.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only updates test data files used by the Python client library's test suite. The files are compressed binary gossip store snapshots, and the change sets a flag (GOSSIP_STORE_COMPLETED_BIT) so tests match current expectations. There is no change to production code, no user-facing behavior change, and no security issue.

Lower-prioritygossip: add COMPLETED bit to mark records which are complete.by Rusty Russell · 9fb8870f · Oct 1, 2025 · 5 filesMessage 73 · AdequateLow 44Details
Commit message · Rusty Russell

gossip: add COMPLETED bit to mark records which are complete.

This should detect partial writes more robustly, since we make a
separate pwrite() call to update this flag after the record is written.

Previously we were playing a bit loose with synchronization assumptions,
which seemed to work on Linux ext4, but not so well elsewhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 44/100

This commit hardens how Core Lightning writes its gossip store file. It adds a 'COMPLETED' flag that is set only after a full record has been safely written, so the program can detect and skip partial/corrupted records on restart. The change is defensive: it makes crashes or unclean shutdowns less likely to leave the gossip store in a broken state, especially on filesystems other than Linux ext4. There is no direct evidence in the commit of an exploitable security vulnerability.

Lower-prioritypyln-client: update ancient gossmap in test_gossmap tests.by Rusty Russell · f1a8cfcf · Oct 1, 2025 · 2 filesMessage 75 · AdequateInformational 15Details
Commit message · Rusty Russell

pyln-client: update ancient gossmap in test_gossmap tests.

It was still using private channel announcements, which were removed
in v13.

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit updates a test fixture and its matching test data in the pyln-client test suite. The old gossip store file used an outdated network message format (private channel announcements) that was removed in Core Lightning v13, so the test was failing. The change replaces the binary fixture with a freshly generated one and updates the expected channel ID and timestamps in the test code. There is no security fix here—this is purely a maintenance update to keep tests passing after a protocol cleanup.

Lower-prioritydevtools: create conversion tool for old gossip stores.by Rusty Russell · d8db51d8 · Oct 1, 2025 · 2 filesMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

devtools: create conversion tool for old gossip stores.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit adds a new developer-only command-line tool called convert-gossmap. It upgrades old Lightning network gossip store files used in testing to a newer format. There is no change to the live node software, no network-facing code, and no indication this fixes or introduces a security issue.

Lower-priorityunit tests: update all the gossmaps to have the GOSSIP_STORE_COMPLETED_BIT set.by Rusty Russell · 907f7c66 · Oct 1, 2025 · 10 filesMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

unit tests: update all the gossmaps to have the GOSSIP_STORE_COMPLETED_BIT set.

Mostly this meant running them, then running devtools/convert-gossmap and replacing the code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only updates unit-test data and test helpers so that fake gossip store records carry a 'completed' flag. It does not change any production code, network protocol, or wallet logic. There is no security issue here.

Lower-priorityconfigure: remove now-unneeded HAVE_PWRITEV.by Rusty Russell · 6af7fc64 · Oct 1, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Rusty Russell

configure: remove now-unneeded HAVE_PWRITEV.

gossipd now uses pwrite(), which is more broadly supported.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit removes an old build-system check that tested whether the operating system supports a function called pwritev(). The project no longer uses pwritev() in its code, so the check is unnecessary. This is a routine cleanup with no security relevance.

Lower-prioritygossipd: save gossip store writes, try them again (and fsync) if we get a read issue.by Rusty Russell · 75164d2c · Oct 1, 2025 · 3 filesMessage 73 · AdequateLow 30Details
Commit message · Rusty Russell

gossipd: save gossip store writes, try them again (and fsync) if we get a read issue.

This is a last resort, but what else are we supposed to do when we wrote
something and it didn't appear?

In particular, ZFS doesn't just "fix itself":

```
remaining_fd=200001b0c9761dff0000000001009411e26cd56d68aabc285ee1c8ee43d59be6f939b0ce353d80213918680a7438356b9c5ea6bb001a6
bb37a4dea93776f4abc8cd371525b4d1605a74b89d7cb1bfc8865ddf22288c7ea08b9d98b34155b4aed159eb81732957e6bf79b996752bf2a9995aae
ad1d65e7889e826ea0ba42f7746c176fe12f2fe6c04af1a74b4f0a262d20efd57133eb32693c789eb3f09caf4f4c6ecd2f734b3b36e751ffcc2748c5
8feabce4173c4ce6098a2c5397aabf1be5442cb67b5030be11ebd8b9841838dae127fe30000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000002000000a218b9d93000000001005000000000000c060
```

Note the record appended on the end *after all the zeroes*.

Changelog-Changed: gossipd: add gossip_store recovery for filesystems which do not synchronize read and write (e.g. ZFS on Linux), by disabling mmap reads and rewriting the last records.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 30/100

This change is a defensive fix for Core Lightning's gossip daemon, which stores network routing information on disk. On some filesystems (the commit specifically mentions ZFS on Linux), writes to this store can appear incomplete or out of order when later read back, causing the daemon to detect corruption. The patch keeps a short-term copy of recent writes in memory, disables memory-mapped reads when a mismatch is detected, and rewrites the last records with an explicit disk sync. It is a reliability/recovery fix, not a typical security vulnerability patch, and there is no evidence it was triggered by an attacker.

AI review queuedgossipd: remove gossmap_fetch_tail.by Rusty Russell · f882b69d · Oct 1, 2025 · 3 filesMessage 58 · ThinLow 42Details
Commit message · Rusty Russell

gossipd: remove gossmap_fetch_tail.

It only gets called for diagnostics when something goes wrong (and we
were going to exit anyway), and it's only useful with mmap (which we now disable
on error) but it shouldn't crash:

```
**BROKEN** gossipd: Truncated gossmap record @7991501/7991523 (len 0): waiting
**BROKEN** gossipd: FATAL SIGNAL 6 (version v25.09)
**BROKEN** gossipd: backtrace: common/daemon.c:41 (send_backtrace) 0x6506817cc529
**BROKEN** gossipd: backtrace: common/daemon.c:78 (crashdump) 0x6506817cc578
**BROKEN** gossipd: backtrace: ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 ((null)) 0x75e8267a032f
**BROKEN** gossipd: backtrace: ./nptl/pthread_kill.c:44 (__pthread_kill_implementation) 0x75e8267f9b2c
**BROKEN** gossipd: backtrace: ./nptl/pthread_kill.c:78 (__pthread_kill_internal) 0x75e8267f9b2c
**BROKEN** gossipd: backtrace: ./nptl/pthread_kill.c:89 (__GI___pthread_kill) 0x75e8267f9b2c
**BROKEN** gossipd: backtrace: ../sysdeps/posix/raise.c:26 (__GI_raise) 0x75e8267a027d
**BROKEN** gossipd: backtrace: ./stdlib/abort.c:79 (__GI_abort) 0x75e8267838fe
**BROKEN** gossipd: backtrace: ./assert/assert.c:96 (__assert_fail_base) 0x75e82678381a
**BROKEN** gossipd: backtrace: ./assert/assert.c:105 (__assert_fail) 0x75e826796516
**BROKEN** gossipd: backtrace: common/gossmap.c:111 (map_copy) 0x6506817cea77
**BROKEN** gossipd: backtrace: common/gossmap.c:1870 (gossmap_fetch_tail) 0x6506817d1f93
**BROKEN** gossipd: backtrace: gossipd/gossmap_manage.c:1442 (gossmap_manage_get_gossmap) 0x6506817c45fb
**BROKEN** gossipd: backtrace: gossipd/gossmap_manage.c:753 (gossmap_manage_handle_get_txout_reply) 0x6506817c5850
**BROKEN** gossipd: backtrace: gossipd/gossipd.c:574 (recv_req) 0x6506817c172b
```

Reported-by: @grubles
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Low 42/100

This commit removes a rarely-used diagnostic helper called gossmap_fetch_tail that could crash the gossip daemon when it tried to read the tail of a corrupted or truncated gossip map. The crash happened during an internal error path (the daemon was already about to exit), so it is more of a crash-on-failure than an exploitable vulnerability. The fix simply stops calling the helper and reports the remaining file data from the regular file descriptor instead.