Commit Graph

10458 Commits

Author SHA1 Message Date
Conner Fromknecht
6ec2cc5669
htlcswitch/mailbox_test: use mailboxContext everywhere
Modifies some of the older mailbox tests that were left untouched as of
PR #4174 to use the new mailbox test context. This ensures that the
config members of each mailbox's config are properly initialized. In
certain instances where travis is slow, this would cause test panics.
2020-04-20 15:37:33 -07:00
Olaoluwa Osuntokun
4ed0a35b10
build: bump dep to cert v1.0.2 2020-04-20 14:17:53 -07:00
Olaoluwa Osuntokun
e4d10fa149
Merge pull request #4209 from guggero/tls-ext-key-usage
cert: define ExtendedKeyUsage as required by macOS 10.15/iOS 13.
2020-04-20 14:14:43 -07:00
Olaoluwa Osuntokun
3b8ddece41
Merge pull request #4198 from joostjager/mpp-precheck
routing: payment splitting pre-check
2020-04-20 14:10:17 -07:00
Joost Jager
1307a96624
itest: check for new errors in logs 2020-04-20 14:02:23 +02:00
Joost Jager
7b7edfbde6
fundingmanager: fix log 2020-04-20 14:02:21 +02:00
ErikEk
28eba07b3e tor: socks and control can not use the same host:port 2020-04-20 10:41:19 +02:00
Carla Kirk-Cohen
68e54bb583
Merge pull request #4206 from C-Otto/master
lnrpc: fix typos
2020-04-20 08:28:05 +02:00
Carsten Otto
7785d16919 fix typos 2020-04-18 11:12:18 +01:00
Joost Jager
7fc1938f10
routing: payment splitting pre-check
This commit reverts cb4cd49dc8d3b0255afe9ff29af9c46c2dbb2c98 to bring
back the insufficient local balance failure.

Distinguishing betweeen this failure and a regular "no route" failure
prevents meaningless htlcs from being sent out.
2020-04-18 08:30:26 +02:00
Joost Jager
f44a9e1d4c
routing/test: make test channel capacities configurable 2020-04-17 15:56:19 +02:00
Joost Jager
9c4f9416d5
Merge pull request #4199 from joostjager/no-legacy-split
routing: do not split payment if destination does not support mpp
2020-04-17 15:54:43 +02:00
Joost Jager
805641adf5
routing: do not split payment if destination does not support mpp 2020-04-17 14:23:57 +02:00
Joost Jager
9bd7eb74b6
routing: add prefix logger for payment session 2020-04-17 14:23:55 +02:00
Oliver Gugger
8920e20cf7
cert: define ExtendedKeyUsage as required by macOS 10.15 2020-04-17 09:22:32 +02:00
Joost Jager
6e8442b333
routing: move payment session constructor 2020-04-16 16:25:24 +02:00
Olaoluwa Osuntokun
eec3799da9
build: bump version to bump version to v0.10.0-beta.rc2 2020-04-15 12:32:02 -07:00
Olaoluwa Osuntokun
30b7036709
Merge pull request #4195 from cfromknecht/mailbox-cancel-fixups
htlcswitch: mailbox cancel followups
2020-04-15 12:30:54 -07:00
Conner Fromknecht
b467f549b7
htlcswitch/link: return error from AddPacket 2020-04-14 22:34:59 -07:00
Conner Fromknecht
0a3fdf0271
htlcswitch/test_utils: extend PendingCommit timeout
Flakes locally on darwin.
2020-04-14 22:34:59 -07:00
Olaoluwa Osuntokun
95e2809ba3
build: bump version to v0.10.0-beta.rc1
We also add '.' to the semantic versioning alphabet to ensure it isn't
stripped out.
2020-04-14 20:08:36 -07:00
Olaoluwa Osuntokun
5955f83504
Merge pull request #4174 from cfromknecht/mailbox-cancel
htlcswitch: mailbox cancellation
2020-04-14 20:04:57 -07:00
Olaoluwa Osuntokun
7b066ad91e
Merge pull request #4190 from guggero/fix-windows-build
make+lnd+config: fix Windows build and version string
2020-04-14 19:57:26 -07:00
Wilmer Paulino
c503b82e91
server: ignore reconnection for unadvertised inbound peers over Tor
A peer's remote address isn't known to us if we accepted the connection
over Tor, instead we know the address the onion service used to dial to
lnd. If said peer also doesn't have any advertised addresses, then we
don't have enough information to attempt a reconnect, so we avoid doing
so. Allowing the reconnection to happen isn't necessarily an issue, but
not allowing it prevents the configured SOCKS proxy from dialing to
private addresses.
2020-04-14 16:16:26 -07:00
Olaoluwa Osuntokun
b7d5667db0
Merge pull request #4184 from wpaulino/upfront-shutdown-reservation-cleanup
fundingmanager: check remote peer upfront shutdown support before reservation
2020-04-14 11:15:37 -07:00
Conner Fromknecht
55f90be2a5
htlcswitch/mailbox: rename Settle/Fail queue to indicate replies
This commit renames the variables associated with processing the
Settle/Fail packets to indicate that they are replies.
2020-04-14 10:51:48 -07:00
Conner Fromknecht
ec1b8d874d
htlcswitch/link: add pending commit ticker for stall detection
This commit adds a PendingCommitTicker to the link config, which allows
us to control how quickly we fail the link if the commitment dance
stalls. Now that the mailbox has the ability to cancel packets, when the
link fails it will reset the mailbox packets on exit, forcing a
reevaluation of the HTLCs against their mailbox expiries.
2020-04-14 10:51:30 -07:00
Conner Fromknecht
4756c00474
Merge pull request #4188 from cfromknecht/verrpc-typo-fix
lnrpc/verrpc: correct mispelling of compilation
2020-04-14 10:51:11 -07:00
Conner Fromknecht
a8977651cc
htlcswitch/linkfailure: use whitelist for ShouldSendToPeer 2020-04-14 10:51:06 -07:00
Conner Fromknecht
6fca22be2b
htlcswitch/link: use return instead of break out
There is no clean up logic after the loop, done purely to improve
clarity.
2020-04-14 10:50:45 -07:00
Conner Fromknecht
16ad0274c9
htlcswitch/mailbox: fail on duplicate adds 2020-04-14 10:50:25 -07:00
Conner Fromknecht
e7ece11c29
htlcswitch/mailbox: fail htlcs when delayed for 1 minute
Now that packet failure is handled by the mailbox, we can now enforce
a delivery deadline and fail the packet if it the deadilne is exceeded.
This gives senders quicker feedback about tried routes, and allows them
to try alternative paths to the destination in the meantime.
2020-04-14 10:50:07 -07:00
Conner Fromknecht
1aa2dde4a4
htlcswithc/mailbox: prioritize settles/fails over adds
This commit splits the packet courier internally into two distinct
queues, one for adds and one for settles+fails. This allows us to
prioritize HTLCs that will clear the commitment transaction and make
space for adds. Previously this responsibility was handled by the
overflow queue.
2020-04-14 10:49:48 -07:00
Conner Fromknecht
37dca27a3d
htlcswitch: thread clock from switch to mailbox 2020-04-14 10:49:26 -07:00
Conner Fromknecht
63f3d0b012
htlcswitch/mailbox: advance packet head after delivery
This commit delays the advancement of the pktHead until after the
message has been delivered. This is a prepatory step, as in the future
we may fail to deliver the packet due to a deadline expiring.
2020-04-14 10:48:59 -07:00
Conner Fromknecht
564534c829
htlcswitch: move packet failure to mailbox
This commit moves the current logic for sending failures out of the link
and into the mailbox in preparation for our failing delayed htlcs. We do
so because the mailbox may need to fail packets while the link is
offline, and needs to be able to complete the task without member
methods on the link.
2020-04-14 10:48:40 -07:00
Conner Fromknecht
12bbf28e65
htlcswitch: make handleBatchFwdErrors a pure function 2020-04-14 10:48:23 -07:00
Conner Fromknecht
f3051efeb3
htlcswitch/mailbox: block until mailbox shutdown
Fixes a bug where Stop() wouldn't actually wait for the mailbox to exit.
2020-04-14 10:48:06 -07:00
Conner Fromknecht
5b38ed0b3e
htlcswitch/link: correct link log statement 2020-04-14 10:47:47 -07:00
Oliver Gugger
1e3b0672d7
config+lnd+lncli: add commit back to version string 2020-04-14 15:51:44 +02:00
Oliver Gugger
ec5bfd3df7
make: move escaped double quote to fix windows build 2020-04-14 15:51:44 +02:00
Joost Jager
19006b108c
Merge pull request #4189 from joostjager/rename-max-htlcs
routing+routerrpc+lncli: rename MaxHtlcs to MaxShards
2020-04-14 13:49:40 +02:00
Joost Jager
969eecc7d2
routing+routerrpc+lncli: rename MaxHtlcs to MaxShards 2020-04-14 10:31:59 +02:00
Conner Fromknecht
d4823161d8
lnrpc/verrpc: correct mispelling of compilation 2020-04-13 23:45:02 -07:00
Olaoluwa Osuntokun
a53a6f160e
Merge pull request #4175 from cfromknecht/fix-chanstatus-string
channeldb: correct HasChanStatus for ChanStatusDefault, fix rpc channel status
2020-04-13 18:47:33 -07:00
Olaoluwa Osuntokun
08c12d55fc
Merge pull request #4169 from bhandras/invoice_expiry_watcher_test_timeout_fix
invoices: elminitate sleep from expiry watcher tests
2020-04-13 18:46:59 -07:00
Olaoluwa Osuntokun
ee35dc1acf
Merge pull request #4185 from Roasbeef/btcutil-psbt-fixes
build: update to latest btcutil and psbt versions
2020-04-13 18:33:10 -07:00
Olaoluwa Osuntokun
84e577af45
build: update to latest btcutil and psbt versions
The latest versions of the `psbt` package includes some decoding bug
fixes.
2020-04-13 17:02:32 -07:00
Olaoluwa Osuntokun
786e278e12
Merge pull request #4163 from cfromknecht/version-rpc
verrpc: add GetVersion endpoint
2020-04-13 16:03:52 -07:00
Conner Fromknecht
d6fa2f9092
peer: filter channels loaded into switch via whitelist
This is less brittle than blacklisting states since it may not be clear
that new states needs to be added. Now that HasChanStatus is fixed for
ChanStatusDefault, we can safely implement this.
2020-04-13 15:19:59 -07:00