Commit Graph
20089 Commits
Author SHA1 Message Date
Gijs van Dam 2643988524 make: fix linter in git worktrees
When running `make lint` in a git worktree, the diff processor fails
with "no version control repository found" because the Docker container
only mounts the worktree directory, not the main git directory that the
worktree's .git file references.

This causes golangci-lint's `new-from-rev` filter to not work, resulting
in all ~32k existing lint issues being reported instead of only newly
introduced ones.

Fix by detecting when we're in a worktree (.git is a file, not a
directory) and mounting the main .git directory into the container so
revgrep can access the git history.
2026-02-03 19:45:56 +01:00
ziggieXXX 20a6b1726f Merge pull request #10532 from darioAnongba/fix/ignored-local-mark-coop
peer: fix MarkCoopBroadcasted to correctly use local parameter
2026-02-02 12:36:06 -05:00
Dario Anongba Varela 6e56c9a538 peer: fix MarkCoopBroadcasted to correctly use local parameter 2026-02-02 12:16:29 +01:00
Olaoluwa Osuntokun 7ccab028f0 Merge pull request #10531 from Roasbeef/claude-fix
workflows: fix Claude workflows for fork PRs and external contributors
2026-01-29 16:41:18 -04:00
Olaoluwa Osuntokun a77b9d9b89 workflows/pr-severity: allow non-write users for classification
The PR severity classifier was failing for external contributors because
the claude-code-action checks that the actor has write permissions. Since
this workflow only reads PR metadata via the API and doesn't execute any
code from the PR (and has restricted tool permissions), it's safe to allow
any user to trigger classification.
2026-01-29 15:57:18 -04:00
Olaoluwa Osuntokun bcb589cc9e workflows/claude: fix PR checkout for fork PRs
When a PR originates from a fork, the PR branch doesn't exist in the
origin remote. This adds a step that uses `gh pr checkout` before
running the Claude action, which properly handles fork PRs by adding
the fork as a remote and fetching the branch from there.
2026-01-29 13:30:41 -04:00
Olaoluwa Osuntokun 19b2ad7979 Merge pull request #10527 from Roasbeef/fix-pr-severity-fork-prs
workflows/pr-severity: use pull_request_target for fork PRs
2026-01-28 15:53:19 -04:00
Olaoluwa Osuntokun 4d98b004ac workflows/pr-severity: use pull_request_target for fork PRs
Switch from pull_request to pull_request_target to allow the workflow
to run on PRs from forks. The pull_request trigger runs in the fork's
context which cannot access repository secrets.

This is safe because the workflow only reads PR metadata via the GitHub
API (changed files, labels) and doesn't checkout or execute any code
from the PR itself.
2026-01-28 15:18:19 -04:00
Olaoluwa Osuntokun 22c2cc21e8 Merge pull request #10526 from lightningnetwork/pr-severity-workflow
build: add PR severity classification workflow
2026-01-28 14:58:33 -04:00
Olaoluwa Osuntokun ba52a27860 build: add PR severity classification workflow
Add a GitHub Actions workflow that uses Claude Code to automatically
classify PRs by severity based on the files changed. This helps
reviewers prioritize and understand PR complexity at a glance.

The workflow:
- Triggers on PR open and synchronize events
- Uses Claude Code to analyze changed files against severity mapping
- Applies one of four severity labels (critical/high/medium/low)
- Posts a detailed comment explaining the classification
- Supports manual override via severity-override-* labels

Severity mapping:
- CRITICAL: lnwallet, htlcswitch, contractcourt, peer, keychain, input,
  channeldb, funding, lnwire, server.go, rpcserver.go
- HIGH: routing, invoices, sweep, discovery, graph, watchtower, feature,
  lnrpc, macaroons, chainntnfs, etc.
- MEDIUM: payments, autopilot, lncfg, kvdb, proto files, etc.
- LOW: docs, tests, scripts, CI/CD config
2026-01-28 14:33:15 -04:00
Olaoluwa Osuntokun 349b3dbb43 Merge pull request #10525 from lightningnetwork/add-claude-github-actions-1769542743473
build: add cc integration
2026-01-27 15:40:14 -04:00
Olaoluwa Osuntokun c000478121 "Claude PR Assistant workflow" 2026-01-27 15:39:04 -04:00
Yong 676386ce52 Merge pull request #10520 from darioAnongba/fix/routerrpc-failuredetail-additions
routerrpc: FailureDetail enums for invoice/AMP validation failures
2026-01-23 09:58:22 +08:00
Dario Anongba Varela 05eed5cdb4 routerrpc: FailureDetail enums for invoice/AMP validation failures 2026-01-22 15:30:19 -05:00
ziggieXXX 8646d98469 Merge pull request #10514 from ziggie1984/reduce-log-noice
Reduce graphDB log noise
2026-01-22 04:13:24 +01:00
ziggie c78a75f5d8 graphdb: reduce log noise from WRN to DBG 2026-01-21 20:25:08 +01:00
Olaoluwa Osuntokun aaaf235b2a Merge pull request #10331 from Roasbeef/cnct-reorg-v2
multi: update close logic to handle re-orgs of depth n-1, where n is num confs - add min conf floor
2026-01-16 14:48:30 -08:00
Olaoluwa Osuntokun 3fb59b1b6b multi: increase min cltv delta to 24 2026-01-16 13:06:30 -08:00
Olaoluwa Osuntokun 4bce4ebe03 routing: increase MinCLTVDelta from 18 to 24 blocks
This increases the minimum CLTV delta allowed for invoice creation to
provide more headroom above DefaultFinalCltvRejectDelta (19 blocks).
The previous value of 18 was below the reject threshold, which could
allow users to create invoices with CLTV deltas that would be rejected
when receiving payments.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 4aef4d00ac docs/release-notes: add release notes entry 2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun fa8ba6f81c lncfg: increase DefaultIncomingBroadcastDelta to 16
With this change, we'll go to chain even earlier to ensure that we have
enough time to sweep a potentially contested HTLC, now that we're
waiting longer before sweeps to ensure that the commitment transaction
is sufficeitnyl burried before we sweep.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun ab4f89128f contractcourt: unify+simplify new re-org aware logic 2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun ebefe63f8e contractcourt: add sync dispatch fast-path for single confirmation closes
In this commit, we add a fast-path optimization to the chain watcher's
closeObserver that immediately dispatches close events when only a single
confirmation is required (numConfs == 1). This addresses a timing issue
with integration tests that were designed around the old synchronous
blockbeat behavior, where close events were dispatched immediately upon
spend detection.

The recent async confirmation architecture (introduced in commit f6f716ab7)
properly handles reorgs by waiting for N confirmations before dispatching
close events. However, this created a race condition in integration tests
that mine blocks synchronously and expect immediate close notifications.
With the build tag setting numConfs to 1 for itests, the async confirmation
notification could arrive after the test already started waiting for the
close event, causing timeouts.

We introduce a new handleSpendDispatch method that checks if numConfs == 1
and, if so, immediately calls handleCommitSpend to dispatch the close event
synchronously, then returns true to skip the async state machine. This
preserves the old behavior for integration tests while maintaining the full
async reorg protection for production (where numConfs >= 3).

The implementation adds the fast-path check in both spend detection paths
(blockbeat and spend notification) to ensure consistent behavior regardless
of which detects the spend first. We also update the affected unit tests to
remove their expectation of confirmation registration, since the fast-path
bypasses that step entirely.

This approach optimizes for the integration test scenario without compromising
production safety, as the fast-path only activates when a single confirmation
is sufficient - a configuration that only exists in the controlled test
environment.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun bb781bbe84 itest: add new coop close rbf itest
This ensures that during the RBF process, if one confirms, a re-org
occurs, then another confirms, that we'll properly detect this case.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 8f5656e6e2 contractcourt: add generic close re-org tests
In this commit, we add a set of generic close re-org tests. The most
important test is the property based test, they will randomly confirm
transactions, generate a re-org, then assert that eventually we dtect
the final version.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun b6b4cefd08 contractcourt: add unit tests for rbf re-org cases
This set of new tests ensures that if have created N RBF variants of the
coop close transaction, that any of then can confirm, and be re-org'd,
with us detecting the final spend once it confirms deeploy enough.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun e0f7b0a033 contractcourt: update existing chain watcher tests due to new logic
All the tests need to send a confirmation _after_ the spend is detected
now.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun ce779a9707 contractcourt: add new chainWatcherTestHarness
We'll use this for all the upcoming tests.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 0f59756b40 lntest: add new wait for conf helper method to ChainNotifier 2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 12668b8af6 contractcourt: update close logic to handle re-orgs of depth n-1, where n is num confs
In this commit, we update the close logic to handle re-ogs up to the
final amount of confirmations. This is done generically, so we're able
to handle events such as: coop close confirm, re-org, breach confirm,
re-org, force close confirm, re-org, etc.

The upcoming set of new tests will exercise all of these cases.

We modify the block beat handling to unify the control flow. As it's
possible we get the beat, then see the spend, or the oher way around.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 6553b61aa4 peer: send out a notification after the 1st conf, then wait for the rest
We wnt to add better handling, but not break any UIs or wallets. So
we'll continue to send out a notification after a single confirmation,
then send another after things are fully confirmed.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun c0f48d23b4 multi: add new ChannelCloseConfs param, thread thru as needed
In this commit, we add a new param that'll allow us to scale up the
number of confirmations before we act on a new close. We'll use this
later to improve the current on chain handling logic.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 622fa4476f lncfg: add new dev config option for scaling channel close confs
This'll be useful for the set up upcoming itests.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 931b54e848 peer+rpcserver: use new conf scaling for notifications 2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 4f43717d4f lnwallet: add tests for new conf scaling helper funcs 2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 09c813a61c lnwallet: define helper func to coop close conf scaling
We have two versions: for itests, we just use one conf, but in prod,
we'll scale the number of confirmations.
2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 45aa94c760 server: use new FundingConfsForAmounts helper func 2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun 9e74916118 lnwallet: add new helper functions to scale confirmations based on amt 2026-01-15 16:22:26 -08:00
Olaoluwa Osuntokun eb7fbd47d3 Merge pull request #10460 from ziggie1984/fix-flake-revoked_uncooperative_close_retribution
itest fix flake in revokedCloseRetributionRemoteHodlCase
2026-01-14 16:51:16 -08:00
ziggieXXX 7be6f45d7a Merge pull request #10495 from ziggie1984/deprecate-no-experimental-endorsement
lncfg: add deprecated no-experimental-endorsement config option
2026-01-14 16:02:03 +01:00
ziggie 04dab619cb lncfg: add deprecated no-experimental-endorsement config option
Re-adds the old no-experimental-endorsement config option as a hidden,
deprecated alias for no-experimental-accountability. This ensures
backward compatibility for users who have the old option in their
config files after the rename it.
2026-01-14 09:26:36 +01:00
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