Commit graph

2289 commits

Author SHA1 Message Date
bitromortac
b1593b9bee
rules: improve channel-restriction resilience
The channel-restriction rule was previously fragile because it failed to
initialize when a restricted channel was closed while the session was
inactive. This often caused unnecessary session invalidation and blocked
users from managing their nodes.

This change makes the rule resilient by allowing it to start even if
some channels in the deny-list are missing from the node's current
active set. To maintain high performance, this implements a negative
cache that tracks unknown channel IDs, shielding LND from redundant RPC
calls during request evaluation.

Only having a negative cache without invalidation can be a security
problem. Someone could apply a rule with a future guessed channel id
such that the channel restriction populates the checkedIDs map with it.
After the channel was opened, we'd then allow making actions on the
channel because we don't know about the channel's id in the getChannelID
check.

To ensure security isn't compromised by the cache, this adds a
self-healing retry mechanism. If the firewall encounters an unknown
channel outpoint while it still has unmapped restricted IDs, it clears
the negative cache and forces a single retry in the next RPC call. This
ensures that any newly opened restricted channels are correctly
identified and blocked without adding latency to the common path.

Note: This approach deliberately accepts potential cache thrashing in the
edge case where a user repeatedly requests an unknown channel point
while a permanently missing ID exists in the deny list. This trade-off
is accepted to prioritize security (fail close) over performance in this
specific invalid state.
2026-02-04 13:31:09 +01:00
bitromortac
7e0c04fea5
rules: add test to demo failure for closed channels
This also introduces the use of testify mock to check which calls were
made.
2026-02-03 15:40:13 +01:00
Elle
79ae6e26ad
Merge pull request #1223 from ViktorT-11/2026-02-claude-forked-repo-fix
workflows/claude: fix PR checkout for fork PRs
2026-02-03 15:34:59 +02:00
Viktor Torstensson
9f85c425d6
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-02-03 13:08:40 +01:00
Elle
8ab792856f
Merge pull request #1214 from lightninglabs/removeClaudeReview
.github: remove claude review workflow
2026-01-29 10:57:45 +02:00
Elle
acbb395ddd
Merge pull request #1210 from ViktorT-11/2025-01-fix-logs-upload-bug
github: ensure logs are uploaded correctly on error
2026-01-29 10:31:19 +02:00
Elle Mouton
668fe4efb8
.github: remove claude review workflow
From other repos, we have seen that it can get quite spammy. So removing
for now. Users can instead comment `@claude review this` once the PR is
ready for review.
2026-01-29 10:26:54 +02:00
Jared Tobin
ecc0d81b4f
Merge pull request #1203 from jtobin/lit-cache
ci: wire up 'key-prefix' for caching
2026-01-28 22:49:44 +04:00
Elle
49e3c439b2
Merge pull request #1213 from lightninglabs/add-claude-github-actions-1769593414834
Add Claude Code GitHub Workflow
2026-01-28 15:20:39 +02:00
Elle
4e58738710 "Claude Code Review workflow" 2026-01-28 11:43:38 +02:00
Elle
07a04e7701 "Claude PR Assistant workflow" 2026-01-28 11:43:36 +02:00
Jamal James
b5de9e1fc3
Merge pull request #1208 from lightninglabs/dependabot/npm_and_yarn/app/lodash-4.17.23
build(deps): bump lodash from 4.17.21 to 4.17.23 in /app
2026-01-27 07:11:57 -06:00
Viktor Torstensson
bf24dd53b3
github: ensure logs are uploaded correctly on error
Prior to this commit, logs were not correctly uploaded on failure as the
logs were being written under itest/.logs, but the workflow zipped only
itest/ **/*.log. Because .logs is a hidden directory, the glob doesn’t
match it, so 7z creates an empty archive.

We also move the logs to a non-hidden directory when being uploaded to
avoid that the logs are downloaded as a hidden directory.
2026-01-26 18:59:55 +01:00
Jared Tobin
d16c0837bc
make: filter git describe to only match release tags
Add --match 'v*' to the VERSION_TAG git describe command to exclude
non-version tags like perms/*, litrpc/*, and autopilotserverrpc/*. These
tags contain forward slashes which cause the release script to fail when
constructing output filenames.
2026-01-23 13:00:28 +04:00
Jared Tobin
c64b47eec6
ci: add a 'build-itest' job to main workflow
Adds a separate 'build-itest' job that builds the itest binaries prior
to the actual itest jobs being kicked off. With this change we'll
rebuild the itest binaries at most once, instead of at most four times.
2026-01-23 10:06:11 +04:00
Jared Tobin
5b9d357e1f
ci: wire up 'key-prefix' for caching
The setup-go@v5 action caches GOMODCACHE and GOCACHE by default when
there's a go.sum file present. The cache is immutable, and keys have the
form:

  setup-go-{os}-{arch}-{os-version}-go-{version}-{hash}

where 'hash' comes from go.sum. These keys don't take build tags into
account, and whichever job finishes first writes to the cache.

Consider the 'main' workflow, in which a bunch of jobs are kicked off to
run concurrently. A job like 'lint', which runs quickly, gets privileges
to write to the cache, but an issue is that its artifacts are built with
different tags than are e.g. the itest jobs. Thus, when an itest job
later gets a cache hit, the cached entry doesn't actually contain the Go
archive files that the itest needs.

The changes introduced in this commit use the existing 'key-prefix'
argument to avoid this problem. Setting 'key-prefix' bypasses the
default setup-go cache, using a separate cache with keys that depend
on the supplied prefix.

The full keys in this case are:

  {key_prefix}-go-{os}-{arch}-{go-version}-{hash}

For the itest jobs, key-prefix is simply set to 'itest', so itest
artifacts will be cached with keys prefixed by 'itest' that won't be
preempted with irrelevant entries from faster-running jobs like 'lint'.
2026-01-23 08:03:52 +04:00
dependabot[bot]
63534dd57f
build(deps): bump lodash from 4.17.21 to 4.17.23 in /app
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 00:26:24 +00:00
Elle
361a9685df
Merge pull request #1205 from AmbossTech/jcbrand/new-websocket-location
fix: set new location for the websocket package
2026-01-20 16:45:59 +02:00
JC Brand
d2ca1b5b81
go.mod: set new location for websocket package
Fixes #1204
2026-01-16 11:45:54 +02:00
Jared Tobin
956cb50f8c
Merge pull request #1199 from jtobin/itest-cases
make: fix itest case filter
2026-01-14 15:52:37 +04:00
Jared Tobin
eae846389e
make: fix itest case filter
The -test.run pattern was missing the tranche prefix, so terminal and
custom_channels tests weren't actually running. The fix simply grafts
the pattern used in taproot-assets to ensure the tests are run.
2026-01-14 12:52:18 +04:00
ffranr
8a394729f9
Merge pull request #1200 from ellemouton/fixNilErrPanic
itest: fix nil error deref
2026-01-14 08:17:50 +00:00
Elle Mouton
3852d3169e
itest: fix nil error deref
Here we fix a nil pointer panic that is caused by an 'err' var being
deferenced before first checking that it is not nil. This was caused by
an oversite in a refactor commit that was attempting to improve line
length.
2026-01-14 09:31:22 +02:00
Viktor Torstensson
b720db59c6
Merge pull request #1191 from hieblmi/update-loop
gomod: update loop client to v0.31.7-beta
2025-12-17 15:35:30 +01:00
Slyghtning
d1a6e36781
docs: add release notes 2025-12-17 14:08:27 +01:00
Slyghtning
e3441e135d
gomod: update loop client to v0.31.7-beta 2025-12-16 15:07:46 +01:00
ffranr
b1b75c8710
Merge pull request #1189 from lightninglabs/lint-line-length
multi: enforce 80-char line length and add `nolint:ll` comments
2025-12-12 11:27:39 +00:00
ffranr
a0e63124c0
multi: reformat long lines for readability
- Replace occurrences of `// nolint:lll` with `// nolint:ll` across
  files for consistency.
- Reformat multiline strings, comments, and function parameters to
  improve clarity and adhere to style guidelines.
- Add `// nolint:ll` comments where necessary to prevent linter
  warnings.
2025-12-09 16:12:03 +00:00
ffranr
e96424cc4a
makefile+tools: add custom 'll' linter for extended line length checks
- Replace the default `lll` with a custom `ll` linter, enabling
  configurable exclusions for specific `S` log lines.
- Integrate custom `ll` linter into the build system and `Makefile`.
- Include relevant test cases and configuration for `golangci-lint`.
2025-12-09 16:12:03 +00:00
Elle
6e6b5522ff
Merge pull request #1186 from lightninglabs/feat/itest-tranche-parallel
Add tranche-based parallel itests and enable in CI
2025-12-09 15:09:56 +02:00
ffranr
9a5e943842
make: remove redundant job dependencies 2025-12-09 12:47:05 +00:00
ffranr
07b59f069d
ci: run itest tranches in parallel
- switch itest matrix jobs to use itest-parallel(-no-backward-compat)
- run four tranches per job
2025-12-09 12:47:05 +00:00
ffranr
128e0b6df6
itest: add tranche-based parallel runner and clearer logs
- add tranche splitting/shuffling flags to the itest harness
- add itest-parallel target and scripts to run tranches concurrently
- write per-tranche logs under .logs/trancheN and tail failures for
  clarity
2025-12-09 12:47:05 +00:00
ffranr
5295661f08
add .editorconfig 2025-12-09 12:45:03 +00:00
Viktor Torstensson
af9f1d69c2
Merge pull request #1169 from lightninglabs/dependabot/go_modules/perms/github.com/opencontainers/runc-1.2.8
build(deps): bump github.com/opencontainers/runc from 1.2.0 to 1.2.8 in /perms
2025-12-05 10:52:31 +01:00
Viktor Torstensson
f576af2b45
Merge pull request #1166 from lightninglabs/dependabot/go_modules/litrpc/github.com/opencontainers/runc-1.2.8
build(deps): bump github.com/opencontainers/runc from 1.2.0 to 1.2.8 in /litrpc
2025-12-05 10:52:03 +01:00
ffranr
a1ef642be2
Merge pull request #1179 from lightninglabs/wip/readme-cleanup
Cleanup and streamline README formatting and version guidance
2025-12-04 13:15:15 +00:00
ffranr
62bf127421
readme: format lines for soft max length of 80 columns
Reformatted multiple lines in the README to follow the soft maximum line
length of 80 columns, improving readability.
2025-12-04 12:14:42 +00:00
ffranr
d342745105
docs: archive compatibility table and trim README guidance
Move the LiT/LND compatibility matrix into docs/compatibility.md for
archival so future releases no longer require README updates to adjust
the table.

Update README to direct users to release notes for minimum lnd versions
and fall back to the archived table when not specified.
2025-12-04 12:14:42 +00:00
Elle
e7538e4fb4
Merge pull request #1184 from lightninglabs/dependabot/go_modules/perms/golang.org/x/crypto-0.45.0
build(deps): bump golang.org/x/crypto from 0.37.0 to 0.45.0 in /perms
2025-12-03 09:08:29 +02:00
dependabot[bot]
e00e8e7f34
build(deps): bump golang.org/x/crypto from 0.37.0 to 0.45.0 in /perms
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.37.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.37.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 23:35:28 +00:00
Jamal James
93e6643710
Merge pull request #1180 from lightninglabs/dependabot/npm_and_yarn/app/node-forge-1.3.2
build(deps): bump node-forge from 1.3.1 to 1.3.2 in /app
2025-12-02 17:34:16 -06:00
Viktor Torstensson
9e3ce6577a
Merge pull request #1168 from ZZiigguurraatt/cache_golang
dev.Dockerfile: use cache mounts to speed up rebuilding
2025-12-02 19:45:28 +01:00
dependabot[bot]
413b52e59f
build(deps): bump node-forge from 1.3.1 to 1.3.2 in /app
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.2.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 22:30:34 +00:00
ffranr
c9d1915be1
readme: remove daemon versions table
This information is now available in the GitHub release notes for each
release. Removing it from the README simplifies the project release
procedure (no need to update) and avoids unnecessary duplication,
reducing the risk of inconsistencies.
2025-11-26 16:20:22 +00:00
ffranr
e30a056081
readme: align table columns 2025-11-26 16:17:36 +00:00
ffranr
1ee7abd10d
Merge pull request #1178 from ViktorT-11/2025-11-litd-v0_16_0
Prepare for `litd` `v0.16.0-alpha` release
2025-11-26 16:09:42 +00:00
Viktor Torstensson
36dbaa24ee
version: bump version to v0.16.0-alpha 2025-11-26 16:13:15 +01:00
Viktor Torstensson
98b77b0b5c
README: update for release of v0.16.0-alpha 2025-11-26 16:13:08 +01:00
Viktor Torstensson
d14d7668f6
Merge pull request #1174 from bitromortac/2511-delete-session-after-fail
sessions: delete session after registration failure
2025-11-26 15:49:17 +01:00