Commit Graph

17733 Commits

Author SHA1 Message Date
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
Jesse de Wit
20f7c73801 docs: update release notes 2024-11-14 11:42:22 +01:00
Jesse de Wit
c84126309d channeldb: skip nil scheduler options
This is a robustness option to ensure LND doesn't crash when this
function is accidentally called with `AddChannelEdge(edge, nil)`.
2024-11-14 11:42:22 +01:00
Jesse de Wit
7d9d100e94 localchans: add policy when missing 2024-11-14 11:42:22 +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
Jesse de Wit
5e5291d044 localchans: add test for createEdge and manager 2024-11-13 12:13:11 +01:00
Jesse de Wit
bb4d3db8bc localchans: recreate missing edge if not found
If a node contains a channel, but doesn't have a corresponding edge in
the graph database, updating the channel policy would fail. In this
commit the edge is recreated if the channel exists. This ensures a node
can recover from a missing edge in the graph database by calling
updatechanpolicy.
2024-11-13 12:13:11 +01:00
Jesse de Wit
aa2ddf77d0 lncli: add create_missing_edge 2024-11-13 12:13:11 +01:00
Jesse de Wit
f1299fdd57 lnrpc: add create_missing_edge flag 2024-11-13 12:13:11 +01:00
wizard
e0f27a68ea Typo Update ruby.md
Fix typo: "handhsake" to "handshake"
2024-11-13 13:59:58 +03:00
yyforyongyu
653a8ac55e lntest+itest: add new method AssertChannelInGraph
This commit replaces `AssertTopologyChannelOpen` with
`AssertChannelInGraph`, which asserts a given channel edge is found.
`AssertTopologyChannelOpen` only asserts a given edge has been received
via the topology subscription, while we need to make sure the channel is
in the graph before continuing our tests.
2024-11-12 23:55:40 +08:00
yyforyongyu
7dda2960a5 lntest: update the block height of HarnessTest during start 2024-11-12 23:55:40 +08:00
yyforyongyu
2905e7b3df lntest+itest: kill node and wait its process
Fix a flake found in `testRPCMiddlewareInterceptor` when running in
macOS.
2024-11-12 23:55:40 +08:00
yyforyongyu
90bca1022b lntest: retry finding the payment from ListPayments 2024-11-12 23:55:40 +08:00
yyforyongyu
4506fd30cb lntest: change the nodeCounter to be atomic 2024-11-12 23:55:13 +08:00
yyforyongyu
cc6ff150b9 lntest: remove deprecated config --profile 2024-11-12 14:46:31 +08:00
yyforyongyu
6ac588e655 lntest: remove an invalid check
`openChannelsForNodes` is called inside `openZeroConfChannelsForNodes`
so this value can be true.
2024-11-12 14:46:30 +08:00
Yong
4f6b510869 Merge pull request #9248 from yyforyongyu/fix-itest
lntest: fix edge assertion and reset min relay fee
2024-11-11 22:16:03 +08:00
yyforyongyu
7dd9a17625 lntest+itest: fix testUpdateChanStatus 2024-11-11 20:57:50 +08:00
yyforyongyu
d27ff34b04 lntest+itest: rename AssertNumEdges to AssertNumActiveEdges
To properly reflect what the assertion is.
2024-11-11 20:57:49 +08:00
yyforyongyu
35992e1503 lntest+itest: expore method createSimpleNetwork
So it can be used via `ht.CreateSimpleNetwork`.
2024-11-11 20:57:49 +08:00
yyforyongyu
9682aa7a78 itest: fix testZeroConfChannelOpen and testOptionScidAlias
Use a new node instead of standby node to avoid closing the channels in
the end.
2024-11-11 20:54:10 +08:00
yyforyongyu
a745d74e7c lntest: make sure standby nodes' edges are cleaned 2024-11-11 20:54:10 +08:00
yyforyongyu
e7d0754615 lntest: make sure minRelayFeerate is reset
So every test starts with the default minRelayFeerate.
2024-11-11 20:54:10 +08:00
Matt Morehouse
4f7267ecea lnwire: add fuzz target for Fee TLV
The new Fee TLV is not included in any other messages within the lnwire
package, so it currently has no fuzzing coverage.  This fuzz target
directly tests the encoding/decoding of the TLV to get some coverage.
2024-11-08 15:03:30 -06:00
Matt Morehouse
f1b7d52308 lnwire: add fuzz target for Schnorr sig conversion
Analogous to FuzzConvertFixedSignature but for Schnorr signatures.
2024-11-08 15:01:48 -06:00
Matt Morehouse
b82ae51a0b lnwire: add fuzz target for route blinding message
Add a simple decode/encode target for the FailInvalidBlinding message.
2024-11-08 15:00:06 -06:00
Matt Morehouse
2784da13f8 lnwire: add fuzz targets for gossip 1.75 messages
Add simple decode/encode targets for AnnouncementSignatures2,
ChannelAnnouncement2, and ChannelUpdate2.
2024-11-08 14:57:13 -06:00
Oliver Gugger
5a8026aba9 Merge pull request #9249 from yyforyongyu/fix-shutdown
routing: fix missionControlStore blocks on shutting down
2024-11-08 11:09:45 +01:00
Elle
4430687076 Merge pull request #9240 from carlaKC/9166-mergeonly
htlcswitch: merge htlc custom records on modify
2024-11-08 08:38:00 +02:00