Commit Graph

12533 Commits

Author SHA1 Message Date
Andras Banki-Horvath
8cd607447e
routing: fix memory corruption in MC store
Since bbolt returns references to internally stored data when storing
locally it's best to copy the byte slices returned or alternatively
convert them to string (which also makes a copy) to avoid crashes casued
by memory corruption.
2021-12-08 23:10:16 +01:00
Oliver Gugger
71b23a2c54
Merge pull request #5971 from yyforyongyu/add-chan-status
rpcserver: expose ChanStatusFlags in pending close
2021-12-08 12:23:07 +01:00
yyforyongyu
4a62b7cf8c
docs: add release note for ChanStatusFlags 2021-12-08 04:50:47 +08:00
yyforyongyu
53e02fa83d
rpcserver: expose ChanStatusFlags in pending close
This commit exposes the ChanStatusFlags inside waitingCloseResp such
that the channel close type is exposed.
2021-12-08 04:50:23 +08:00
Oliver Gugger
099d5b8286
Merge pull request #6060 from mattbajorek/bugfix/lncli-trackpayment-json
lncli: Add json flag to trackpayment
2021-12-07 21:15:38 +01:00
Matthew Bajorek
6ebc896f6f lncli: Add json flag to trackpayment [skip ci] 2021-12-07 14:04:27 -05:00
Oliver Gugger
c75c3bd847
Merge pull request #5756 from yyforyongyu/itest-1-run-ctx
itest: refactor context management inside harness node and net
2021-12-07 13:14:27 +01:00
yyforyongyu
c4de19b757
docs: update release note for itest ctxt fix 2021-12-07 18:52:55 +08:00
Oliver Gugger
17babfdd8e
Merge pull request #6050 from arshbot/export-BitcoindBackendConfig-attributes
lntest: export attributes of type BitcoindBackendConfig
2021-12-07 11:36:24 +01:00
Harsha Goli
64a34f4f9f
docs: update release notes 2021-12-06 14:45:11 -05:00
yyforyongyu
0379b4f1bf
makefile: add itest-clean to kill uncleaned processes 2021-12-04 14:54:37 +08:00
yyforyongyu
05ac516762
itest: replace fakeLogger with v2 logger with Discard 2021-12-04 14:54:37 +08:00
yyforyongyu
403fdaa716
itest: use run context when making rpc requests 2021-12-04 14:54:37 +08:00
yyforyongyu
bd521dd2f0
itest: rename harness net file and add run context
This commit renames harness.go to harness_net.go. It also adds a run
context which is served as the parent context when creating new
contexts.
2021-12-04 14:54:37 +08:00
yyforyongyu
26ed64fa52
itest: manage context within HarnessNode
This commit removes the context as a param needed when calling methods
of HarnessNode. This change moves the context management inside
HarnessNode, aside from saving us a few lines, it makes the context
creation/timeout less error-prone.
2021-12-04 14:54:36 +08:00
yyforyongyu
6f59f41e86
itest: use ProcessState and runCtx to control process quit 2021-12-04 14:54:36 +08:00
yyforyongyu
f81bcdf4db
itest: add run context to harness node
This commit adds a running context to HarnessNode which replaces all the
background context used and also serves as a way to signal quit when the
test is shutting down.
2021-12-04 14:54:36 +08:00
yyforyongyu
98d7e64dc1
itest: add test_common to hold commonly used methods
A new file, test_common.go, is added to hold commonly used functions
across lntest.
2021-12-04 14:54:36 +08:00
Harsha Goli
eccf20c5b2
lntest: export attributes of type BitcoindBackendConfig
Allows these values to be accessed upstream
2021-12-03 13:03:36 -05:00
Olaoluwa Osuntokun
ad78ff114f
Merge pull request #6049 from bhandras/etcd_msg_size
etcd: make max message size configurable
2021-12-02 15:19:37 -08:00
Andras Banki-Horvath
24d5146894
docs: update release notes 2021-12-02 21:07:50 +01:00
Andras Banki-Horvath
1ccc5e8014
etcd: make max message size configurable 2021-12-02 21:07:49 +01:00
Oliver Gugger
ed3e597598
Merge pull request #5953 from yyforyongyu/add-contribution-checklist
docs: add skip ci to PR checklist [skip ci]
2021-12-02 10:46:37 +01:00
Oliver Gugger
8d3fec35fe
Merge pull request #6033 from sangaman/example-systemd-service
docs: add example systemd service file
2021-12-01 15:14:32 +01:00
Daniel McNally
128ec2c454
docs: add example systemd service file
This is an example systemd service file for lnd designed to run
alongside a bitcoind service. This file is loosely based on
https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service,
https://gist.github.com/Stadicus/f0c6db4fa6cf787f19d9d3444b91633f,
and my own experience managing lnd with systemd.
2021-11-30 23:43:24 -05:00
Oliver Gugger
f1824687eb
Merge pull request #6035 from guggero/tools-go-mod
Cleanup makefile by pinning tools in go.mod
2021-11-30 10:48:38 +01:00
naveen
b3ef3db0f2
multi: Remove GO111MODULE env variable in Makefile
The `GO111MODULE` variable is not required from go 1.16
https://go.dev/blog/go116-module-changes
2021-11-30 09:35:30 +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
44266f3889
GitHub+Makefile: remove travis goals 2021-11-29 12:52:26 +01:00
Oliver Gugger
8facc6f07e
docs+Makefile: remove goveralls
We use a GitHub Action for sending the coverage to coveralls.io and
don't need the goveralls binary anymore.
2021-11-29 12:49:29 +01:00
Oliver Gugger
03a038c769
Merge pull request #5888 from BhaagBoseDK/patch-1
payments-expiration-grace-period needs time unit
2021-11-29 09:55:30 +01:00
Oliver Gugger
6042004eda
build: bump version to v0.14.1-beta 2021-11-24 23:00:35 +01:00
Olaoluwa Osuntokun
6c66338b14
Merge pull request #6027 from Roasbeef/funding-api-consistency
funding: ensure a local funding w/ explicit type can't be downgraded
2021-11-24 13:58:34 -08:00
Olaoluwa Osuntokun
ed854cf492 docs/release-notes: add entry for funding API downgrade protection 2021-11-24 14:32:55 -06:00
Olaoluwa Osuntokun
f630cfd4d7 funding: ensure a local funding w/ explicit type can't be downgraded
In this commit, we fix an API inconsistency introduced by a recent fix.
Without this commit, it would be possible for a local user to attempt an
explicit funding type, but then _fallback_ to implicit negotiation if
the remote party didn't have the bit set.

We resolve this by adding a new bit of information to ensure that if
we're the funder and want explicit chan negotiation, we don't settle
for anything less. A new test case has been added to exercise this
behavior.

To recap for posterity, the following issues were found and fixed in the
negotiation logic:

  1. If the remote party sent a channel type (in accept channel), but we
     didn't, then we would error out. We no longer error out and instead
     ensure the channel type they sent matches what we derived via
     implicit funding.

  2. If the remote party _did not_ have the bit set, but they sent a
     chan type (in open channel), we would error out. We no longer error
     out, but instead will fall back to implicit negotiation.

Ultimately we want to eventually flip the explicit funding bit to
_required_ to eliminate any other future ambiguities and also ensure
that it isn't possible to inadvertently fall back to implicit funding,
when the _user_ expects explicit funding.
2021-11-24 14:32:55 -06:00
Oliver Gugger
53342b4794
Merge pull request #6026 from guggero/issue-rebase
Rebase bugfix PRs, prepare for minor release
2021-11-24 18:22:38 +01:00
Oliver Gugger
ee015a1d6e
docs: add release notes for channel negotiation 2021-11-24 17:51:44 +01:00
Oliver Gugger
328e3361ff
funding: don't fail flow on channel type 2021-11-24 17:51:44 +01:00
Oliver Gugger
6ee7913662
funding: don't negotiate on known types 2021-11-24 17:51:44 +01:00
Olaoluwa Osuntokun
32d0ecdca1
docs/release-notes: add entry for cnct bug fix 2021-11-24 14:40:27 +01:00
Olaoluwa Osuntokun
5a28582719
contractcourt: only supplement resolvers if channel has historical state
In this commit, we fix a bug that would cause newly updated nodes to be
unable to start up, if they have an older channel that was closed before
we started to store all the historical state for each channel.

The issue is that we started to write the complete state to disk, but
newer channels don't have it, so when we try to supplement the
resolvers, we run into this error.

Ultimately, we only need this new supplemented information for script
enforcement channels. Ideally we would instead check the channel type
there instead, but it doesn't appear to be available in this context as
is, without further changes.

Fixes https://github.com/lightningnetwork/lnd/issues/6001.
2021-11-24 14:38:56 +01:00
Olaoluwa Osuntokun
5a5d535dc5
docs/release-notes: add section about transitive feature dep fix 2021-11-24 14:36:52 +01:00
Olaoluwa Osuntokun
31ae48c59c
feature: if a bit is unset, then all other features that dep it should be
This fixes an issue where if one tries to unset a feature like anchors,
and other feature depend on it, then `lnd` fails to start as it realizes
that its dependnacy set is inconsistent.

Fixes https://github.com/lightningnetwork/lnd/issues/6002
2021-11-24 14:35:34 +01:00
Oliver Gugger
80720cb63f
Merge pull request #6021 from greywolve/fix-link-test-hint
htlcswitch: fix hint in link tests [skip ci]
2021-11-23 18:18:46 +01:00
Oliver Gugger
9d012e8bab
Merge pull request #6016 from guggero/tor-watchtower
tor+healthcheck: fix healthcheck for multiple services
2021-11-23 15:06:24 +01:00
Oliver Powell
1fe6a3cf9b htlcswitch: fix hint in link tests [skip ci]
Fixes #6020.
2021-11-23 16:04:12 +02:00
Oliver Gugger
1fbe9061ef
Merge pull request #6015 from guggero/submodule-check
GitHub: use go version that understands retract directive
2021-11-23 11:56:20 +01:00
Oliver Gugger
5155ebc405
tor+healthcheck: fix healthcheck for multiple services
Fixes #6013.
This commit fixes the Tor healthcheck that would previously fail if
there were multiple hidden service registered.
In the controller, we only need to know that our service is contained in
the list of active services. But we can't do a string equality check
since there might be multiple services, comma separated.
2021-11-23 09:53:36 +01:00
Oliver Gugger
ca0266d31b
Merge pull request #6012 from nayuta-ueno/chk-error-db
channeldb: check fetchOpenChannel() error
2021-11-23 09:51:56 +01:00
Oliver Gugger
260094cf07
GitHub: use go version that understands retract directive
As is customary with new GitHub actions, they don't work on first
attempt if you don't test them *sigh*

We need to use a more recent version of golang than is pre-installed to
avoid the "unknown directive: retract" error message.
2021-11-23 09:32:14 +01:00