Commit graph

10 commits

Author SHA1 Message Date
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 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
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
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
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
Vandit Singh
73569014f2 accounts: don't mask payment errors when request values are absent 2026-07-19 01:19:35 +05:30
Viktor Torstensson
7604bd297b
docs: move release note entries added after v0.17.0-alpha
Move the release note entries that were added after v0.17.0-alpha to the
v0.17.1 release notes.
2026-07-16 14:09:32 +02:00
Viktor Torstensson
403efb3b46
docs: add release notes for v0.17.1-alpha 2026-07-16 13:29:54 +02:00