Commit Graph
20047 Commits
Author SHA1 Message Date
ziggieXXX 70dfbd284b Merge pull request #10488 from yashbhutwala/rpcserver-fix-fundmax-maxchansize
rpcserver: use protocol max for fundMax, not maxChanSize
2026-01-13 22:03:14 +01:00
ziggieXXX 0426cf9e4b Merge pull request #10491 from ziggie1984/bump-golang-toolchain-go-1.25.5
bump golang toolchain go 1.25.5
2026-01-13 20:11:08 +01:00
ziggie 7085f4706d fn: fix printf vet check in TestSomeToOkf Go 1.24+
See also https://github.com/golang/go/issues/60529. Now we need
to use a constant.
2026-01-13 17:31:24 +01:00
Yong 28355a20b9 Merge pull request #10493 from ziggie1984/add-usetesting-linter
Update usetesting linter to match old behavior
2026-01-13 23:59:06 +08:00
Yash Bhutwala f48e6ba145 docs: update release notes for fundMax fix 2026-01-13 10:54:55 -05:00
Yash Bhutwala 73e7708f15 itest: add fundMax with maxChanSize test
Add integration test to verify that fundMax uses the protocol-level
maximum channel size instead of the user-configured maxChanSize. The
test uses a table-driven approach to cover both non-wumbo and wumbo
scenarios, creating nodes with restrictive maxChanSize (5M sats) and
verifying that fundMax still creates channels at the protocol maximum.
2026-01-13 10:54:55 -05:00
Yash Bhutwala 0764f27b6f rpcserver: use protocol max for fundMax, not maxChanSize
The maxChanSize config option is documented to only apply to incoming
channel requests. However, when using fundMax with OpenChannel, the code
was incorrectly using maxChanSize as the upper bound for the outgoing
channel size.

This commit fixes the issue by using the protocol-level maximum
(MaxBtcFundingAmount or MaxBtcFundingAmountWumbo depending on wumbo
support) as the upper bound for fundMax operations.

Fixes #10468.
2026-01-13 10:54:55 -05:00
ziggie e26a114cdc mod: update the minimum go version to 1.24.11
We update the minimum required go version to build the LND
exectuable to the latest minor release of go 1.24.11.
2026-01-13 16:07:38 +01:00
ziggie 61d82fd1f2 build: update CI+release version to Go 1.25.5
This updates the toolchain which we require to build the LND
executable.
2026-01-13 16:07:38 +01:00
András Bánki-Horváth 72ab4d234a Merge pull request #10289 from GeorgeTsagk/move-aux-closer
Aux Closer: Move coop-close aux finalization to chain watcher
2026-01-13 15:31:34 +01:00
ziggie 35260fc4a7 discovery: fix new usetesting linter issues 2026-01-13 13:01:19 +01:00
ziggie e05ee9a8f5 linter: update usetesting linter to match old behavior 2026-01-13 12:56:42 +01:00
Olaoluwa Osuntokun ab6ff825c6 Merge pull request #10470 from Roasbeef/discovery-panic-recovery
discovery: add panic recovery for gossip message processing
2026-01-12 17:10:35 -08:00
Olaoluwa Osuntokun 7da41cb367 docs/release-notes: add release notes 2026-01-12 17:10:17 -08:00
Olaoluwa Osuntokun bcb65f5ac7 discovery: add panic recovery for serial announce signatures processing
In this commit, we extend the panic recovery mechanism to cover the
serial processing path for AnnounceSignatures1 messages. Unlike other
gossip messages which are processed in parallel goroutines, announcement
signatures are processed serially in the main networkHandler loop.

A panic during this serial processing would previously crash the entire
gossiper. This change wraps the processing in an anonymous function with
a deferred panic recovery, ensuring resilience without changing the
serial processing semantics.

Since AnnounceSignatures bypass the validation barrier, we pass nil for
the jobID parameter.
2026-01-12 17:10:17 -08:00
Olaoluwa Osuntokun caf4850f74 discovery: add panic recovery for gossip message processing
In this commit, we add a centralized panic recovery mechanism for gossip
goroutines. This increases the robustness of message processing in the
gossiper, as now we are able to keep on trucking in the face of logic
errors that may lead to panics.

We ensure that any deps are freed and we log the panic trace to help
catch bugs in the future.
2026-01-12 17:10:00 -08:00
ziggieXXX 7bbf26c0e2 Merge pull request #10469 from Roasbeef/lnwire-timestamp-validation
lnwire: enforce non-zero timestamp in gossip messages
2026-01-12 13:57:12 +01:00
Olaoluwa Osuntokun cad1b957bf discovery: enforce non-zero timestamp in gossip messages
In this commit, we add validation for channel updates and node
announcements to ensure that we reject gossip messages with zero
timestamps at the discovery layer.

From BOLT 7:
  "MUST set timestamp to greater than 0, AND to greater than any
  previously-sent channel_update for this short_channel_id."

This validation is performed in the gossip handlers (handleNodeAnnouncement
and handleChanUpdate) rather than at the wire protocol level. This approach
ensures we can still decode messages from disk or embedded in onion errors
while rejecting invalid gossip from peers.

Remote peers sending zero-timestamp gossip will have their ban score
incremented.
2026-01-09 17:10:37 -08:00
ziggieXXX 39a1421d15 Merge pull request #10296 from hieblmi/estimate-inputs
estimatefee: tx fee estimate for selected inputs
2026-01-07 11:45:24 +01:00
Slyghtning 202e473c7f docs: update release notes 2026-01-07 10:30:04 +01:00
Slyghtning 422aa7d182 itest: estimate on-chain fee with selected inputs 2026-01-07 10:30:03 +01:00
Slyghtning 44aa5efc66 cmd: EstimateFee for explicit inputs 2026-01-07 10:25:30 +01:00
Slyghtning 280929ba1e rpcserver: return inputs in EstimateFeeResponse 2026-01-07 10:25:29 +01:00
Slyghtning e5456d39f2 cmd: make types.go accessible in lnd package 2026-01-07 10:25:29 +01:00
Slyghtning 049f2c738d lnrpc: transaction inputs in EstimateFeeRequest 2026-01-07 10:25:28 +01:00
ziggieXXX d5d151cee9 Merge pull request #10462 from ziggie1984/fix-prune-node-race
channeldb: fix race condition in link node pruning
2026-01-07 08:54:33 +01:00
ziggieXXX 99d07fdb78 Merge pull request #10367 from elnosh/rename-endorsement-accountable
multi: rename experimental endorsement signal to accountable
2026-01-06 18:02:22 +01:00
Yong d3ce622bde Merge pull request #10403 from gijswijs/fix-flatmap
Fix FlatMap implementation in Result type
2026-01-06 22:37:18 +08:00
elnosh 6f49bea52b server: remove accountability signal experiment period
In the previous iteration with endorsement
signaling, the recommendation was for the sender to
set it to 1 and that could have had privacy concerns
when first deploying given that the default was to
downgrade the signal to 0. In the latest proposal
the recommended default for both sending and
forwarding nodes is to set `accountable` to 0.
As a result, the dates have been removed given
that there are no privacy risks associated
with relaying the signal with zero values.
2026-01-06 09:12:34 -05:00
elnosh 34329c684e multi: rename experimental endorsement signal to accountable
Renames the endorsement signal to accountable to
match the latest proposal https://github.com/lightning/blips/pull/67
2026-01-06 09:12:31 -05:00
ziggie d9fb9092b6 multi: make sure previous inconsitent states are fixed
We make sure that nodes previously suffering from this error will
have a consitent db view when restarting their node.
2026-01-06 14:34:52 +01:00
ziggie 51f3c6f528 channeldb: fix race condition in link node pruning
This commit fixes a critical race condition in MarkChanFullyClosed and
pruneLinkNode where link nodes could be incorrectly deleted despite
having pending or open channels.

The race occurred because the check for open channels and the link node
deletion happened in separate database transactions:

  Thread A: TX1 checks open channels → [] (empty)
  Thread A: TX1 commits
  Thread B: Opens new channel with same peer
  Thread A: TX2 deletes link node (using stale data)
  Result: Link node deleted despite pending channel existing

This creates a TOCTOU (time-of-check to time-of-use) vulnerability where
database state changes between reading the channel count and deleting
the node.

Fix for MarkChanFullyClosed:
- Move link node deletion into the same transaction as the channel
  closing check, making the check-and-delete operation atomic

Fix for pruneLinkNode:
- Add double-check within the write transaction to verify no channels
  were opened since the caller's initial check
- Maintains performance by keeping early return for common case
- Prevents deletion if channels exist at delete time

This ensures the invariant: "link node exists iff channels exist"
is never violated, preventing database corruption and potential
connection issues.
2026-01-06 10:52:41 +01:00
Gijs van Dam e7b9515edd fn: fix Result[T].FlatMap
For a Result[T], FlatMap should apply f when the result is Ok, and
propagate the error unchanged when it's Err. The original code returns r
on Ok and tries to use r.left when Err, which is wrong. This commit
fixes that.

Secondly, the group of FlatMap/AndThen and OrElse functions and methods
are now properly tested with new unit tests.

fixes #10401
2026-01-06 10:51:49 +01:00
ziggieXXX 801de79cf1 Merge pull request #10476 from ziggie1984/fix-endorsement-testcases
itest: fix endorsement itests
2026-01-05 16:57:46 +01:00
ziggie 5f30797738 itest: fix endorsement itests
Due to the signaling period expiring tests had to be adopted bc
they were not taking the activation time period into account.
2026-01-05 14:28:14 +01:00
ziggieXXX ac006d73cf Merge pull request #10356 from Abdulkbk/ispublicnode-perf
graph: fix inefficient query for IsPublicNode
2026-01-05 10:32:56 +01:00
ziggieXXX eea4840086 Merge pull request #10249 from erickcestari/fix-scid-tlv-length
lnwire+tlv+route: enforce TLV length validation and add tests
2025-12-30 19:31:32 +01:00
Erick Cestari 523002984b docs: add release-notes 2025-12-29 19:19:53 -03:00
Erick Cestari 5a7925008e multi: enforce strict TLV length checks
This commit improves TLV decoding safety and consistency across multiple
packages by enforcing fixed-length requirements and adding unit tests to
prevent malformed TLV records from being accepted.

Changes include:

- lnwire:
  * Enforce 8-byte length in Fee TLV decoder.
  * Enforce PubNonceSize in Musig2Nonce TLV decoder.
  * Enforce 8-byte length in ShortChannelID TLV decoder.
  * Added roundtrip and invalid length tests for Fee, Musig2Nonce,
    and ShortChannelID records.

- routing/route:
  * Enforce Vertex TLV length (33 bytes).
  * Added encode/decode and invalid length tests for Vertex.

- tlv:
  * Enforce correct length in DBytes33 decoder (33 bytes).
  * Added tests ensuring all fixed-size primitive decoders reject
    incorrect TLV lengths.

By strictly validating TLV lengths, we prevent malformed or corrupted
TLV records from being silently accepted, improving protocol safety.
2025-12-29 19:18:49 -03:00
Abdullahi Yunus 68f558c865 docs: add release note 2025-12-24 18:08:46 +01:00
Abdullahi Yunus ac2cec462c graph: use UNION for isPublicNode query
In this commit we updated the IsPublicV1Node query to use UNION
instead of OR, since sqlite struggles to efficiently use
multiple indexes in a single query involving OR conditions across
different columns.

We use UNION ALL since the query doesn't care about duplicates.
2025-12-23 21:04:36 +01:00
Abdullahi Yunus 86cde4b93f graphdb: add benchmark for isPublicNode query
In this commit we add a benchmark to test the performance of
IsPublicNode query.
2025-12-23 21:04:36 +01:00
Yong 013f5c93ed Merge pull request #10455 from ziggie1984/fix-onchain-timeout-terminal
Fix flaky itest multihop testcase
2025-12-22 23:10:09 +08:00
ziggie c493f7d9dd itest: accept NO_ROUTE or TIMEOUT in testLocalClaimOutgoingHTLC
Fix flaky test due to race between channel closure propagation and
payment timeout. Both failure reasons are correct depending on timing.
2025-12-19 00:27:20 +01:00
Yong 91423ee519 Merge pull request #10449 from ziggie1984/bugfix/setsource-node-sql
server: fix timestamp comparison in setSelfNode
2025-12-16 16:58:25 +08:00
ziggie e5b0704d73 docs: add release-notes for LND 20.1 2025-12-16 08:21:11 +01:00
ziggie 865e1556d4 server: fix timestamp comparison in setSelfNode
Fix bug where setSelfNode compared only the seconds component of
timestamps instead of the full timestamp. This caused the node to
attempt persisting an older timestamp than what existed in the
database during restart, resulting in "sql: no rows in result set"
errors.
2025-12-16 08:21:11 +01:00
Olaoluwa Osuntokun 04f6108051 Merge pull request #10446 from ziggie1984/bugfix/backport-workflow
ci: fix some minor issues in the backport ci job
2025-12-15 10:59:36 -08:00
ziggieXXX 06cc0f3aa3 Merge pull request #10448 from ziggie1984/bugfix/fix-comment-lsp-heuristic
routerrpc: fix comment in lsp heuristic
2025-12-15 15:10:09 +01:00
Yong 0cc84d0b00 Merge pull request #10353 from starius/fix-rbf_coop_test
chancloser: stabilize remote RBF coop tests
2025-12-15 14:56:00 +08:00