Commit Graph

15789 Commits

Author SHA1 Message Date
Marcos
72a56f56b4
lncli: enable multiple outgoing channel ids in payments 2023-12-18 10:27:03 +01:00
Olaoluwa Osuntokun
ac9ca024a4
Merge pull request #8121 from Roasbeef/tlv-record-type-param
tlv: add new RecordT[T] utility type
2023-12-12 17:47:59 -08:00
Olaoluwa Osuntokun
63e86b72c5
tlv: add new RecordT[T, V] utility type
In this commit, we add a new type, `RecordT[T, V]` to reduce some of the
common boiler plate for TLV types. This type lets you take either a
primitive type, or an existing Record, and gain common methods used to
create tlv streams.

It also serves as extra type annotation as well, since wire structs can
use this to wrap any existing type and gain the relevant record methods.

This implementation ensures that the very definition of the field also
binds the TLV type value. It does this by using the generated code to
map a struct like TlvType1 to an actually Type like Type(1).
2023-12-12 17:47:10 -08:00
Olaoluwa Osuntokun
c304c2a8bb
tlv: run go generate for new set of TLV types
This shouldn't need to be run again, as this implementation restricts
things to just values 0-99, due to a hard upper limit with the way Go
unions work under the hood.
2023-12-12 17:47:04 -08:00
Olaoluwa Osuntokun
78d5806555
tlv/internal: add new internal package for generating TLV type structs
In this commit, we add some new code generation to the codebase. As
we'll see in a future commit, this'll allow us to create a new Record[T,
V] type, where T is actually a concrete _struct_ that implements a
special interface that deems it as a valid TLV type.
2023-12-12 17:47:01 -08:00
Oliver Gugger
f2d48c328b
Merge pull request #7800 from ziggie1984/neutrino-remove-sweeptx
neutrino remove sweeptx
2023-12-12 17:48:12 +01: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
Carla Kirk-Cohen
d017fe01e3
lnrpc: surface invalid onion blinding on rpc 2023-12-12 09:44:42 -05:00
Carla Kirk-Cohen
fd8381bf2a
lnwire: add invalid onion blinding error code 2023-12-12 09:44:05 -05:00
ziggie
043153fe09
docs: add release-notes 2023-12-12 14:18:17 +01:00
ziggie
58a5dcd502
docs: add formatting rule for function calls. 2023-12-12 14:18:17 +01:00
ziggie
7c09cc3326
lncli: add new removetx cmd.
This new command calls the new rpc endpoint RemoveTransaction.
2023-12-12 14:18:17 +01:00
ziggie
1ca3732f25
itest: add an itest for the removal of a tx. 2023-12-12 14:18:16 +01:00
ziggie
227ac770af
walletrpc: add new RemoveTransaction endpoint.
The RemoveTransaction endpoint removes the transaction with the
provided txid including all its descendants from the internal wallet.

We still keep watching for the address of the transation in case
the transcation is confirmed nonetheless. This command is particular
useful for neutrino backends because new bitcoind versions do not
reply with an invalid transaction error code when the tx published
fails to be included into the mempool (fullnodes do).
2023-12-12 14:18:16 +01:00
ziggie
2bc6b22a43
sweeper+lntest: remove conflicting tx
For anchor channels and neutrino backends we need to make sure
that sweeps of the same exclusive group are removed when one of
them is confirmed. Otherwise for neutrino backends those sweep
transaction are always rebroadcasted and are blocking funds in
the worst case scenario.
2023-12-12 13:11:48 +01: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