Commit Graph

11311 Commits

Author SHA1 Message Date
Conner Fromknecht
ab695cc305
Merge pull request #4623 from guggero/travis-log-upload-failure-only
travis: only upload log files on test failure
2020-09-16 12:22:07 -04:00
Oliver Gugger
a93aaff2fd
travis: only upload log files on test failure
To speed up tests and also not DoS termbin and file.io, we only upload
the integration test logs on failure.
2020-09-16 15:16:10 +02:00
Joost Jager
3531c3fbbe
Merge pull request #4602 from joostjager/proportional-attempt-cost
routing: proportional attempt cost
2020-09-16 14:12:19 +02:00
Joost Jager
3e3d8487fb
sweep: wrap weight estimator
Preparation for a cpfp-aware weight estimator. For cpfp, a regular
weight estimator isn't sufficient, because it needs to take into account
the weight of the parent transaction(s) as well.
2020-09-16 11:49:22 +02:00
Joost Jager
2ebfb64b9b
Merge pull request #4606 from joostjager/cpfp-sweep-prep
cnct+sweep+itest: preparations for cpfp-aware sweeper
2020-09-16 11:48:39 +02:00
Johan T. Halseth
df6606d37f
txnotifier test: add test for confirmation after cancellation
This test addition would cause the txnotifier to crash prior to the
previous commit.
2020-09-16 11:23:02 +02:00
Johan T. Halseth
2665836fa3
txnotifier: delete ntfn by confirm height always
When we cancel a confirmation request, we should remove the request from
the height map regardless of the current height. Otherwise we end up in
the situation when the height is reached, the notification is attempted
sent which results in a crash.
2020-09-16 11:20:37 +02:00
Johan T. Halseth
3a12b5867f
txnotifier test: use Cancel() directly 2020-09-16 11:19:53 +02:00
Joost Jager
08bb8ec54e
cnct: clear exclusive group on anchor sweep after confirmation
The sweeper call UpdateParams does not update the exclusive group
property of a pending sweep. This led to anchor outputs being swept
after confirmation with an exclusive group restriction, which is not
necessary.

This commit changes the anchor resolver to not use UpdateParams anymore,
but instead always re-offer the anchor input to the sweeper. The sweeper
is modified so that a re-offering also updates the sweep parameters.
2020-09-16 08:17:40 +02:00
Joost Jager
6df4fa84df
sweep: clean up state mutation
The add function tries to add an input to the current set. It therefore
calculates what the new set would look like before actually adding. This
commit isolates the state of the tentative set so that there is less
opportunity for bugs to creep in.
2020-09-16 08:17:38 +02:00
Joost Jager
cdbde5dd4c
sweep: do not combine exclusive and non-exclusive inputs 2020-09-16 08:17:36 +02:00
Joost Jager
b6ebf3f27d
lntest: use web fee estimator in itests 2020-09-16 08:17:34 +02:00
yyforyongyu
245db6a7fe
rpcserver: fix make lint 2020-09-16 12:08:46 +08:00
yyforyongyu
e8d9643f3a
itest: test for connection timeout 2020-09-16 11:50:59 +08:00
yyforyongyu
469aba9282
lnd+rpcserver: allow customized timeout in ConnectPeer 2020-09-16 11:50:04 +08:00
yyforyongyu
ef38b12fda
multi: use timeout field in dialer 2020-09-16 11:50:04 +08:00
yyforyongyu
fb67b58d3f
brontide+tor:add timeout value for network connections 2020-09-16 11:50:03 +08:00
Olaoluwa Osuntokun
9dcb522ebc
Merge pull request #4618 from Roasbeef/healthcheck-bsd
healtcheck: add extra build tags+files for netbsd and openbsd
2020-09-15 18:54:02 -07:00
Olaoluwa Osuntokun
9887b2d731
healtcheck: add extra build tags+files for netbsd and openbsd
Without these changes, the disk check portions won't compile on these
platforms.
2020-09-15 18:26:11 -07:00
Olaoluwa Osuntokun
fa342a1230
Merge pull request #4567 from calvinrzachman/max-wumbo
add new max channel size config option
2020-09-15 15:31:47 -07:00
Carla Kirk-Cohen
fe1d131ea4
Merge pull request #4615 from carlaKC/healthcheck-disabledisk
config: disable disk space health check by default
2020-09-15 20:31:40 +02:00
Conner Fromknecht
a0e54a9650
watchtower/lookout: use correct to-local-penalty size for anchors
This commit fixes the to-local-witness estimate to use the correct
witness size estimate for anchor channels. We retain the off-by-one bug
from the original constant otherwise.
2020-09-15 12:48:23 -04:00
Conner Fromknecht
d440cc4024
watchtower/lookout/justice_descriptor: anchor justice txn
This commit modifies the JusticeDescriptor to support creation of
justice transactions spending from anchor commitments. Rather than the
unencumbered p2wkh scripts from before, the tower will now use the
to-remote-confirmed that includes the additional CSV delay of 1. This
also requires setting the sequence number appropriately on the to-remote
input.
2020-09-15 12:44:00 -04:00
Conner Fromknecht
cfbde5d2ce
watchtower/lookout/justice_descriptor_test: use require 2020-09-15 12:43:52 -04:00
Conner Fromknecht
ac2e1d7d96
watchtower/blob/justice_kit: conditional anchor to-remote script
This commit modifies the ToRemoteWitnessScript function to be
conditioned on the blob type, and return either the legacy or anchor
to-remote script. The same witness satisfies either script, so no
changes are necessary to ToRemoteWitnessStack.
2020-09-15 12:43:44 -04:00
Conner Fromknecht
ffe15e2820
watchtower/blob/justice_kit: add BlobType to JusticeKit struct
This is preparation for later commits where the values returned by
member methods will need to be conditioned on the blob type used during
decryption.
2020-09-15 12:43:37 -04:00
Conner Fromknecht
b82695dbcc
watchtower/blob/justice_kit_test: convert to require
This is also a prepatory step to making
TestJusticeKitRemoteWitnessConstruction parameteried by the blob type so
we can test both anchor and legacy witness construction.
2020-09-15 12:43:26 -04:00
Conner Fromknecht
0477c80732
watchtower/blob/type: add new FlagAnchorChannel 2020-09-15 12:43:20 -04:00
Conner Fromknecht
ed67ce7678
watchtower/blob/type: remove use of iota for flag constants 2020-09-15 12:43:06 -04:00
Johan T. Halseth
b8eb41f947
Merge pull request #4591 from hsjoberg/walletloader-unload
lnd: Call loader.UnloadWallet on shutdown
2020-09-15 13:54:46 +02:00
Joost Jager
cf6eee80db
Merge pull request #2428 from joostjager/letsencrypt
lnrpc: let's encrypt certificates
2020-09-15 13:08:15 +02:00
Joost Jager
fc3fd26a3d
config: allow web fee estimation on regtest 2020-09-15 10:29:14 +02:00
Oliver Gugger
904055cf4f
Merge pull request #4601 from guggero/psbt-final-tx-raw
PSBT funding: allow final TX to be specified as raw wire format transaction
2020-09-15 10:07:52 +02:00
Joost Jager
403d72b468
lnrpc: lets encrypt
This commit enables lnd to request and renew a Let's Encrypt
certificate. This certificate is used both for the grpc as well as the
rest listeners. It allows clients to connect without having a copy of
the (public) server certificate.

Co-authored-by: Vegard Engen <vegard@engen.priv.no>
2020-09-15 09:59:09 +02:00
carla
a42e4fca32
config: disable disk space health check by default
The disk availability health check is less critical than our chain
access check, and may break existing setups (particularly mobile) if we
enable it by default. Here we disable by default, but leave our other
default values in so that it can easily be flipped on.
2020-09-15 09:33:15 +02:00
Oliver Gugger
107e135df9
itest: test PSBT funding flow with raw final TX
As we already create two channels in our PSBT funding flow itest we can
easily just submit the final transaction for the second channel in the
raw wire format to test this new functionality.
2020-09-15 08:30:23 +02:00
Oliver Gugger
5375f88b55
lnwallet+rpcserver: allow final raw tx to be specified
With this commit we allow the final transaction of a PSBT funding flow
to also be specified as a raw wire format transaction.
2020-09-15 08:30:23 +02:00
Oliver Gugger
1c832cbce7
chanfunding: verify inputs are signed in raw tx 2020-09-15 08:30:22 +02:00
Oliver Gugger
d581cd02fc
chanfunding: extract FinalizeRawTX into own method
As a preparation to also allow the final TX to be specified in the raw
wire format, we extract the check of the final transaction into its own
method.
2020-09-15 08:30:22 +02:00
Oliver Gugger
154dc1af66
lncli: allow final transaction as raw hex in PSBT funding flow 2020-09-15 08:30:21 +02:00
Oliver Gugger
c4ada8a592
lnrpc: add final raw TX to PSBT finalize 2020-09-15 08:30:21 +02:00
Oliver Gugger
7f68649b44
mod: update btcwallet and psbt library version 2020-09-15 08:29:56 +02:00
Calvin Zachman
f5fb64e552 add new max channel size config option
- let users specify their MAXIMUM WUMBO with new config option which sets the maximum channel size lnd will accept
- current implementation is a simple check by the fundingManager rather than anything to do with the ChannelAcceptor
- Add test cases which verify that maximum channel limit is respected for wumbo/non-wumbo channels
- use --maxchansize 0 value to distinguish set/unset config. If user sets max value to 0 it will not do anything as 0 is currently used to indicate to the funding manager that the limit should not be enforced. This seems justifiable since --maxchansize=0 doesn't seem to make sense at first glance.
- add integration test case to ensure that config parsing and valiation is proper. I simplified the funding managers check electing to rely on config.go to correctly parse and set up either i) non wumbo default limit of 0.16 BTC OR ii) wumbo default soft limit of 10 BTC

Addresses: https://github.com/lightningnetwork/lnd/issues/4557
2020-09-14 21:16:32 -05:00
Olaoluwa Osuntokun
ffe7c3e626
Merge pull request #4473 from yyforyongyu/allow-no-auth-private-addr
lncfg: allow no auth on private addresses
2020-09-14 19:03:27 -07:00
András Bánki-Horváth
dea6d91431
Merge pull request #4603 from bhandras/fix_help
config: prevent displaying usage twice if --help was requested
2020-09-14 18:58:21 +02:00
Andras Banki-Horvath
b778b25866
config: prevent displaying usage twice if --help was requested 2020-09-14 15:18:41 +02:00
Joost Jager
999ffffa37
lnd: join imports to form three groups
In line with https://github.com/pavius/impi
2020-09-14 14:52:07 +02:00
Oliver Gugger
9ea836c237
Merge pull request #4614 from guggero/printmacaroon-fix
lncli: print all permission actions
2020-09-14 13:41:05 +02:00
András Bánki-Horváth
d62b93e012
Merge pull request #4607 from bhandras/routing_experiments
lncli: add outgoing_chanid to queryroutes
2020-09-14 13:26:56 +02:00
Carla Kirk-Cohen
db0802bc8d
Merge pull request #4440 from carlaKC/4165-ratelimit
chanfitness: Rate limit in memory events based on peer flap rate
2020-09-14 13:11:07 +02:00