Commit graph

2596 commits

Author SHA1 Message Date
dstrukt
e0cf2870ae app: switch the app background to lightningBlack 2026-08-07 16:39:21 -06:00
dstrukt
1c463439db app: make the Home and auth pages reflow on mobile 2026-08-07 16:38:59 -06:00
dstrukt
64d0227452 app: simplify the Home page 2026-08-07 16:38:59 -06:00
dstrukt
aa36a675d9 app: pin the sidebar to the window and keep the content in place 2026-08-07 16:38:59 -06:00
Elle
23433a05ed
Merge pull request #1369 from ViktorT-11/2026-08-configurable-spending-controls
Some checks failed
CI / frontend tests on macOS-latest (push) Has been cancelled
CI / frontend tests on ubuntu-latest (push) Has been cancelled
CI / frontend tests on windows-latest (push) Has been cancelled
CI / backend build on macOS-latest (push) Has been cancelled
CI / backend build on ubuntu-latest (push) Has been cancelled
CI / backend build on windows-latest (push) Has been cancelled
CI / cross compilation (push) Has been cancelled
CI / cross compilation-1 (push) Has been cancelled
CI / cross compilation-2 (push) Has been cancelled
CI / RPC proto compilation check (push) Has been cancelled
CI / check commits (push) Has been cancelled
CI / Sqlc check (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / run unit tests (push) Has been cancelled
CI / run unit tests-1 (push) Has been cancelled
CI / run unit tests-2 (push) Has been cancelled
CI / run unit tests-3 (push) Has been cancelled
CI / build itest binaries (push) Has been cancelled
CI / check release notes updated (push) Has been cancelled
CI / integration test (push) Has been cancelled
CI / integration test-1 (push) Has been cancelled
CI / integration test-2 (push) Has been cancelled
accounts: add configurable account spending controls
2026-08-07 15:23:34 -07:00
Viktor Torstensson
6bca24793c
docs: document account operator controls
Document the configurable maximum account payment size and optional
channel balance reservation check, including their defaults, fee
handling, and operational limitations.
2026-08-07 12:27:24 +02:00
Viktor Torstensson
a493b6a3d6
accounts: optionally cap account balances at the node channel balance
Add an opt-in check that prevents the sum of all account balances from
exceeding the node's available local (outbound) channel balance. When
enabled via the new accounts.check-channel-balance config option, the
service rejects balance allocations that would over-provision the node:
creating an account, an administrative credit, or an administrative
balance increase now fails with ErrBalanceReservationExceeded if it
would push the total allocated balance above the node's local channel
balance.

Note that the total channel balance may still decrease below the already
allocated account balance. This can occur if the node operator decreases
the total channel balance through non-account related activity.

The check is a no-op by default to preserve the historical behaviour
where the operator manages over-provisioning themselves (accounts can
legitimately be created before channels are funded). Invoice-driven
credits are unaffected, as they are backed by real inbound payments.
2026-08-07 12:26:29 +02:00
Viktor Torstensson
ae74392433
accounts: add a configurable maximum account payment size
Add an opt-in cap on the total amount a single account payment may
debit, including routing fees, enforced at the account interceptor for
both SendPaymentV2 and SendToRouteV2. When the new
accounts.max-payment-size-msat config option is set to a non-zero
value, payments whose amount plus fees exceeds it are rejected with
ErrPaymentExceedsMaxSize before the balance check and before any funds
are reserved.

For SendPaymentV2, the configured fee limit is included in the capped
amount. For SendToRouteV2, the route's stated fee is included.

This gives operators a guard rail against a compromised or misbehaving
account macaroon draining its balance in a single large payment. The
cap defaults to 0 (disabled), preserving existing behaviour, and is a
first step towards the finer-grained per-account spending controls
requested in the issue.
2026-08-07 00:04:20 +02:00
Elle
9907dabc9f
Merge pull request #1359 from ellemouton/kvdb-sql-mig-lnd-ready-timeout
Some checks failed
CI / frontend tests on macOS-latest (push) Has been cancelled
CI / frontend tests on ubuntu-latest (push) Has been cancelled
CI / frontend tests on windows-latest (push) Has been cancelled
CI / backend build on macOS-latest (push) Has been cancelled
CI / backend build on ubuntu-latest (push) Has been cancelled
CI / backend build on windows-latest (push) Has been cancelled
CI / cross compilation (push) Has been cancelled
CI / cross compilation-1 (push) Has been cancelled
CI / cross compilation-2 (push) Has been cancelled
CI / RPC proto compilation check (push) Has been cancelled
CI / check commits (push) Has been cancelled
CI / Sqlc check (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / run unit tests (push) Has been cancelled
CI / run unit tests-1 (push) Has been cancelled
CI / run unit tests-2 (push) Has been cancelled
CI / run unit tests-3 (push) Has been cancelled
CI / build itest binaries (push) Has been cancelled
CI / check release notes updated (push) Has been cancelled
CI / integration test (push) Has been cancelled
CI / integration test-1 (push) Has been cancelled
CI / integration test-2 (push) Has been cancelled
multi: wait for lnd with a configurable timeout during the SQL migration
2026-07-29 16:19:36 -07:00
Elle Mouton
970a3fb55d
docs: add release note for the lnd-ready migration timeout
Document the new --lndreadytimeout option and the startup failure it
fixes in the 0.17.1 release notes.
2026-07-29 15:47:47 -07:00
Elle Mouton
fb5863e38c
multi: wait for lnd with a configurable timeout during SQL migration
The kvdb-to-SQL data migration polls lnd's ListMacaroonIDs RPC, which
only becomes available once lnd reaches its "RPC active" state. On
nodes with a large channel/graph state, lnd can take well over a
minute to get there after the wallet is unlocked, which exceeded the
previous fixed 60-second (120 x 500ms) poll budget and caused the
migration - and therefore litd startup - to fail permanently,
requiring a manual restart.

Replace the fixed attempt cap with a wait bounded by the new
--lndreadytimeout config option, defaulting to a generous 10 minutes,
while still aborting early if the daemon is shutting down. The wait
happens inside the migration's SQL write transaction, so it is kept
bounded rather than unbounded as a safety backstop.
2026-07-29 15:47:47 -07:00
Viktor Torstensson
83df345294
Merge pull request #1343 from lightninglabs/dependabot/go_modules/litrpc/golang.org/x/net-0.55.0
build(deps): bump golang.org/x/net from 0.53.0 to 0.55.0 in /litrpc
2026-07-29 11:33:13 +02:00
Viktor Torstensson
4ead197fe3
Merge pull request #1344 from lightninglabs/dependabot/go_modules/autopilotserverrpc/golang.org/x/net-0.55.0
build(deps): bump golang.org/x/net from 0.53.0 to 0.55.0 in /autopilotserverrpc
2026-07-29 11:32:33 +02:00
Viktor Torstensson
dc72c6225c
Merge pull request #1349 from lightninglabs/dependabot/go_modules/perms/golang.org/x/crypto-0.52.0
build(deps): bump golang.org/x/crypto from 0.50.0 to 0.52.0 in /perms
2026-07-29 11:29:33 +02:00
dependabot[bot]
0f5ebe7061
build(deps): bump golang.org/x/net from 0.53.0 to 0.55.0 in /litrpc
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.53.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.53.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 10:09:41 +00:00
dependabot[bot]
475c8609a0
build(deps): bump golang.org/x/crypto from 0.50.0 to 0.52.0 in /perms
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.50.0 to 0.52.0.
- [Commits](https://github.com/golang/crypto/compare/v0.50.0...v0.52.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 10:09:28 +00:00
dependabot[bot]
519ce8a154
build(deps): bump golang.org/x/net in /autopilotserverrpc
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.53.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.53.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 10:09:22 +00:00
Viktor Torstensson
810cbf78c8
Merge pull request #1364 from lightninglabs/dependabot/go_modules/perms/google.golang.org/grpc-1.82.1
Some checks failed
CI / frontend tests on macOS-latest (push) Has been cancelled
CI / frontend tests on ubuntu-latest (push) Has been cancelled
CI / frontend tests on windows-latest (push) Has been cancelled
CI / backend build on macOS-latest (push) Has been cancelled
CI / backend build on ubuntu-latest (push) Has been cancelled
CI / backend build on windows-latest (push) Has been cancelled
CI / cross compilation (push) Has been cancelled
CI / cross compilation-1 (push) Has been cancelled
CI / cross compilation-2 (push) Has been cancelled
CI / RPC proto compilation check (push) Has been cancelled
CI / check commits (push) Has been cancelled
CI / Sqlc check (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / run unit tests (push) Has been cancelled
CI / run unit tests-1 (push) Has been cancelled
CI / run unit tests-2 (push) Has been cancelled
CI / run unit tests-3 (push) Has been cancelled
CI / build itest binaries (push) Has been cancelled
CI / check release notes updated (push) Has been cancelled
CI / integration test (push) Has been cancelled
CI / integration test-1 (push) Has been cancelled
CI / integration test-2 (push) Has been cancelled
build(deps): bump google.golang.org/grpc from 1.79.3 to 1.82.1 in /perms
2026-07-28 12:08:05 +02:00
Viktor Torstensson
728e310c52
Merge pull request #1363 from lightninglabs/dependabot/go_modules/autopilotserverrpc/google.golang.org/grpc-1.82.1
build(deps): bump google.golang.org/grpc from 1.79.3 to 1.82.1 in /autopilotserverrpc
2026-07-28 12:07:41 +02:00
Viktor Torstensson
0d2cbdcf49
Merge pull request #1362 from lightninglabs/dependabot/go_modules/litrpc/google.golang.org/grpc-1.82.1
build(deps): bump google.golang.org/grpc from 1.79.3 to 1.82.1 in /litrpc
2026-07-28 12:07:15 +02:00
bitromortac
875c48806f
Merge pull request #1358 from bitromortac/2607-fix-32-overflow
Some checks are pending
CI / frontend tests on macOS-latest (push) Waiting to run
CI / frontend tests on ubuntu-latest (push) Waiting to run
CI / frontend tests on windows-latest (push) Waiting to run
CI / backend build on macOS-latest (push) Waiting to run
CI / backend build on ubuntu-latest (push) Waiting to run
CI / backend build on windows-latest (push) Waiting to run
CI / cross compilation (push) Waiting to run
CI / cross compilation-1 (push) Waiting to run
CI / cross compilation-2 (push) Waiting to run
CI / RPC proto compilation check (push) Waiting to run
CI / check commits (push) Waiting to run
CI / Sqlc check (push) Waiting to run
CI / lint (push) Waiting to run
CI / run unit tests (push) Waiting to run
CI / run unit tests-1 (push) Waiting to run
CI / run unit tests-2 (push) Waiting to run
CI / run unit tests-3 (push) Waiting to run
CI / build itest binaries (push) Waiting to run
CI / integration test (push) Blocked by required conditions
CI / integration test-1 (push) Blocked by required conditions
CI / integration test-2 (push) Blocked by required conditions
CI / check release notes updated (push) Waiting to run
firewall: fix 32-bit int truncation and optimize CryptoRandIntn
2026-07-28 09:56:35 +02:00
bitromortac
f162f44a0d docs: add release notes for privacy mapper refactoring
Add a succinct release note entry detailing the 32-bit truncation
prevention and allocation optimization introduced by PR-1358.
2026-07-28 07:25:41 +00:00
Viktor Torstensson
0bd5af814c
Merge pull request #1324 from Cyberguru1/bake-super-macaroon-startup
terminal: auto-bake super macaroon on startup
2026-07-27 15:48:08 +02:00
cyberguru1
0c06130ea1
docs: add release notes for super macaroon auto-bake
Add release notes for the new auto-bake config options in release notes for version 0.17.1 and reference pull request #1324.
2026-07-27 06:09:05 -05:00
cyberguru1
7cde9c50ae
itest: add test for super macaroon auto-bake
Add testSuperMacaroonOnStartup to verify startup baking logic. The test
restarts the node with the auto-baking config flags and asserts the
macaroon is baked with read-only or read-write permissions accordingly.

Also add validation tests verifying that starting with an invalid path
suffix or in stateless-init mode with baking enabled fails as expected.

Verify permission addition/expansion by starting the node with sub-servers
disabled and then restarting with sub-servers re-enabled. Also verify
the none config choice, asserting that no super macaroon file is
baked/created on startup.
2026-07-27 06:08:48 -05:00
cyberguru1
c5fbbd4d77
terminal: auto-bake super macaroon on startup
Automatically bake a super macaroon on startup if it doesn't already
exist on disk and the `bake-super-macaroon` option is configured.

On startup, the node verifies if the super macaroon file exists. If
it does, it parses the macaroon, extracts and verifies the version and
root key ID, and asserts that the macaroon permissions exactly match
the expected active permissions. If there is a mismatch, the macaroon
is regenerated and overwritten on disk. If the file does not exist, a
new super macaroon is baked and written directly to disk.

Also validate that the `bake-super-macaroon` option is not enabled when
LND is running in stateless initialization mode, failing startup early
if they are used together.
2026-07-27 06:08:48 -05:00
cyberguru1
d3e51fac17
config: add super macaroon startup flags and path validation
Introduce configuration flags to enable baking a super macaroon on
startup. Add --bake-super-macaroon (none, read-only, read-write) and
--super-macaroon-path.

Also add validation logic to ensure that the configured super macaroon
path ends with the expected '.macaroon' suffix, rejecting startup early
otherwise.
2026-07-27 06:08:48 -05:00
cyberguru1
3975e83006
macaroons: add super macaroon helpers
Introduce helper functions in the macaroons package to manage super
macaroon files and permissions. Add SuperMacaroonExists,
MacaroonMatchesPermissions, and BakeAndWriteSuperMacaroon.
2026-07-27 06:08:48 -05:00
Viktor Torstensson
e093948a35
Merge pull request #1306 from erickcestari/harden-ci-workflow
ci: harden main.yml workflow against supply-chain risks
2026-07-27 11:59:27 +02:00
Viktor Torstensson
e631ccf0e5
Merge pull request #1316 from Cyberguru1/account-payments
accounts: add account payments subcommand
2026-07-27 11:58:01 +02:00
Viktor Torstensson
11526d0388
Merge pull request #1366 from lightninglabs/dependabot/go_modules/golang.org/x/crypto-0.52.0
build(deps): bump golang.org/x/crypto from 0.51.0 to 0.52.0
2026-07-27 11:44:37 +02:00
dependabot[bot]
47e1f4099b
build(deps): bump golang.org/x/crypto from 0.51.0 to 0.52.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.51.0 to 0.52.0.
- [Commits](https://github.com/golang/crypto/compare/v0.51.0...v0.52.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.52.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 08:47:11 +00:00
dependabot[bot]
f82bd5719b
build(deps): bump google.golang.org/grpc in /litrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.3 to 1.82.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.3...v1.82.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.82.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 08:46:48 +00:00
dependabot[bot]
3a2acb6c31
build(deps): bump google.golang.org/grpc from 1.79.3 to 1.82.1 in /perms
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.3 to 1.82.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.3...v1.82.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.82.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 08:46:46 +00:00
dependabot[bot]
bb4c85d427
build(deps): bump google.golang.org/grpc in /autopilotserverrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.3 to 1.82.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.3...v1.82.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.82.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 08:46:31 +00:00
Viktor Torstensson
5c5a4130f0
Merge pull request #1365 from lightninglabs/dependabot/go_modules/google.golang.org/grpc-1.82.1
build(deps): bump google.golang.org/grpc from 1.80.0 to 1.82.1
2026-07-27 10:44:59 +02:00
dependabot[bot]
6a7cc15c45
build(deps): bump google.golang.org/grpc from 1.80.0 to 1.82.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.80.0 to 1.82.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.80.0...v1.82.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.82.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-25 04:17:36 +00:00
cyberguru1
c6d81a8713
docs: add release notes for account payments
Add release notes for the new accounts payments CLI subcommand and
associated RPC endpoint to the v0.17.1 release notes document.
2026-07-22 14:06:56 -05:00
cyberguru1
0977e375d6
itest: add integration tests for AccountPayments
Add integration tests inside itest/litd_accounts_test.go to verify
retrieval of account payments against a running LND node, validating
correct responses for ID/label lookup, offsets, pagination limits,
and counting of total payments.
2026-07-22 14:06:43 -05:00
cyberguru1
1abbbe649c
perms: add permissions for AccountPayments
Register the /litrpc.Accounts/AccountPayments RPC endpoint in the
RequiredPermissions map, requiring read access on the account entity.
2026-07-22 14:06:26 -05:00
cyberguru1
6754acc17b
litcli: add payments command to accounts
Introduce the 'payments' subcommand under 'litcli accounts' to query
account payment history. Supports parameters for offset, page size
limits, and counting of total payments.
2026-07-22 14:06:26 -05:00
cyberguru1
d553cb28d7
accounts: implement AccountPayments RPC handler
Implement the AccountPayments handler on the Accounts RPC server.

The handler resolves accounts by ID or label, loads its payment hashes,
applies pagination constraints, and fetches complete payment details
concurrently from LND's TrackPaymentV2. It also returns pagination
metadata including the total count of payments.
2026-07-22 14:06:26 -05:00
cyberguru1
009a5c28bc
accounts: add payment methods to Store interface
Introduce the ListAccountPayments and CountAccountPayments methods to
the accounts Store interface.

ListAccountPayments enables retrieval of a paginated list of payment
entries associated with a given account ID, supporting offset and
limit. CountAccountPayments returns the total number of payments
associated with the account.
2026-07-22 14:06:25 -05:00
cyberguru1
857fb900fd
accounts: implement ListAccountPayments in BoltStore
Implement ListAccountPayments in the Bolt-based kvdb account store.
The retrieved account payments are sorted in ascending lexicographical
order of their payment hash.
2026-07-22 14:06:25 -05:00
cyberguru1
5632998030
accounts: implement ListAccountPayments in SQLStore
Add sqlc queries to select account payment hashes from the database.
Implement the ListAccountPayments method in the SQLStore, allowing
retrieval of stored payment hashes for SQLite and Postgres backends.

Also define the AccountPaymentEntry helper struct in
accounts/interface.go to wrap payment hashes and details.
2026-07-22 14:06:25 -05:00
cyberguru1
a132fca1ba
db/sqlc: add queries for account payments
Add SQL queries to select account payments with pagination (limit and
offset), and a query to count the total payments for a given account.
2026-07-22 14:06:25 -05:00
cyberguru1
f5a1a020eb
proto: add AccountPayments to Accounts service
Define the AccountPayments RPC endpoint and its request/response
messages in lit-accounts.proto. This endpoint allows querying
paginated payment history for a specific account.

Also update the frontend JS/TS proto sanitization script to map the
imported lnd.proto file to its flat directory path, fixing app build.
2026-07-22 14:06:25 -05:00
bitromortac
ec6814e940
Merge pull request #1322 from Vandit1604/accounts-errored-payment-passthrough
Some checks failed
CI / frontend tests on macOS-latest (push) Has been cancelled
CI / frontend tests on ubuntu-latest (push) Has been cancelled
CI / frontend tests on windows-latest (push) Has been cancelled
CI / backend build on macOS-latest (push) Has been cancelled
CI / backend build on ubuntu-latest (push) Has been cancelled
CI / backend build on windows-latest (push) Has been cancelled
CI / cross compilation (push) Has been cancelled
CI / cross compilation-1 (push) Has been cancelled
CI / cross compilation-2 (push) Has been cancelled
CI / RPC proto compilation check (push) Has been cancelled
CI / check commits (push) Has been cancelled
CI / Sqlc check (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / run unit tests (push) Has been cancelled
CI / run unit tests-1 (push) Has been cancelled
CI / run unit tests-2 (push) Has been cancelled
CI / run unit tests-3 (push) Has been cancelled
CI / build itest binaries (push) Has been cancelled
CI / check release notes updated (push) Has been cancelled
CI / integration test (push) Has been cancelled
CI / integration test-1 (push) Has been cancelled
CI / integration test-2 (push) Has been cancelled
accounts: don't mask payment errors when request values are absent
2026-07-22 12:15:06 +02:00
bitromortac
cf7e53842a firewall: optimize CryptoRandIntn with sync.Pool
Utilize a sync.Pool for *big.Int instances in CryptoRandIntn to avoid
frequent heap allocations. This significantly reduces garbage collection
pressure when randomizing timestamps, amounts, and fees inside loops
(e.g. iterating over forwarding history responses).
2026-07-21 12:04:33 +00:00
bitromortac
6d89f07037 firewall: fix 32-bit int truncation
Upgrade the randIntn function signature from int to int64 to prevent
unpredictable integer truncation on 32-bit systems (e.g., Raspberry Pi).
This ensures UnixNano timestamps in hideTimestamp and large amounts in
hideAmount do not cause unexpected runtime failures when calling
ForwardingHistory.
2026-07-21 12:04:33 +00:00