Commit Graph
100 Commits
Author SHA1 Message Date
Olaoluwa Osuntokun 0bbbd9b911 build: bump min Go version to 1.19
Fixes https://github.com/lightningnetwork/lnd/issues/7495
2023-03-08 18:02:57 -08:00
Olaoluwa Osuntokun d26cfd241a Merge pull request #7485 from Roasbeef/v0-16-0-branch-rc2
build: bump version to v0.16.0-rc2
2023-03-06 12:21:58 -08:00
Olaoluwa Osuntokun 8f4fc29fc1 build: bump version to v0.16.0-rc2 2023-03-06 11:24:37 -08:00
Olaoluwa Osuntokun 4b88020269 Merge pull request #7446 from yyforyongyu/fix-future-msg
discovery: flatten future msg cache and increase its size
2023-03-06 11:21:48 -08:00
Olaoluwa Osuntokun 251802d796 Merge pull request #7444 from bitromortac/2302-capacity-config
routing: configurable capacity fraction for apriori probability
2023-03-02 18:39:01 -08:00
Olaoluwa Osuntokun 530988cadf Merge pull request #7467 from yyforyongyu/rename-lookuphtlc
rpcserver: rename `LookupHtlc` to `LookupHtlcResolution`
2023-03-01 12:05:09 -08:00
Olaoluwa Osuntokun 9f1daf31c1 Merge pull request #7445 from yyforyongyu/fix-heap
discovery: fix heap escape on `cachedMsgs`
2023-02-23 16:24:22 -08:00
Olaoluwa Osuntokun 036a0144cb build: bump version to v0.16.0-rc1 2023-02-23 15:36:51 -08:00
Olaoluwa Osuntokun cfc19a9ac4 Merge pull request #6825 from yyforyongyu/6-new-itest
itest: fix previously known test flakes
2023-02-23 15:35:45 -08:00
Olaoluwa Osuntokun d793a53bba Merge pull request #7406 from Roasbeef/gossip-cache-fix
multi: bump neutrino+btcwallet versions, use new generic lru cache
2023-02-22 15:49:49 -08:00
Olaoluwa Osuntokun a15c45231e multi: bump neutrino+btcwallet versions, use new generic lru cache 2023-02-21 17:28:48 -08:00
Olaoluwa Osuntokun f4fdd82327 Merge pull request #7264 from yyforyongyu/gossip-resend-messages
discovery: fix message order in batch sending
2023-02-21 17:10:13 -08:00
Olaoluwa Osuntokun 748461cba4 Merge pull request #7379 from ellemouton/addFieldsToRevocationLog
multi: add local and remote amount fields to revocation log
2023-02-20 17:57:08 -08:00
Olaoluwa Osuntokun aec10481c1 build: use the new merge_group selector for the merge queue
In this commit, we activate the merge queue by using the new merge_group
selector. Without this, the CI won't report back the progress of a CI
run to the merge queue, so things won't get auto merged.
2023-02-16 15:00:20 -08:00
Olaoluwa Osuntokun 5d22d5eb6c Merge pull request #7252 from ellemouton/sqlite-pt2
multi: add sqlite backend option
2023-01-31 10:14:46 -08:00
Olaoluwa Osuntokun 292551fbf4 Merge pull request #7332 from Roasbeef/sign-output-raw-bug-fix
[1/?] - lnwallet: ensure that SignOutputRaw can sign w/ non-default sighash f…
2023-01-25 18:40:44 -08:00
Olaoluwa Osuntokun be047096c2 docs/release-notes: add entry for taproot sighash bug fix 2023-01-24 19:47:39 -08:00
Olaoluwa Osuntokun 3d8f284af7 lntest/itest: update taproot signing itest to use default and non-default sighashes
Without the prior commit, this test fails with:
```
rpc error: code = Unknown desc = malformed signature: too long: 65 > 64
```
2023-01-24 19:47:34 -08:00
Olaoluwa Osuntokun 8ab598e40c lntest/itest: make publishTxAndConfirmSweep a test helper
Calling ht.Helper() means we'll get the proper line number if an error
hapens.
2023-01-24 19:47:31 -08:00
Olaoluwa Osuntokun 843c62b59d lnwallet: ensure that SignOutputRaw can sign w/ non-default sighash for schnorr sigs
Before this commitment, we'd end up failing in `schnorr.ParseSignature`
if a non-default sighash was used. To fix that, we'll slice the
signature to only pass in the sig w/o the sighash flag.
2023-01-24 19:47:29 -08:00
Olaoluwa Osuntokun 9b422acffe build: update to latest version of btcd 2023-01-24 19:47:26 -08:00
Olaoluwa Osuntokun 266cd97573 Merge pull request #7251 from ellemouton/sqlite-pt1
kvdb: add sqlite
2023-01-23 17:26:15 -08:00
Olaoluwa Osuntokun ea0eb2ce72 Merge pull request #7215 from positiveblue/invoices-channeldb-dep
Invoices: invert package dependency with `channeldb`
2023-01-17 10:13:22 -08:00
Olaoluwa Osuntokun e29a5a59ad Merge pull request #7262 from bottlepay/fix-failure-tlv
lnwire: limit channel update reader
2023-01-04 18:41:44 -08:00
Olaoluwa Osuntokun de3e0d7875 Merge pull request #7239 from Roasbeef/gossip-scoping-issues
discovery: ensure we prioritize sending out our own local announcements
2022-12-16 13:51:17 -08:00
Olaoluwa Osuntokun 050db16e5d docs/release-notes: add release notes for gossip msg prioritization 2022-12-15 11:56:49 -08:00
Olaoluwa Osuntokun f94a67a26d discovery: properly set the isRemote field for validated networkMsg
This wasn't set properly, leading to some test failures after the prior
change.
2022-12-15 11:56:44 -08:00
Olaoluwa Osuntokun 52451b37af discovery: ensure we prioritize sending out our own local announcements
In this commit, we modify our gossip broadcast logic to ensure that we
always will send out our own gossip messages regardless of the
filtering/feature policies of the peer.

Before this commit, it was possible that when we went to broadcast an
announcement, none of our peers actually had us as a syncer peer (lnd
terminology). In this case, the FilterGossipMsg function wouldn't do
anything, as they don't have an active timestamp filter set. When we go
to them merge the syncer map, we'd add all these peers we didn't send
to, meaning we would skip them when it came to broadcast time.

In this commit, we now split things into two phases: we'll broadcast
_our_ own announcements to all our peers, but then do the normal
filtering and chunking for the announcements we got from a remote peer.

Fixes https://github.com/lightningnetwork/lnd/issues/6531
Fixes https://github.com/lightningnetwork/lnd/issues/7223
Fixes https://github.com/lightningnetwork/lnd/issues/7073
2022-12-15 11:56:41 -08:00
Olaoluwa Osuntokun 9a4701d709 discovery: add new msgsToBroadcast struct
This struct will be used to later on do filtering when we go to
broadcast, based on if a message was locally sourced or granted from a
remote peer.
2022-12-15 11:56:38 -08:00
Olaoluwa Osuntokun e8177ea427 discovery: add isLocal bool to msgWithSenders
This lets us keep track of which messages we created ourselves vs the
messages that originated remotely from a peer.
2022-12-15 11:56:36 -08:00
Olaoluwa Osuntokun adb239300f fn: add new fn (func utils) package for generic helper funcs
We start with a simple Map function that can be useful for transforming
objects on the fly.

We may want to eventually make this Taro pakage into a module so we can
just have everything in one place:
https://github.com/lightninglabs/taro/tree/main/chanutils.
2022-12-15 11:56:31 -08:00
Olaoluwa Osuntokun a347e405e8 Merge pull request #7254 from yyforyongyu/fix-tools
tools: fix docker version
2022-12-15 11:55:49 -08:00
Olaoluwa Osuntokun 8a18824851 Merge pull request #7243 from guggero/ghost-utxo-fix
wallet: fix ghost UTXOs not being detected
2022-12-13 20:00:31 -08:00
Olaoluwa Osuntokun d468391d95 Merge pull request #6857 from bitromortac/2208-apriori-capacity
pathfinding: capacity-dependent apriori model probability
2022-12-12 19:07:39 -08:00
Olaoluwa Osuntokun 2477095473 Merge pull request #7209 from guggero/btcwallet-fund-psbt
mod+docs: bump btcwallet to latest version
2022-12-05 19:47:42 -08:00
Olaoluwa Osuntokun aa20bc14d7 docs/release-notes: add entry for 0.15.5
Adds an entry for the change addr bug fix, and a missing entry for the
funding locked sleep fix.
2022-11-22 13:44:55 +01:00
Olaoluwa Osuntokun d75c86f3dd lnwallet: skip dual funding test as not exposed on p2p layer
The internal messages both sides exchange haven't been updated to send
all the information needed to compute a tapscript sighash.
2022-11-22 13:44:54 +01:00
Olaoluwa Osuntokun 7090ff22d7 lnwallet: assert that P2TR addrs are used for change outputs 2022-11-22 13:44:54 +01:00
Olaoluwa Osuntokun 51f131b019 build: update to latest version of btcutil+btcwallet 2022-11-22 13:44:54 +01:00
Olaoluwa Osuntokun d61e668f56 multi: update to latest version of btcd in submodules
The main package has already been updated, but here we update the
submodules as well that only import things to use a constant or so here
and there.
2022-11-16 17:50:34 -08:00
Olaoluwa Osuntokun f6ae63fd7b Merge pull request #7130 from guggero/remote-signing-fixes
rpcwallet: fix remote signing issues
2022-11-11 16:26:20 -08:00
Olaoluwa Osuntokun bcdf24b15e Merge pull request #7126 from yyforyongyu/temp-fix-itest
itest+funding: decrease sleep time and add a temporary fix for itest
2022-11-10 16:53:44 -08:00
Olaoluwa Osuntokun c65abf8b05 Merge pull request #6759 from yyforyongyu/1-new-itest
itest: start a scaffolding testing framework
2022-10-17 20:06:48 -07:00
Olaoluwa Osuntokun 609cc8b883 lnd: add SECURITY.MD to bolster security entry in README 2022-10-17 12:05:15 -07:00
Olaoluwa Osuntokun 2ac0fcb769 Merge pull request #6957 from Roasbeef/co-op-close-fee-estimation
lnwallet/chancloser: properly compute initial fee of cop close txn
2022-10-10 15:39:24 -07:00
Olaoluwa Osuntokun 30eb6770e5 lnwallet/chancloser: fix loop variable shadowing in TestMaxFeeBailOut 2022-10-10 14:50:51 -07:00
Olaoluwa Osuntokun 2482de9cab lnwallet/chancloser: properly compute initial fee of cop close txn
In this commit, we modify the way we compute the starting ideal fee for
the co-op close transaction. Before thsi commit, channel.CalcFee was
used, which'll compute the fee based on the commitment transaction
itself, rathern than the co-op close transaction. As the co-op close
transaction is potentailly bigger (two P2TR outputs) than the commitment
transaction, this can cause us to under estimate the fee, which can
result in the fee rate being too low to propagate.

To remedy this, we now compute a fee estimate from scratch, based on the
delivery fees of the two parties.

We also add a bug fix in the chancloser unit tests that wasn't caught
due to loop variable shadowing.

The wallet import itest has been updated as well, since we'll now pay
600 extra saothis to close the channel, since we're accounting for the
added weight of the P2TR outputs.

Fixes #6953
2022-10-10 14:50:45 -07:00
Olaoluwa Osuntokun 406fc86f38 Merge pull request #7004 from Roasbeef/witness-limit-hot-fix
build: update to version of btcd with wire parsing bug fix
2022-10-09 19:34:03 -07:00
Olaoluwa Osuntokun 1c884846e7 docs/release-notes: shift prior 0.15.2 release to 0.15.3
We also add an entry for the _new_ 0.15.2 hot fix release.
2022-10-09 18:39:40 -07:00
Olaoluwa Osuntokun b3dc56fd9e build: update to version of btcd with wire parsing bug fix
Fixes https://github.com/lightningnetwork/lnd/issues/7002
2022-10-09 18:39:34 -07:00
Olaoluwa Osuntokun ffa8ba8dfc Merge pull request #6998 from Crypt-iQ/6990_zeroconftimeout_noitest
funding: ignore maxWaitNumBlocksFundingConf for zero conf channels
2022-10-06 17:51:25 -07:00
Olaoluwa Osuntokun b2c78d9488 Merge pull request #6993 from lightningnetwork/pr-stats-please-work
build: add PR stats to github workflow
2022-10-06 17:44:09 -07:00
Olaoluwa Osuntokun 2f16997a98 build: add PR stats to github workflow
In this PR, we introduce a new Github work flow tool that should help us
keep better track fo reviewer load across the proejct. Ideally this can
also be used as a tool to help new PRs find a reviewer, and also for us
to better balance out review load, and keep track of how long it takes
to do PR turnaround.
2022-10-05 13:18:02 -07:00
Olaoluwa Osuntokun bc5638428e Merge pull request #6789 from Crypt-iQ/waitingclose
server+htlcswitch: check waiting-close fwdpkgs in reforwardResponses
2022-09-30 16:39:49 -07:00
Olaoluwa Osuntokun 94ab72363a Merge pull request #6914 from positiveblue/fix-6898
addinvoice: refactor hint hop selection algorithm
2022-09-30 11:57:54 -07:00
Olaoluwa Osuntokun d062a5263e build: update to latest version of btcwallet w/ taproot estimation fix
Fixes https://github.com/lightningnetwork/lnd/issues/6873
2022-09-27 11:24:39 -07:00
Olaoluwa Osuntokun 89ebd03ff8 Merge pull request #6899 from kaloudis/protos-remove-js-build-tag
lnrpc/gen_protos.sh: remove js build tag
2022-09-13 17:36:14 -07:00
Olaoluwa Osuntokun 2ad6b57f5e Merge pull request #6795 from Roasbeef/go1-19
build: make Go 1.18 the min version, update to Go 1.19
2022-08-24 15:33:37 -05:00
Olaoluwa Osuntokun b3998ddb5c lnrpc: re-compile protos w/ Go 1.19 2022-08-24 11:43:00 -05:00
Olaoluwa Osuntokun 65a5eeb24e build: make Go 1.18 the min version, update to Go 1.19
As usual, we keep with the last two Go versions, which means the last
year of Go release (they release every 6 months or so).

This change means we can now use the type params (generics) in the
project!
2022-08-23 10:54:13 -05:00
Olaoluwa Osuntokun f8615f9910 Merge pull request #6853 from yyforyongyu/fix-make-fmt
github: fix `make fmt` and add `make fmt-check`
2022-08-23 10:48:58 -05:00
Olaoluwa Osuntokun d0d4782c3e Merge pull request #6826 from Roasbeef/bitcoind-taproot-after-19
chainreg: update tapoort node awareness to account for bitcoind 19+
2022-08-12 16:22:04 -07:00
Olaoluwa Osuntokun 6d0b354a8f Merge pull request #6664 from Crypt-iQ/fl_chanupdate_order
funding: defer sending channel_update until received funding_locked
2022-08-12 16:01:23 -07:00
Olaoluwa Osuntokun 6b7abc3dbc chainreg: update tapoort node awareness to account for bitcoind 19+
Bitcoind 23 will use the new `getdeploymentinfo` while versions after 19
(but below 23) will use the `UnifiedSoftForks` field instead of the
`SoftForks UnifiedSoftForks` field.

With this PR the taproot gating logic has been tested on bitcoind
versions: 21, 22, and 23. 21 is when the taproot logic was first added.
2022-08-12 15:35:32 -07:00
Olaoluwa Osuntokun dc453f2c39 Merge pull request #6820 from Roasbeef/btcsuite-updates
build: update to latest versions of btec, btcutil, and btcutil/psbt
2022-08-12 14:40:20 -07:00
Olaoluwa Osuntokun 822822bb75 build: update to latest versions of btec, btcutil, and btcutil/psbt
Fixes #6668
2022-08-12 14:40:00 -07:00
Olaoluwa Osuntokun be5bc79444 Merge pull request #6716 from Crypt-iQ/zeroconfacceptor
multi: add zeroconfacceptor to default reject incoming channels
2022-08-12 14:20:11 -07:00
Olaoluwa Osuntokun d0996a9df8 Merge pull request #6810 from Roasbeef/taproot-errwhere
multi: use taproot errwhere applicable for change/delivery/tower addresses
2022-08-12 14:18:35 -07:00
Olaoluwa Osuntokun 67a6bb5ecf build: bump version to v0.15.99
We forgot to do this after 0.15 was tagged, but usually we use a x.99
version to indicate that the commits in master are between releases.
This might also make it easier to help identify exactly which version a
user is running in issue reports.

[skip-ci]
2022-08-11 17:36:43 -07:00
Olaoluwa Osuntokun 91bc4b540c docs/release-notes: add release notes entry 2022-08-11 17:26:28 -07:00
Olaoluwa Osuntokun 42549519ca lnwallet/chanfunding: assumes all change outputs are P2TR 2022-08-11 17:26:23 -07:00
Olaoluwa Osuntokun 322937a67e lnwallet: use P2TR addresses for change outputs for funding coin select 2022-08-11 17:26:21 -07:00
Olaoluwa Osuntokun bcff2f07de rpc: use P2TR addresses when sending funds back to wallet (anchor reserve) 2022-08-11 17:26:18 -07:00
Olaoluwa Osuntokun b711120dca sweep: change outputs are now P2TR 2022-08-11 17:26:16 -07:00
Olaoluwa Osuntokun dc16f5df53 watchtower: uses P2TR for sweep, delivery, and reward addresses
In this commit, we modify the watch tower to use P2TR addrs for just
about anything sweep related.

One eye sore in this diff are the changes to
`backup_task_internal_test.go`. All the values are hard coded, and now
either differ by a value of 48, or needed to be modified to account for
the new assumptions propagated to rewards values and fees.
2022-08-11 17:26:13 -07:00
Olaoluwa Osuntokun cd313eba24 contractcourt: the breach arb now uses P2TR outputs for sweep addrs 2022-08-11 17:26:10 -07:00
Olaoluwa Osuntokun 2cc75db6f8 server: default sweep addrs to P2TR
This change covers sweep addresses for: the breach arbitrator, and watch
tower clients.
2022-08-11 17:26:07 -07:00
Olaoluwa Osuntokun a1cd7734d8 Merge pull request #6633 from Roasbeef/segwit-any-shutdown
multi: send P2TR addrs by default for co-op close, add new `option_any_segwit` feature bit
2022-08-11 17:05:31 -07:00
Olaoluwa Osuntokun cd7c705db2 docs/release-notes: add release notes entry 2022-08-10 18:44:43 -07:00
Olaoluwa Osuntokun 3bf2790e21 lntest/itest: add new itest to cover taproot co-op close 2022-08-10 18:44:39 -07:00
Olaoluwa Osuntokun 89529fbb4f feature+lncfg: add config option to turn of anysegwit 2022-08-10 18:44:37 -07:00
Olaoluwa Osuntokun fffad49ad1 peer: send taproot addrs during co-op close based on new feature bit
If the ShutdownAnySegwitOptional option is active, then we can safely
send these newer addresses.
2022-08-10 18:44:35 -07:00
Olaoluwa Osuntokun 99d37f254e funding: send taproot addrs as upfront shutdown if ShutdownAnySegwitOptional is active 2022-08-10 18:44:33 -07:00
Olaoluwa Osuntokun a61b6c25b3 lnwallet/chanclose: update ProcessCloseMsg to check co-op close addrs
We only want to allow p2wkh, p2tr, and p2wsh addresses, so we'll utilize
the newly public wallet function to restrict this.
2022-08-10 18:44:31 -07:00
Olaoluwa Osuntokun c79ffc07ce lnwallet: export ValidateUpfrontShutdown and restrict allowed addrs
In this commit, we catch up our logic with the latest version of the
spec that removed support for normal p2kh and p2sh addresses for co-op
closes, in order to make dust calculations more uniform.
2022-08-10 18:44:29 -07:00
Olaoluwa Osuntokun 5f9c1b902f lnwire+feature: add awareness of option_shutdown_anysegwit
In this commit, we add awareness of the option_shutdown_anysegwit that
permits both sides to send newer segwit based addresses. This'll
eventually enable us to send taproot addresses for co-op close.
2022-08-10 18:44:26 -07:00
Olaoluwa Osuntokun 559160e95c Merge pull request #6734 from Crypt-iQ/alias_listchannels
rpc: add alias info to some rpcs
2022-08-10 18:38:18 -07:00
Olaoluwa Osuntokun 3263dbf96a Merge pull request #6816 from Crypt-iQ/zero-conf-doc
docs: add zero-conf channels doc
2022-08-10 18:37:51 -07:00
Olaoluwa Osuntokun 012c0d96f5 Merge pull request #6740 from Crypt-iQ/walletsweep
sweep: account for all script types in craftSweepTx
2022-08-08 18:15:15 -07:00
Olaoluwa Osuntokun e4b5aa94a3 Merge pull request #6770 from Roasbeef/co-op-close-with-more-spec-innit
lnwallet/chancloser: remove the commit fee clamp, introduce max fee
2022-08-08 18:14:22 -07:00
Olaoluwa Osuntokun ec7be963f9 Merge pull request #6798 from Roasbeef/backend-must-taproot
chainreg: shutdown if backend node doesn't support taproot
2022-08-08 15:27:43 -07:00
Olaoluwa Osuntokun b270bde935 Merge pull request #6809 from positiveblue/remove-feature-dependency
Remove `ScidAliasOptional` feature dependency on `ExplicitChannelTypeOptional`
2022-08-08 15:27:12 -07:00
Olaoluwa Osuntokun 492f8b6999 chainreg: shutdown if backend node doesn't support taproot
In this commit, we add a check during normal node construction to see if
the backend node supports Taproot. If it doesn't, then we want to
shutdown and force the user to take note.

To check if the node supports Taproot, we'll first try the normal
getblockchaininfo call. If this works, cool, then we can rely on the
value. If it doesn't, then we'll fall back to the getdeploymentinfo call
which was added in a recent version of bitcoind [1]. Newer versions of
bitcoind might also have this call, and the getblockchaininfo call, but
not actually populate the softforks field [2]. In this case, we'll fall
back, and we also account for the case when the getblockchaininfo RPC is
removed all together.

[1]: https://github.com/bitcoin/bitcoin/pull/23508
[2]: https://github.com/bitcoin/bitcoin/pull/25114

Fixes #6773
2022-08-05 17:23:31 -07:00
Olaoluwa Osuntokun 115b041874 Merge pull request #6469 from yyforyongyu/5388-migration
channeldb: add optional migration to prune revocation logs
2022-08-04 17:15:08 -07:00
Olaoluwa Osuntokun 4df0a22409 docs/release-notes: add release notes for 0.16 2022-08-02 17:02:59 -07:00
Olaoluwa Osuntokun 89dc75cd90 lntest/itest: add test case for conf ntfn w/ block
In this commit, we add a test case to exercise the fact that if we
request a confirmation notification with the raw block, then it includes
one. We add this to the existing test that uses the conf ntfn rpc call
for simplicity.
2022-08-01 19:59:33 -07:00
Olaoluwa Osuntokun cdb15e77d5 lnrpc/chainrpc: include the block in the conf ntfn if specified 2022-08-01 19:59:28 -07:00
Olaoluwa Osuntokun 08f1c2e93a chainntfns: add new option for conf notifications to send block
In this commit, we add a new option for the existing confirmation
notification system that optionally allows the caller to specify that a
block should be included as well.

The only quirk w/ the implementation here is the neutrino backend:
usually we get filtered blocks, we so need to first fetch the block
again so we can deliver the full block to the notifier. On the notifier
end, it'll only be checking for the transactions we care about, to
sending a full block doesn't affect the correctness.

We also extend the `testBatchConfirmationNotification` test to assert
that a block is only included if the caller specifies it.
2022-08-01 19:59:21 -07:00
Olaoluwa Osuntokun 046aa7fe4a docs/release-notes: add entry for 0.15.1 2022-07-26 17:23:21 -07:00
Olaoluwa Osuntokun 1e556aa189 multi: thread through the new max fee field for co-op close
In this commit, we parse the new max fee field, and pass it through the
switch, all the way to the peer where it's ultimately passed into the
chan closer state machine.
2022-07-26 17:23:16 -07:00