Commit Graph

17460 Commits

Author SHA1 Message Date
Yong
caff5a00d1
Merge pull request #9138 from ziggie1984/detail_debug_process
Detail LND's debug procedures.
2024-10-22 20:26:11 +08:00
Oliver Gugger
91c82c1938
Merge pull request #9206 from Roasbeef/roasbeef-pgp-2024
scripts/key: add new gpg key for roasbeef
2024-10-22 09:23:57 +02:00
Olaoluwa Osuntokun
49275e1d46
Merge pull request #9197 from guggero/aux-signer-batching-fixes
[custom channels]: Aux signer batching fixes
2024-10-21 17:49:15 -07:00
Olaoluwa Osuntokun
cb0f0dd8a4
scripts/key: add new gpg key for roasbeef
In this commit, we add a new signing for key for roasbeef. The signing
key has been attested to here by myself in several locations on the
Internet:
  * https://gist.github.com/Roasbeef/58c5eb9d5243df73ea3b081f3848b5ce
  * https://x.com/roasbeef
  * https://keybase.io/roasbeef
2024-10-21 16:42:09 -07:00
Oliver Gugger
f34bf51d16
Merge pull request #9200 from starius/fix-logging
peer: fix logging (missing argument) [skip ci]
2024-10-21 10:23:48 +02:00
Boris Nagaev
04a2003f3b
peer: fix logging (missing argument) [skip ci]
Previously, LND log used to have such records:
[WRN] PEER: Peer(...): Link=%!v(MISSING) is not active

Now the short channel ID is printed there instead of "%!v(MISSING)".
2024-10-18 12:09:44 -03:00
ziggie
f73504a26d
docs: add release notes. 2024-10-18 13:11:09 +02:00
ziggie
8bb79d10e9
lnd: fix debuglevel bug.
We need to setup the loggers before we are able to show the
complete list of available subsystems.
2024-10-18 13:11:09 +02:00
ziggie
027de0a82c
invoices: add proper startup for the interceptor
During testing of this PR I figured out the the htlc interceptor
was not shutdown and started properly in terms of closing the
quit channel but also in terms of the relevant logs.
2024-10-18 13:03:30 +02:00
ziggie
448193b0fd
multi: separate profiler config 2024-10-18 13:03:30 +02:00
ziggie
64c20ca308
docs: Detail LND's debug possibilities
Describe the basics of the LND profiler so that node runners can
easily provide profile dumps to analyse faulty behaviour more
quickly.

Also update the description of LND's logging system.
2024-10-18 13:03:30 +02:00
ziggie
8d4d3e0323
rpc: return loglevels of the current subsystems 2024-10-18 13:03:29 +02:00
Jonathan Harvey-Buschel
ac719dc016
gitignore: ignore vscode workspace files 2024-10-17 17:35:29 +02:00
Jonathan Harvey-Buschel
dce80ac9a1
lnwallet: test link quit signal handling 2024-10-17 17:35:29 +02:00
Jonathan Harvey-Buschel
77ae7afe78
multi: link quit can interrupt commitment signing
In this commit, we make sig job handling when singing a next commitment
non-blocking by allowing the shutdown of a channel link to prevent
further waiting on sig jobs by the channel state machine. This addresses
possible cases where the aux signer may be shut down via a separate quit
signal, so the state machine could block indefinitely on receiving an
update on a sig job.
2024-10-17 17:35:29 +02:00
Oliver Gugger
6edd942c70
mod: bump fn to v1.2.3 2024-10-17 17:34:11 +02:00
Jonathan Harvey-Buschel
cd14c52ecd
htlcswitch: pass quit chans as unidirectional
This is a requirement for replacing the quit channel with a Context.
The Done() channel of a Context is always recv-only, so all users of
that channel must not expect a bidirectional channel.
2024-10-17 17:33:15 +02:00
Jonathan Harvey-Buschel
48567e8944
lnwallet: sort sig jobs before submission 2024-10-17 17:33:15 +02:00
Jonathan Harvey-Buschel
a0baa8fb41
lnwallet: test aux signer shutdown handling 2024-10-17 17:33:15 +02:00
Jonathan Harvey-Buschel
22deba3d26
lnwallet: refactor test code for HTLC add and recv 2024-10-17 17:33:14 +02:00
Jonathan Harvey-Buschel
b3f953b1c4
multi: allow mock aux signer to customize sig jobs 2024-10-17 17:33:14 +02:00
Oliver Gugger
395a761eb6
Merge pull request #9196 from lightningnetwork/fn-context-guard
fn: add ContextGuard from tapd repo
2024-10-17 17:31:48 +02:00
Oliver Gugger
deefa3a9f1
fn: add ContextGuard from tapd repo
This adds the ContextGuard struct from the taproot-assets repository
that has been in use there for a while.

The context guard allows for easy creation of contexts that depend on a
central wait group and quit channel.

A context can either be created with a timeout and quit, meaning it will
cancel either on reaching the timeout or when the central quit channel
is closed.

Or a context can be created to block and use a timeout, meaning it will
_not_ cancel on quit but rather block the shutdown until it is completed
(or times out).

The third way is to create a context that just cancels on quit with no
timeout.
2024-10-17 13:11:30 +02:00
Oliver Gugger
f46ae2f893
Merge pull request #9195 from yyforyongyu/optimize-itest-setup
itest+lntest: speed up test setup
2024-10-17 10:16:06 +02:00
Oliver Gugger
6992ecc8fc
Merge pull request #9137 from ViktorTigerstrom/2024-09-sync-lock-fix
lnd: allow shutdown signal during `IsSynced` check
2024-10-17 10:04:14 +02:00
yyforyongyu
7849e63e0f
docs: update release doc 2024-10-17 07:45:06 +08:00
yyforyongyu
bf8ae68eea
lntest: add method AssertTxnsNotInMempool
So we only need to do one `GetRawMempool` lookup when checking the
exclusion of multiple txns.
2024-10-17 07:34:40 +08:00
yyforyongyu
e560e00aeb
lntest: remove unused return value 2024-10-17 07:34:25 +08:00
yyforyongyu
ed3cb26188
itest+lntest: stop using pointer to chainhash.Hash
This commit fixes the methods used in `lntest` so they stop using
pointers to chainhash.
2024-10-17 07:14:51 +08:00
Oliver Gugger
af6b88a9f6
Merge pull request #9171 from ellemouton/genUnsignedTLVRanges
tlv: generate types for gossip unsigned range
2024-10-16 16:04:17 +02:00
Oliver Gugger
fb5e7f4b23
Merge pull request #9059 from guggero/bitcoind-28
CI: run integration tests against bitcoind v28
2024-10-16 15:55:44 +02:00
Oliver Gugger
f0b1015bae
Merge pull request #9187 from guggero/fix-custom-data
rpcserver+lncli: fix custom channel data encoding issue
2024-10-15 17:31:25 +02:00
Oliver Gugger
8c79940374
cmd/commands: don't error out on replacement failure 2024-10-15 16:40:35 +02:00
Oliver Gugger
5f86e2529b
Merge pull request #9172 from guggero/initwallet-mac-root-key
cmd: allow deterministic macaroon derivation with `lncli`
2024-10-15 12:09:02 +02:00
Oliver Gugger
5d60da54a3
rpcserver: don't write any custom channel data if empty 2024-10-15 09:56:32 +02:00
Oliver Gugger
fcb21dfc24
docs: document deterministic macaroons, add release notes 2024-10-15 09:48:47 +02:00
Oliver Gugger
882f25667e
cmd/commands: add root_key flag to bakemacaroon command 2024-10-15 09:48:46 +02:00
Oliver Gugger
6e932c6bc8
macaroons: add BakeFromRootKey function 2024-10-15 09:48:46 +02:00
Oliver Gugger
fd37c6f90a
cmd/commands: add mac_root_key flag to unlock commands
This commit adds a new --mac_root_key flag to both the lncli create and
lncli createwatchonly commands that allows the user to specify the
macaroon root key that should be used when creating the macaroon
database on wallet initialization.
This allows for deterministic wallet initialization and baking of
macaroons before the wallet is initialized.
2024-10-15 09:48:18 +02:00
Elle Mouton
63d5e92af1
tlv: generate types for gossip unsigned range
For pure TLV messages such as Gossip 1.75 and Bolt12 messages, there are
defined TLV ranges for unsigned data vs signed data. The signed ranges are
the inclusive ranges of 0 to 159 and 1000000000 to 2999999999.
What we do here in this commit is: 1) update the number of main types
generated so that they include type 160 which is the first type in the
un-signed range and we will make use of this type for signature fields
in gossip messages. Next, we add two marker types so that we can define
the rest of the ranges.
2024-10-15 06:21:55 +02:00
ProofOfKeags
7bf9b59816
Merge pull request #9097 from ProofOfKeags/refactor/evaluate-htlc-view
[KILO]: DynComms Prefactor: Refactor/evaluate htlc view
2024-10-14 13:10:00 -06:00
Keagan McClelland
5307e7a5e4
lnwallet: return balance changes rather than modifying references
Here we return the balance deltas from evaluateHTLCView rather than
passing in references to variables that will be modified. It is a
far cleaner and compositional approach which allows readers of this
code to more effectively reason about the code without having to
keep the whole codebase in their head.
2024-10-14 09:40:47 -06:00
Keagan McClelland
f0eecfa2cd
lnwallet: inline and remove process[Add|Remove]Entry
This commit observes that processAddEntry and processRemoveEntry
are only invoked at a single call-site. Here we inline them at their
call-sites, which will unlock further simplifications of the code
that will allow us to remove pointer mutations in favor of explicit
expression oriented programming.

We also delete the tests associated with these functions, the overall
functionality is implicitly tested by the TestEvaluateHTLCView tests.
2024-10-14 09:33:39 -06:00
Keagan McClelland
1222cb8b10
lnwallet: remove continue statements from evaluateHTLCView loops
This further reduces loop complexity in evaluateHTLCView by using
explicit filter steps rather than loop continue statements.
2024-10-14 09:33:39 -06:00
Keagan McClelland
d5aab4a8c1
lnwallet: consolidate loops in evaluateHTLCView
We had four for-loops in evaluateHTLCView that were exact mirror
images of each other. By making use of the new ChannelParty and
Dual facilities introduced in prior commits, we consolidate these
into two for-loops.
2024-10-14 09:33:39 -06:00
Keagan McClelland
51c28496a4
lnwallet: simplify fee calculation in evaluateHTLCView
This commit simplifies how we compute the commitment fee rate based
off of the live updates. Prior to this commit we processed all of
the FeeUpdate paymentDescriptors of both ChannelParty's. Now we only
process the last FeeUpdate of the OpeningParty
2024-10-14 09:33:38 -06:00
Keagan McClelland
4b2a4e36ad
lnwallet: pack htlcView.{OurUpdates|TheirUpdates} into Dual.
This commit moves the collection of updates behind a Dual structure.
This allows us in a later commit to index into it via a ChannelParty
parameter which will simplify the loops in evaluateHTLCView.
2024-10-14 09:33:38 -06:00
Keagan McClelland
1b2cb14254
lnwallet: change bool isIncoming to new lntypes.ChannelParty
This commit removes another raw boolean value and replaces it with
a more clear type/name. This will also assist us when we later try
and consolidate the logic of evaluateHTLCView into a single
coherent computation.
2024-10-14 09:33:38 -06:00
Keagan McClelland
b902d0825d
lnwallet: use fn.Set API directly instead of empty struct map. 2024-10-14 09:33:38 -06:00
Keagan McClelland
d82d02831d
lnwallet: remove mutateState from evaluateHTLCView
In line with previous commits we are progressively removing the
mutateState argument from this call stack for a more principled
software design approach.

NOTE FOR REVIEWERS:
We take a naive approach to updating the tests here and simply
take the functionality we are removing from evaluateHTLCView and
run it directly after the function in the test suite.

It's possible that we should instead remove this from the test
suite altogether but I opted to take a more conservative approach
with respect to reducing the scope of tests. If you have opinions
here, please make them known.
2024-10-14 09:33:16 -06:00