Commit Graph

256 Commits

Author SHA1 Message Date
Oliver Gugger
5116cfc255
mod: bump aez library that points to GitLab
The newest version of aez points directly to
gitlab.com/yawning/bsaes.git instead of the unreachable
git.schwanenlied.me/yawning/bsaes.git that required the replace
directive.
2022-03-21 20:41:40 +01:00
Oliver Gugger
973c95369f
mod: remove local replaces 2022-03-21 20:41:38 +01:00
Oliver Gugger
1b48681bba
mod: remove replace for github.com/onsi/ginkgo
With the recent PR #6285 merged that bumped the btcd dependency, we no
longer need to bump the github.com/onsi/ginkgo package with a replace
directive. Instead it was bumped indirectly by merging
https://github.com/btcsuite/btcd/pull/1780 which is included in the btcd
version we reference.
2022-03-21 20:41:37 +01:00
Oliver Gugger
fddcb6669c
mod: remove replace for go.mongodb.org/mongo-driver
With the dependency to lnd@v0.14.2-beta removed, we no longer depend on
the mongo-driver indirectly so we can remove the security related
replace directive.
2022-03-21 20:41:36 +01:00
Oliver Gugger
fa919781e2
mod+healthcheck: use new tor submodule
Using the tor module instead of whole lnd in healthcheck allows us to
get rid of a lot of indirect dependencies.
2022-03-21 20:41:34 +01:00
Oliver Gugger
c5f3110616
tor: make tor its own submodule 2022-03-21 20:41:33 +01:00
Oliver Gugger
4554c306fa
mod: bump submodules after changes to them 2022-03-09 19:05:44 +01:00
Oliver Gugger
7dfe4018ce
multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger
8ee9fc837b
Merge pull request #6136 from bhandras/forall_etcd
etcd: add ForAll to speed up graph operations
2022-03-07 16:44:43 +01:00
Olaoluwa Osuntokun
4a15de05aa
build: update go-pretty v6 [skip ci]
In this commit we update go-pretty to use the latest v6 version of the
library. The existing version we used had a reported vulnerability.
Updating to this newest version also helped to shrink our set of
indirect dependencies.

In the future we can use
https://github.com/lightningnetwork/lnd/pull/5870 to detect/flag these
issues automatically.

Fixes #6293
2022-03-01 15:02:23 -08:00
Andras Banki-Horvath
40af029413
etcd: extend kvdb_etcd with a real ForAll implementation 2022-02-28 12:03:04 +01:00
Oliver Gugger
b4b524903c
mod: bump tlv version to v1.0.1 [skip ci]
Apparently we already pushed a tag named tlv/v1.0.0 a while ago (which
points to a commit not in master)...
We need to bump the version of the tag to v1.0.1 since we cannot replace
old tags (without causing a lot of caching problems).
2022-02-21 15:30:07 +01:00
Oliver Gugger
96b960455f
mod+tlv: make tlv its own submodule 2022-02-21 13:49:30 +01:00
naveen
192cee494f
mod+tools+Makefile:separate tools different module
Separated the tools to different go module to avoid having tools
dependencies on the main module.
2022-02-10 11:02:01 +01:00
Oliver Gugger
d1b512ff92
mod+make: replace goimports with gosimports 2022-02-10 11:02:00 +01:00
Joost Jager
b8408a1484
kvdb: add ForAll
A new method to allow efficient range queries for backends that support
it.
2022-01-12 19:11:53 +01:00
Oliver Gugger
617be6f994
Merge pull request #6140 from bottlepay/fix-duplicate-close
htlcswitch: fix duplicate close
2022-01-11 11:08:30 +01:00
Joost Jager
7cd7cef6c6
htlcswitch: fix duplicate close
The decayed log database opening and closing is managed at a higher
level in config_builder.go.
2022-01-10 08:42:32 +01:00
Oliver Gugger
8c77829c46
lnwallet+lntest+mod: bump btcwallet to export ScriptForOutput 2022-01-06 13:24:30 +01:00
Joost Jager
62a2f3c809
kvdb/postgres: fix tests 2021-12-22 14:54:41 +01:00
Torkel Rogstad
c64e9c5286 Bump urfave/cli version
urfave/cli added functionality for generating Fish shell tab-completions
a few releases ago. We bump the dependency version to get access to
this functionality.
2021-12-13 11:07:49 +01:00
Andras Banki-Horvath
1ccc5e8014
etcd: make max message size configurable 2021-12-02 21:07:49 +01:00
Oliver Gugger
43158b6b59
mod+tools+Makefile: use go install to fetch dependencies
Instead of hard coding a commit to use for a binary tool that we use
during the build process, we now only use "go install" to install the
binaries and the golang builtin versioning system to pin the exact
version/commit we want to use in go.mod.
2021-11-30 09:35:25 +01:00
Oliver Gugger
dc517d89c4
mod: bump version of kvdb submodule
PR #5992 was merged without a bump in the kvdb version which results in
an error when trying to pull in lnd 0.14.0-beta as a library in other
projects.

We'll need to push the kvdb/v1.2.1 tag _after_ merging this PR.
2021-11-18 12:42:32 +01:00
Olaoluwa Osuntokun
d4ae92efb8
build: update to new btcwallet version w/ pruned node fix
See this PR for context: https://github.com/btcsuite/btcwallet/pull/778
2021-11-12 18:24:02 -08:00
Olaoluwa Osuntokun
cc643fc0d8
build: upgrade to neutrino v0.13.0
Includes some bug fixes, and a measure to make some heretics more
taproot-proof.
2021-11-04 13:59:14 -07:00
Oliver Gugger
47879d95e8
mod: update btcwallet dependency to fix crash
Fixes #5864.
Updates the btcwallet dependency to the version that fixes the
concurrent map access crash.
2021-10-25 09:50:58 +02:00
Olaoluwa Osuntokun
cac8da819f build: update go.mod with latest healthcheck version
We need a tag after the update to the sub-module, as otherwise projects
that depend on lnd (like `lndclient`) are broken.
2021-10-20 18:53:25 -07:00
naveen
06433d351e
Upgrade to go 1.16 for the left over packages
Upgraded the go to 1.16 for the rest of the packages.
2021-10-19 03:55:13 +00:00
Oliver Gugger
a3addcc927
multi: forward SendCoins call over RPC 2021-10-14 15:42:52 +02:00
Oliver Gugger
1309c6afea
multi: allow internal wallet to be watch-only 2021-10-14 15:42:45 +02:00
Oliver Gugger
98061dfd58
mod+lntest: disable stall handler in btcd mining node
The latest version of btcd allows its stall handler to be disabled. We
use that new config option to make sure the mining btcd node and the lnd
chain backend btcd node aren't disconnected if some test takes too long
and no new p2p messages are exchanged.
2021-10-05 20:48:47 +02:00
naveen
844dbc08e7
mod:replace mongo driver to address CVE-2021-20329
* The mongo driver has CVE https://github.com/advisories/GHSA-f6mq-5m25-4r72
* The mongo driver is an indirect reference and cannot be directly
upgraded.
* https://deps.dev/advisory/OSV/GO-2021-0112?from=%2Fgo%2Fgithub.com%252Flightningnetwork%252Flnd
* The fix will replace the reference of the library with the fixed
  version.
2021-10-01 13:48:47 +00:00
naveen
d5e3302265
mod : replace gogo/protobuf for GO-2021-0053
The gogo/protobuf has OSV GO-2021-0053
https://deps.dev/advisory/OSV/GO-2021-0053?from=%2Fgo%2Fgithub.com%252Flightningnetwork%252Flnd

This is used indirectly and has to be replaced in go.mod to avoid the
direct reference to that version.

The OSV has been addressed in v1.3.2
2021-10-01 13:07:52 +00:00
Olaoluwa Osuntokun
8ba68ca59f
Merge pull request #5789 from naveensrinivasan/naveen/feat/fix-CVE-2021-29482
mod: Upgraded xz library to FIX the CVE-2021-29482
2021-09-30 20:16:13 -07:00
Olaoluwa Osuntokun
c6b250c479
Merge pull request #5807 from ellemouton/bumpNeutrinoVersion
go.mod: latest neutrino commit
2021-09-30 20:13:03 -07:00
Elle Mouton
9a27cd93c3
go.mod: latest neutrino commit 2021-09-30 09:30:10 +02:00
Olaoluwa Osuntokun
6ae6f8026b
build: retract v0.0.2
A stray version of lnd was pushed out waaaay back in 2016 that can trip
up `pkg.go.dev` and things like `go get`. Using the new Go 1.16 feature,
we can now "retract" this version, which marks it as being unavailable.
2021-09-29 17:31:50 -07:00
Olaoluwa Osuntokun
6b73f01683
build: set min Go version to 1.16 in go.mod 2021-09-29 17:31:45 -07:00
eugene
fdcd726f9a
multi: replace DefaultDustLimit with script-specific DustLimitForSize
This commit updates call-sites to use the proper dust limits for
various script types. This also updates the default dust limit used
in the funding flow to be 354 satoshis instead of 573 satoshis.
2021-09-29 13:33:10 -04:00
naveen
04f57c6f57
mod: Upgraded xz library to FIX the CVE-2021-29482
Included a replace directive to avoid using an high severity CVE
https://github.com/advisories/GHSA-25xm-hr59-7c27

This library is indirectly referenced and cannot be upgraded directly.

The https://github.com/fergusstrange/embedded-postgres/pull/42 was
merged to fix the CVE issue.
2021-09-29 15:16:26 +00:00
Olaoluwa Osuntokun
3800cd9433
build: update kvdb to kvdb/v1.1.0 [skip ci]
Updates to the latest version that adds a tag after the recent postgres
support.
2021-09-24 16:12:05 -07:00
Oliver Gugger
765d043cc0
mod+lncli: remove deprecated package [skip ci]
The use of golang.org/x/crypto/ssh/terminal was marked as deprecated
since that code was moved to its own repo golang.org/x/term.
With this commit we use the new package name directly, which was already
pulled in under its new name anyway.
2021-09-24 09:22:47 +02:00
Olaoluwa Osuntokun
7970ffcc2a
Merge pull request #5366 from bottlepay/postgres
kvdb: add postgres
2021-09-21 13:58:10 -07:00
Oliver Gugger
1ca332c611
mod: update kvdb to kvdb/v1.0.3 [skip ci] 2021-09-21 12:27:42 +02:00
Joost Jager
daeb96fe0a
postgres: add itest 2021-09-21 10:44:23 +02:00
Joost Jager
3eb80cac97
kvdb: add postgres 2021-09-21 10:44:18 +02:00
Olaoluwa Osuntokun
6be472eb98
Merge pull request #5737 from naveensrinivasan/naveen/feat/fix-jwt-osv
mod : Replace for OSV GO-2020-0017 JWT
2021-09-17 16:30:06 -07:00
Oliver Gugger
63233ff66c
mod: update kvdb to kvdb/v1.0.2 [skip ci] 2021-09-17 13:08:08 +02:00
naveen
8b4bbfbf61 mod : Replace for OSV GO-2020-0017 JWT
The github.com/dgrijalva/jwt-go is no longer maintained
has this CVE https://github.com/advisories/GHSA-w73w-5m7g-f7qc

But it is being used by https://github.com/etcd-io/etcd/issues/13254
which `lnd` uses.

The https://github.com/golang-jwt/jwt/releases/tag/v3.2.1 is a fork of
the same version which was 3.2.0 with the security fix.
2021-09-16 11:23:28 +00:00
naveen
ae6f771443 mod: bump miekg/dns to next version
The dns has https://deps.dev/go/github.com%2Fmiekg%2Fdns/v1.1.25 has
GO-2020-0012 https://storage.googleapis.com/go-vulndb/golang.org/x/crypto.json

Updated the dependency with the fix.
2021-09-15 23:11:04 +00:00
Oliver Gugger
84035f1fb2
funding: add batch funding function 2021-09-02 12:13:42 +02:00
Olaoluwa Osuntokun
2206eba91a
build: point to latest btcwallet w/ new cached privkey method 2021-08-25 18:55:19 -07:00
Oliver Gugger
d329655bf6
mod: update to latest btcwallet dep 2021-08-23 11:25:39 +02:00
Martin Habovstiak
4bcb32753f lnd+signal: implement systemd notify
This adds support for notifying systemd about the state of LND. It
notifies systemd just before waiting for wallet password or, if
`wallet-password-file` was specified, right after unlocking the wallet.

This means that "ready" represents RPC being available for intended use.
It's intentional, so that client services can use `After=` in `systemd`
configuration to avoid misleading error messages about missing files or
refused connections.

Part of #4470
2021-08-20 13:26:48 +02:00
Oliver Gugger
482f76a0f4
mod+kvdb+channeldb: use btcwallet new DB interface
Depends on btcsuite/btcwallet#757.
Pulls in the updated version of btcwallet and walletdb that have the DB
interface enhanced by their own View() and Update() methods with the
reset callback/closure supported out of the box. That way the global
package-level View() and Update() functions now become pure redirects.
2021-08-04 14:55:55 +02:00
Oliver Gugger
417effd223
mod: bump healthcheck to next version
We bump the version of the healthcheck module to a version that does not
exist. But by doing so we can tag the merge commit of this PR with that
actual version and have everything working. That is faster than merging
the changes to the module, pushing a tag, then bumping the tag in
go.mod.
2021-07-28 11:01:27 +02:00
Oliver Gugger
dd749fe580
lnrpc: update grpc-gateway library to v2 2021-07-27 13:09:59 +02:00
Oliver Gugger
76e1223bf2
mod+kvdb: update etcd to v3.5.0 2021-07-27 13:09:59 +02:00
Oliver Gugger
fa26657950
mod: upgrade miekg/dns library to fix dependabot alert
We're using an old and potentially vulnerable version of the DNS
resolution library. This commit bumps the library to the latest
recommended version.
2021-07-27 09:41:00 +02:00
Oliver Gugger
5482451297
mod+GitHub: shorten PR template, bump golang to 1.15
The golang version always needs to be in sync between the go.mod, the PR
checklist and the installation instructions.

We also shorten the Pull Request template by removing everything that we
have a CI check for and just refer to those checks instead.
2021-07-20 10:55:08 +02:00
Joost Jager
3026e5a826
build: bump btcwallet 2021-07-08 14:34:16 +02:00
Olaoluwa Osuntokun
6f051fa5ea
Merge pull request #5248 from joostjager/concurrent-onion
htlcswitch: concurrent onion decoding
2021-06-18 14:08:24 -07:00
Oliver Gugger
fca685a8c5
mod: update btcutil dependency
Bumps the btcutil dependency to the latest version that fixes a bug in
parsing addresses.
2021-05-27 19:20:09 +02:00
Olaoluwa Osuntokun
0ed72b8c6a
Merge pull request #5025 from guggero/signet
Add basic bitcoin signet support
2021-05-26 18:19:57 -07:00
Joost Jager
dddf0bc887 htlcswitch: concurrent onion decoding 2021-05-24 20:12:57 +02:00
Joost Jager
42f4afef75
multi: add random coin selection 2021-05-24 20:09:56 +02:00
eugene
17646b0c04
go.mod: update btcutil, btcutil/psbt commits for psbt fix
This pulls in the latest btcutil and btcutil/psbt commits which
include a panic fix for malformed PSBT inputs.
2021-05-20 15:56:42 -04:00
Oliver Gugger
367f2c8aa4
mod: bump btcd to version with signet deployment fix
This commit updates the btcd version to a more recent one in which a bug
was fixed that lead to SegWit and Taproot not being activated properly
on signet.
This update is not strictly necessary for lnd to work but we include it
in case anyone wants to install btcd through lnd's Makefile.
2021-05-18 13:08:46 +02:00
Olaoluwa Osuntokun
fb632ab4ee
build: update neutrino+btcwallet modules to latest versions 2021-05-13 17:18:20 -07:00
Olaoluwa Osuntokun
7ab5906093
Merge pull request #5245 from bhandras/kvdb_module
kvdb: make kvdb a top level submodule to allow dependency in other projects
2021-05-13 15:59:20 -07:00
Andras Banki-Horvath
fc139d9bb8
kvdb: add ForEachBucket implementation 2021-05-13 10:35:35 +02:00
Olaoluwa Osuntokun
ba5aaec632
Merge pull request #5266 from wpaulino/import-dry-run
walletrpc: expose dry run support for ImportAccount
2021-05-10 17:19:09 -07:00
Andras Banki-Horvath
3c6f036bee
kvdb: make lnd/kvdb a submodule 2021-05-07 14:18:57 +02:00
Johan T. Halseth
b1d9525d29
Merge pull request #5269 from bhandras/healthcheck_module
kvdb: separate healthcheck module
2021-05-07 14:05:48 +02:00
Johan T. Halseth
a8d813a4e5
Merge pull request #5277 from guggero/neutrino-update
mod: bump neutrino dep to latest version
2021-05-07 13:56:55 +02:00
Johan T. Halseth
99c609c1a8
mod: update btcd to latest master 2021-05-07 11:36:46 +02:00
Wilmer Paulino
64699d8538
build: update btcwallet dependency with dry run account import support 2021-05-06 19:00:32 -07:00
Oliver Gugger
10eb52909b
mod: bump neutrino dep to latest version
We update the Neutrino dependency to the latest version that fixed a
struct alignment and several loop variable as pointer issues found by
the linter.
2021-05-06 22:55:12 +02:00
Andras Banki-Horvath
ad586c6bf1
healthcheck: separate lnd/healthcheck into submodule 2021-05-05 15:33:19 +02:00
Andras Banki-Horvath
c190c3d582
etcd: update etcd to 3.4.14 2021-05-04 17:33:09 +02:00
Andras Banki-Horvath
e5f249ad51
mod: integrate latest btcwallet and bump protobuf and grpc 2021-05-04 17:33:09 +02:00
Hampus Sjöberg
64d6d26a1c
build: update to latest version of neutrino
This commit updates neutrino to the latest version.
This is to deal with on-chain transaction issues, where in certain
situations the transaction wouldn't be broadcasted.
2021-04-29 13:55:49 -07:00
Olaoluwa Osuntokun
81452a1e1c
build: update btcwallet to latest version
This version includes a fix to a regression that caused simnet wallets
to no longer operate in certain conditions.
2021-04-22 11:20:49 -05:00
Olaoluwa Osuntokun
2b5c9e1606
build: set Go version to 1.15 remove retract
We need to remove the retract as it's a new directive that isn't
understood by Go versions < 1.16.
2021-04-21 17:44:13 -05:00
Olaoluwa Osuntokun
60250f0a04
Merge pull request #5034 from Roasbeef/m1-go1.16
build: switch all builds systems and CI/ID to go 1.16, update min go version, add support for compiling M1 binaries
2021-04-21 08:59:46 -07:00
Olaoluwa Osuntokun
1301377e1a
build: update to latest version of btcwallet
In this commit, we upgrade to the latest version of `btcwallet` that
fixes an alignment issue with usage of atomics that can cause a panic on
certain systems.

Fixes #5196.
2021-04-16 11:18:01 -07:00
Olaoluwa Osuntokun
3d0c477704
build: retract v0.0.2
A stray version of lnd was pushed out waaaay back in 2016 that can trip
up `pkg.go.dev` and things like `go get`. Using the new Go 1.16 feature,
we can now "retract" this version, which marks it as being unavailable.
2021-04-13 15:57:33 -07:00
Wilmer Paulino
82fe5d9bba
build: update btcwallet dependency introducing pruned bitcoind support
This is achieved by some recent work within the BitcoindClient enabling
it to retrieve pruned blocks from its server's peers.
2021-04-06 14:55:14 -07:00
Wilmer Paulino
a620ce3682
build: update btcd and btcwallet dependencies 2021-04-05 15:41:04 -07:00
Olaoluwa Osuntokun
f4530d67cb
build: update to latset version of neutrino
In this commit, we update to the latest version of neutrino that
includes some GC/perf optimizations when syncing, an exposed block
cache, and also additional filter verification for downloaded filters.
2021-03-25 18:20:42 -07:00
Joost Jager
5ba0f8e355 lnwallet: bump btcwallet 2021-03-13 08:45:52 +01:00
Olaoluwa Osuntokun
8d8b13a7d1
build: update to addrv2 aware neutrino version 2020-12-09 20:59:17 -08:00
Conner Fromknecht
96118c7852
dep: update to btcwallet master 2020-12-09 13:30:18 -08:00
Yong
582b164c46
kvdb: add timeout options for bbolt (#4787)
* mod: bump btcwallet version to accept db timeout

* btcwallet: add DBTimeOut in config

* kvdb: add database timeout option for bbolt

This commit adds a DBTimeout option in bbolt config. The relevant
functions walletdb.Open/Create are updated to use this config. In
addition, the bolt compacter also applies the new timeout option.

* channeldb: add DBTimeout in db options

This commit adds the DBTimeout option for channeldb. A new unit
test file is created to test the default options. In addition,
the params used in kvdb.Create inside channeldb_test is updated
with a DefaultDBTimeout value.

* contractcourt+routing: use DBTimeout in kvdb

This commit touches multiple test files in contractcourt and routing.
The call of function kvdb.Create and kvdb.Open are now updated with
the new param DBTimeout, using the default value kvdb.DefaultDBTimeout.

* lncfg: add DBTimeout option in db config

The DBTimeout option is added to db config. A new unit test is
added to check the default DB config is created as expected.

* migration: add DBTimeout param in kvdb.Create/kvdb.Open

* keychain: update tests to use DBTimeout param

* htlcswitch+chainreg: add DBTimeout option

* macaroons: support DBTimeout config in creation

This commit adds the DBTimeout during the creation of macaroons.db.
The usage of kvdb.Create and kvdb.Open in its tests are updated with
a timeout value using kvdb.DefaultDBTimeout.

* walletunlocker: add dbTimeout option in UnlockerService

This commit adds a new param, dbTimeout, during the creation of
UnlockerService. This param is then passed to wallet.NewLoader
inside various service calls, specifying a timeout value to be
used when opening the bbolt. In addition, the macaroonService
is also called with this dbTimeout param.

* watchtower/wtdb: add dbTimeout param during creation

This commit adds the dbTimeout param for the creation of both
watchtower.db and wtclient.db.

* multi: add db timeout param for walletdb.Create

This commit adds the db timeout param for the function call
walletdb.Create. It touches only the test files found in chainntnfs,
lnwallet, and routing.

* lnd: pass DBTimeout config to relevant services

This commit enables lnd to pass the DBTimeout config to the following
services/config/functions,
  - chainControlConfig
  - walletunlocker
  - wallet.NewLoader
  - macaroons
  - watchtower
In addition, the usage of wallet.Create is updated too.

* sample-config: add dbtimeout option
2020-12-07 15:31:49 -08:00
Oliver Gugger
2edc3cf98f
multi: update to latest btcd version
With this commit we update btcd to the latest version which allows us to
specify the btcd binary we want to use when spinning up a new node.
2020-12-03 11:30:22 +01:00
Oliver Gugger
505be0d8bc
channeldb: implement compaction
This commit adds the compaction feature of the bbolt compact to our bolt
backend. This will try to open the DB in read-only mode and create a
compacted copy in a temporary file. Once the compaction was successful,
the temporary file and the old source file are swapped atomically.
2020-11-13 10:19:50 +01:00
Oliver Gugger
d0c3666310
mod: update to latest btcwallet dep 2020-11-04 09:12:19 +01:00
Oliver Gugger
1a1a9a6744
mod: add auto-added go mod changes
When running the make DEPGET target for the go-fuzz binaries, this entry
is auto added, even though we don't have a direct reference to it in our
code. Not sure why this is needed in the first place.
2020-10-09 09:53:56 +02:00
Oliver Gugger
0c0d114d18
mod: bump btcwallet dep to fix scriptSig in PSBT bug
To fix a bug where the scriptSig field was mistakenly set on nested
SegWit inputs of a PSBT, we bump the btcwallet dependency that contains
said fix.
2020-10-06 10:59:46 +02:00