Commit Graph

17653 Commits

Author SHA1 Message Date
Boris Nagaev
3360d285fb
config: improve error message
Previously, the error message had one missing space:
"... either --bitcoin.mainnet, or bitcoin.testnet,bitcoin.simnet, ..."

I added a space after "bitcoin.testnet,".
2024-11-19 12:44:57 -03:00
Boris Nagaev
1bc25c1136
config: fix "lnd --debuglevel show" command
Previously, "lnd --debuglevel show" complained that bitcoin backend is not
configured:

$ lnd --debuglevel show
failed to load config: ValidateConfig: either --bitcoin.mainnet, or ...

To make it working, the user had to specify --bitcoin.mainnet and configure one
of the backends, e.g. "--bitcoin.node neutrino".

With this fix, the command works without any additional flags.
2024-11-19 12:44:55 -03:00
Oliver Gugger
411ad1d9cd
Merge pull request #9271 from morehouse/simplify_fuzz_wtwire
wtwire: simply fuzz targets
2024-11-19 12:57:34 +01:00
Oliver Gugger
c136901f24
Merge pull request #9270 from starius/goroutine-manager-bool
fn: improvements for GoroutineManager
2024-11-19 12:56:04 +01:00
Oliver Gugger
f4a1299d37
Merge pull request #9272 from lightningnetwork/sweeper-output-index
sweep: update storeRecord to include utxo index
2024-11-19 12:42:26 +01:00
Elle
d14f4c7e1f
Merge pull request #9279 from ellemouton/misc
misc: nil checks and remove deprecated default values
2024-11-19 10:37:01 +02:00
Olaoluwa Osuntokun
0e999ed9f5
Merge pull request #9275 from yyforyongyu/fix-peer-shutdown
peer+lnd: fix peer blocking on node shutdown
2024-11-18 20:15:12 -08:00
Elle Mouton
9f72ce7dd4
config: remove default values for deprecated fields
These values have been deprecated but since we still set the default
values, the "please remove it" error still shows up.
2024-11-19 05:49:30 +02:00
Olaoluwa Osuntokun
7ed2c10671
sweep: update storeRecord to include utxo index
In this commit, we complete a recently added feature by ensuring that
even if we go through the RBF loop to create a txn, that we still
populate the `outpointToIndex` map. Unit tests have been updated to
ensure this is always set as expected.
2024-11-18 18:12:41 -08:00
Elle Mouton
90ed0fe54c
lntest: nil check edges 2024-11-18 21:09:16 +02:00
yyforyongyu
3ab5669ff2
docs: update release notes 2024-11-18 18:49:34 +08:00
yyforyongyu
fe03aa0201
peer+lnd: fix peer blocking on node shutdown
This commit fixes a case where the peer blocks the shutdown process.
During the shutdown, the server will call `s.DisconnectPeer`, which
calls `peer.Disconnect`. Because the peer never enters `peer.Start` via
`s.peerInitializer`, the `startReady` chan will not be closed, causing
`peer.Disconnect` to hang forever. We now fix it by only block on
`startReady` when the peer is started.
2024-11-18 18:49:34 +08:00
Oliver Gugger
bd36f76530
Merge pull request #9273 from Roasbeef/itests-pid
lntest: print node PID when launching in itests
2024-11-18 09:38:48 +01:00
Olaoluwa Osuntokun
b9105c35e5 lntest: print node PID when launching in itests
In this commit, we start to print the PID of node's we created within an
itest. This is useful when debugging itests with `dlv` by attaching to a
given node. By printing out the PID, we facilitate such debugging
attempts.
2024-11-15 17:21:43 -08:00
Oliver Gugger
95b248a1ef
Merge pull request #9194 from lightningnetwork/aux-channel-htlc
multi: generate and pass along HTLC resolution blobs for aux channels
2024-11-15 13:07:35 +01:00
Oliver Gugger
9a1adbeeaa
docs: move 0.18.4 items, add full list of custom chan PRs 2024-11-15 09:50:01 +01:00
Oliver Gugger
e6efa2e438
Merge pull request #9269 from hieblmi/sendpayment-fix-negative-feelimit
routerrpc: fix sendpayment_v2 negative fee limit
2024-11-15 09:40:43 +01:00
Olaoluwa Osuntokun
414894348a
sweep: update BudgetInputSet.Budget() to factor in extra budget
In this commit, we update the `Budget()` call to factor in the
`extraBudget` value. Otherwise, when we go to intialize the fee
function, we won't factor in the extra budget, and will determine that
we can't broadcast/bump.
2024-11-14 16:09:59 -08:00
Olaoluwa Osuntokun
87b4991bb6
lnwallet: add whoseCommit to FetchLeavesFromCommit
This is useful for additional context to know which commit the
AuxLeafStore is fetching the leaves for.
2024-11-14 16:09:58 -08:00
Olaoluwa Osuntokun
ba16a74491
sweep: expand NotifyBroadcast to include an outpoint index
In this commit, we expand the `NotifyBroadcast` to include an outpoint
index. This is useful as it indicates the index of a given required tx
out input.
2024-11-14 16:09:58 -08:00
Olaoluwa Osuntokun
ab41f28a8f
contractcourt: pass in new aux resolution blob to sweeper in resolvers
With this commit, we update all the resolvers to pass in the new htlc
resolution blobs. Along the way, we remove the old blocking guard on
this resolution logic for HTLCs with blobs.
2024-11-14 16:09:58 -08:00
Olaoluwa Osuntokun
7ef2683586
contractcourt: update encode/decode for taproot aux data
When we read/write the aux data, we need to make sure we always set the
new fields for aux HTLCs.
2024-11-14 16:09:58 -08:00
Olaoluwa Osuntokun
9b8adf5f5c
contractcourt: add HtlcBlobs to taprootBriefcase
In this commit, we add the set of HtlcBlobs to the taprootBriefcase
struct. This new field will store all the resolution blobs for a given
HTLC. We also add some new property based tests along the way for
adequate test coverage.
2024-11-14 16:09:58 -08:00
Olaoluwa Osuntokun
1e7c5415ae
input: add new Preimage method to input.Input
In this commit, we add a new method to obtain an option of a preimage to
the input.Input struct. This is useful for callers that have an Input,
and want to optionally obtain the preimage.
2024-11-14 16:09:58 -08:00
Olaoluwa Osuntokun
af60fa0c3a
lnwallet: populate resolution blob for incoming+outgoing HTLC resolutions
In this commit, we populate the resolution blobs for the incoming and
outgoing HTLCs. We take care to populate the AuxSigDesc with the correct
information, as we need to pass along the second-level aux signature and
also sign desc along with it.
2024-11-14 16:09:57 -08:00
Olaoluwa Osuntokun
08d0aa2368
channel: add ResolutionBlob to Incoming+Outgoing HtlcResolution
Similar to the other blobs we have for the commitment output force close
resolution, these blobs will be used to ensure that we have everything
needed to sweep aux HTLCs.
2024-11-14 16:09:57 -08:00
Olaoluwa Osuntokun
98b41c6576
channel: always specify ChanType in ResolutionReq 2024-11-14 16:09:57 -08:00
Olaoluwa Osuntokun
bf350c6ede
lnwallet: expand attributes in ResolutionReq
In this commit, we add some additional attributes to the ResolutionReq
struct. These will be used to make sure that we can properly handle all
the HTLC variants, on chain.

The `AuxSigDesc` will be used to communicate if an HTLC needs to go to
the second level or not. It contains the second-level sig information
needed to finalize a broadcast to the second level.
2024-11-14 16:09:57 -08:00
Boris Nagaev
891e9621d7
fn: GoroutineManager.Go returns bool, not error
This was requested in https://github.com/lightningnetwork/lnd/pull/9140#discussion_r1821181787
2024-11-14 15:03:25 -03:00
Slyghtning
de451d72c7
docs: update release notes 2024-11-14 14:31:48 +01:00
Slyghtning
8f8942cda9
routerrpc: fix sendpayment_v2 negative fee limit 2024-11-14 14:31:46 +01:00
Boris Nagaev
669ebf49d4
fn: stress test GoroutineManager.Stop calls
Make sure there is no race condition between Done() and Wait() methods in the
GoroutineManager implementation.

See https://github.com/lightningnetwork/lnd/pull/9141#issuecomment-2467726384
2024-11-14 01:13:02 -03:00
Matt Morehouse
9dd921243d
wtwire: explain emptyMsg parameter in function comment
This makes it unnecessary to explain the argument at every call site, so
we can simplify each fuzz target.
2024-11-13 15:53:29 -06:00
Matt Morehouse
567ff5d751
wtwire: remove incorrect function comment
The harness doesn't return anything, so don't say that it does.
2024-11-13 15:53:29 -06:00
Matt Morehouse
e2f7eb963f
wtwire: move message prefixing to the harness
The prefixing is done every time the harness is used, so it may as well
reside in the harness itself.

Since we already pass an empty message of the correct type, we can use
that message to get the required prefix bytes.
2024-11-13 15:53:29 -06:00
Matt Morehouse
38f9f795e4
wtwire: s/harness/wireMsgHarness
This slightly more descriptive name obviates the repetitive comments at
every call site.
2024-11-13 15:53:29 -06:00
Yong
0876173c45
Merge pull request #9261 from yyforyongyu/fix-rpcclient-shutdown
multi: fix rpcclient shutdown
2024-11-14 03:18:07 +08:00
Oliver Gugger
60caa04a4d
Merge pull request #9263 from morehouse/simplify_fuzz_lnwire
lnwire: simplify fuzz targets
2024-11-13 18:32:15 +01:00
yyforyongyu
1c6d89446d
docs: update release notes 2024-11-14 01:22:32 +08:00
yyforyongyu
fc5f8e32f5
chanfitness: exit early when there are no updates 2024-11-14 01:22:32 +08:00
yyforyongyu
523ecc0653
multi: wait for rpcclients shutdown to complete
We need to call `WaitForShutdown` after stopping the rpc clients of the
chain backends.
2024-11-14 01:22:31 +08:00
Matt Morehouse
75bdf2d252
lnwire: use assertEqualFunc in onion failure harness
Simplifies the code slightly and improves the error message printed if
the original and deserialized messages do not match.
2024-11-13 10:25:16 -06:00
Matt Morehouse
d0e6a7a37b
lnwire: adapt harness for custom equality funcs
There are several fuzz targets that can't use the standard require.Equal
check for various reasons. By adapting the harness to accept a custom
equality function, we can reduce code duplication in these targets.
2024-11-13 10:25:16 -06:00
Matt Morehouse
b9381acb2d
lnwire: move message prefixing to the harness
The prefixing is done every time the harness is used, so it may as well
reside in the harness itself.
2024-11-13 10:25:16 -06:00
Matt Morehouse
b7a1a1e9b8
lnwire: s/harness/wireMsgHarness
This slightly more descriptive name distinguishes the wire message
harness from the onion failure harness while also obviating the
repetitive comments at every call site.
2024-11-13 10:25:16 -06:00
Matt Morehouse
4097527efc
lnwire: remove superfluous "Prefix with..." comments
These comments add nothing of value since the following line is always
self-documenting:

  data = prefixWithMsgType(data, MsgTypeToBePrefixed)
2024-11-13 10:25:12 -06:00
Oliver Gugger
8918b62943
Merge pull request #9266 from famouswizard/patch-1
Typo Update ruby.md
2024-11-13 16:46:03 +01:00
Oliver Gugger
304c8df7b9
Merge pull request #9251 from morehouse/fuzz_lnwire
lnwire: add new fuzz targets
2024-11-13 14:23:16 +01:00
Oliver Gugger
4d184dffd0
Merge pull request #9259 from yyforyongyu/prepare-itest-for-blockbeat
trivial: prepare itest for `blockbeat`
2024-11-13 12:57:42 +01:00
wizard
e0f27a68ea
Typo Update ruby.md
Fix typo: "handhsake" to "handshake"
2024-11-13 13:59:58 +03:00