Commit Graph

12646 Commits

Author SHA1 Message Date
Martin Habovstiak
ec24767b9b lnwallet: don't enforce new reserved value in PSBT midstep
This change avoids enforcing new reserved value when PSBT funding is not
finished yet as new inputs and outputs may still be added that could
change the outcome of the check.

This originally failed in the scenario when funding a channel from
external wallet *and depositing to on-chain wallet* was done
simultaneously in a single transaction. If such transaction confirms
then reserved UTXO is guaranteed to be available but the check didn't
take it into account.

The enforcement still occurs in the final step of PSBT funding flow, so
it is safe. It also occurs in case of non-PSBT funding.
2021-12-10 00:22:17 +01:00
Olaoluwa Osuntokun
f022e557bf
Merge pull request #6068 from bhandras/mc_store_fix
routing: fix memory corruption in MC store
2021-12-09 15:20:07 -08:00
Olaoluwa Osuntokun
842fa15229
Merge pull request #6062 from yyforyongyu/6056-fix-webapi
chainfee: return floor fee rate when a given target is not found
2021-12-09 15:17:05 -08:00
Matthew Bajorek
93b1cd0e82 docs: update release note for #6073 [skip ci] 2021-12-09 09:29:18 -05:00
Matthew Bajorek
6fb3c25228 netann: clarify invalid config timeout constraints [skip ci] 2021-12-09 09:29:04 -05:00
Oliver Gugger
94bbad3fd1
Merge pull request #6071 from sputn1ck/fix-error-msgs
routerrpc: fix wrong error messages
2021-12-09 10:54:22 +01:00
ErikEk
94cb818dd9 healthcheck: misconfigured bitcoind zmq 2021-12-09 10:51:34 +01:00
kon
59b215fe09 routerrpc: fix wrong error messages
when payment_hash or final_cltv_delta and payment_request was set, the error message showed that the parameters shouldn't be set with dest instead of payment_request

[skip ci]
2021-12-09 10:36:32 +01:00
Andras Banki-Horvath
5efbb2b0ff
docs: update release notes 2021-12-08 23:10:20 +01:00
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
yyforyongyu
7f3a146216
docs: update release note for fee rate fix 2021-12-07 20:18:24 +08:00
yyforyongyu
7e7fca78c4
chainfee: update test TestWebAPIFeeEstimator 2021-12-07 20:18:24 +08:00
yyforyongyu
655ce00220
chainfee: handle conf target not found in cache 2021-12-07 20:18:24 +08: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