Commit Graph

15733 Commits

Author SHA1 Message Date
Carla Kirk-Cohen
69d5496e7c
multi: update payload validation to account for blinded routes 2023-12-18 11:27:55 -05:00
Carla Kirk-Cohen
343a6ed831
hltcswitch/hop: add next hop to intermediate hop with custom records
Fix our existing test to have a valid intermediate hop that will pass
stricter validation. Previously, we did not specify a next channel for
an intermediate hop (which violates bolt4).
2023-12-18 11:27:53 -05:00
Carla Kirk-Cohen
7db072e020
routing: add additional validation to hop payload creation 2023-12-18 11:27:52 -05:00
Carla Kirk-Cohen
585f28c5f5
multi: explicitly signal final hop in pack hop payload
Previously, we'd use the value of nextChanID to infer whether a payload
was for the final hop in a route. This commit updates our packing logic
to explicitly signal to account for blinded routes, which allow zero
value nextChanID in intermediate hops. This is a preparatory commit
that allows us to more thoroughly validate payloads.
2023-12-18 11:27:52 -05:00
Carla Kirk-Cohen
b5afd905d1
htlcswitch/hop: explicitly signal final hop from sphinx packet
Previously, we were using nextChanID to determine whether a hop
payload is for the final recipient. This is no longer suitable in a
route-blinding world where intermediate hops are allowed to have zero
nextChanID TLVs (as this information is provided to forwarding nodes
in their encrypted data). This commit updates payload reading to use
the signal provided by sphinx that we are on the last packet, rather
than implying it from the contents of a hop.
2023-12-18 11:27:51 -05:00
Carla Kirk-Cohen
2f8587341a
htlcswitch/test: do not set amount and cltv for blinded test cases 2023-12-18 11:27:50 -05:00
Carla Kirk-Cohen
a75bc13230
routing/test: set outgoing timelock on non-legacy test cases
Provide valid hop payloads for tests cases that use TLV onion format.
2023-12-18 11:27:49 -05:00
Carla Kirk-Cohen
fa78d21975
htlcswitch/test: add sphinx action to decoding test
Update test to include the sphinx action to more closely represent
reality. This will be required when we add more validation to the
presence of a nextChanID field. A MoreHops action is chose because
we're testing the case with a payload that contains forwarding info.
2023-12-18 11:27:48 -05:00
Carla Kirk-Cohen
b0870ea2ed
htlcswitch/test: add encrypted data to blinded intermediate hop
Blinding points will always be accompanied by encrypted data, so
update the test to more accurately represent reality.
2023-12-12 10:01:26 -05:00
Carla Kirk-Cohen
1bb48178d7
routing/test: add channel id for final hop in clear route
Add the missing channel field to the final hop in our clear text
route test case. Note that this is the channel of the hop. With the
addition of stricter validation, we'll need this so that the
penultimate hop has a non-zero next channel ID.
2023-12-12 10:01:25 -05:00
Olaoluwa Osuntokun
2fee3f6efa
Merge pull request #8030 from ellemouton/queryChanUpdateTimestamps
multi: query chan update timestamps
2023-12-11 11:18:08 -08:00
Oliver Gugger
0ec9ac7070
Merge pull request #7654 from ErikEk/listchaintxns-add-txhash
rpc: add gettx command to walletrpc
2023-12-11 10:08:42 +01:00
Elle Mouton
645eb44f66
docs: update release notes 2023-12-11 09:12:05 +02:00
Elle Mouton
a242ad5acb
channeldb+discovery: use timestamps to maybe revive zombie 2023-12-11 09:12:05 +02:00
Elle Mouton
ebe0755a97
channeldb: make MarkEdgeLive logic reusable
This commit is a set-up commit. It extracts the logic from
`MarkEdgeLive` to a helper `markEdgeLive` method so that the logic can
be called from within other kvdb.Update blocks. This will be used in the
next commit.
2023-12-11 09:12:05 +02:00
Elle Mouton
e12321cfd6
multi: extract and pass through IsZombieChannel method 2023-12-11 09:12:05 +02:00
Elle Mouton
67df687f08
discovery: start sending timestamps if requested 2023-12-11 09:12:05 +02:00
Elle Mouton
0ad4ef373a
channeldb+discovery: fetch timestamps from DB if required 2023-12-11 09:12:05 +02:00
Elle Mouton
50e17dab59
channeldb: reformat TestFilterChannelRange 2023-12-11 09:12:04 +02:00
Elle Mouton
a439cc970f
multi: start asking for update timestamps in QueryChannelRange
This commit also adds a new `protocol.no-timestamp-query-option` option
to disable the new behaviour.
2023-12-11 09:12:04 +02:00
Elle Mouton
893147d83e
channeldb: don't initialise edge index bkt as top level
The `edgeIndexBucket` key name is used to key a sub-bucket within the
`edgeBucket` bucket. And so the `edgeIndexBucket` is not a top level
bucket.
2023-12-11 09:12:04 +02:00
Elle Mouton
49a0370dcd
lnwire: add timestamps to ReplyChannelRange msg 2023-12-11 09:12:04 +02:00
Elle Mouton
4872010779
lnwire: sort scids before encoding
This is for later when the timestamps also need to be sorted according
to the SCIDs.
2023-12-11 09:12:04 +02:00
Elle Mouton
c882223ead
lnwire+discovery: rename ShortChannelIDEncoding to QueryEncoding
Since the the encoding can be used for multiple different fields, we
rename it here to be more generic.
2023-12-11 09:12:04 +02:00
Elle Mouton
341bae098c
lnwire: add QueryOptions to QueryChannelRange 2023-12-11 09:12:04 +02:00
Elle Mouton
8efd141347
lnwire: add QueryOptions type
This commit adds a new QueryOptions type which will later be used in the
QueryReplyRange message.
2023-12-11 09:12:03 +02:00
ErikEk
c8a7a3d546 doc: update release notes 2023-12-10 22:14:18 +01:00
erik
16f05105c1 itest: add gettransactiondetails 2023-12-10 22:14:18 +01:00
ErikEk
f0bc6d804c rpc: add gettransaction endpoint to walletrpc sub-server 2023-12-10 22:14:12 +01:00
Olaoluwa Osuntokun
c32edbd732
Merge pull request #8266 from Roasbeef/fn-v1
build: bump to fn/v1.0.0
2023-12-08 14:28:40 -08:00
Olaoluwa Osuntokun
d50dd8e2d7
build: bump to fn/v1.0.0 2023-12-08 14:08:17 -08:00
Olaoluwa Osuntokun
445bd27e59
Merge pull request #8259 from Roasbeef/fn-module
fn: create new sub-module
2023-12-08 13:52:26 -08:00
Olaoluwa Osuntokun
b0114efad3
fn: create new sub-module
In this commit, we make a new sub-module from the `fn` package. This
lets other projects use it w/o pulling in all of lnd, and also other
sub-packages within lnd.

We also add a temp replace directive for new module.  We'll remove this
once we tag the final version.
2023-12-06 17:00:10 -08:00
Elle
4fa483f1bc
Merge pull request #7702 from ellemouton/towerClientMux
wtclient: Tower Client Multiplexer
2023-12-05 12:27:05 +02:00
Oliver Gugger
ad88396a34
Merge pull request #8097 from markettes/fix-amount-field
Fix amount field
2023-12-04 12:19:07 +01:00
Marcos
7445782db6
lncli: show balance for sweepall 2023-12-04 10:46:54 +01:00
Marcos
80a85d36eb
docs: release notes update for 0.18.0 2023-12-02 02:08:26 +01:00
Marcos
90b5037d73
lnrpc: add MinConfs to WalletBalanceRequest 2023-12-01 18:22:35 +01:00
Olaoluwa Osuntokun
f87e370efd
Merge pull request #8232 from yyforyongyu/optimize-mempool
gomod: update `btcwallet` version
2023-11-30 14:47:14 -08:00
Eugene
a397642f73
Merge pull request #8151 from Crypt-iQ/issue_7928
routing: launch fetchFundingTx in goroutine so router can exit
2023-11-30 12:19:01 -05:00
Eugene Siegel
8fa774681b
release-notes: update for 0.17.3 2023-11-30 10:45:11 -05:00
Eugene Siegel
faf76fbf0e
routing: launch fetchFundingTx in goroutine so router can exit
This commit introduces a wrapper function fetchFundingTxWrapper
which calls fetchFundingTx in a goroutine. This is to avoid an issue
with pruned nodes where the router is attempting to stop, but the
prunedBlockDispatcher is waiting to connect to peers that can serve
the block. This can cause the shutdown process to hang until we
connect to a peer that can send us the block.
2023-11-30 10:45:02 -05:00
Yong
9f42459036
Merge pull request #8177 from yyforyongyu/payment-status
routerrpc: optionally return the new payment status
2023-11-30 17:15:23 +08:00
yyforyongyu
827d728cd5
gomod: update btcwallet version 2023-11-30 17:12:32 +08:00
Oliver Gugger
27319315bb
Merge pull request #8220 from yyforyongyu/enhance-logging-switch
multi: fix loopvar and enhance logging around channel reestablishment
2023-11-28 17:48:02 +01:00
Elle Mouton
59ebe02fa4
docs: update release notes 2023-11-28 11:01:52 +02:00
Elle Mouton
e800aacff4
wtclient+server: unexport and rename TowerClient
Rename and unexport the `TowerClient` struct to `client` and rename the
`TowerClientManager` interface to `ClientManager`.
2023-11-28 11:01:51 +02:00
Elle Mouton
fcfdf699e3
multi: move BackupState and RegisterChannel to Manager
This commit moves over the last two methods, `RegisterChannel` and
`BackupState` from the `Client` to the `Manager` interface. With this
change, we no longer need to pass around the individual clients around
and now only need to pass the manager around.

To do this change, all the goroutines that handle channel closes,
closable sessions needed to be moved to the Manager and so a large part
of this commit is just moving this code from the TowerClient to the
Manager.
2023-11-28 10:59:40 +02:00
Elle Mouton
ab2f781b4a
wtclient+lnrpc: move Policy to Manager 2023-11-28 09:54:03 +02:00
Elle Mouton
4e51bf3a3f
wtclient+lnrpc: move LookupTower to Manager 2023-11-28 09:54:02 +02:00