Commit Graph

9467 Commits

Author SHA1 Message Date
6ffdf7ef1f lncli: live table-based payment updates 2020-04-21 17:02:15 -07:00
d51bb65536 routerrpc+lncli: add flag to suppress in-flight updates
This is a preparation for enabling the REST interface on routerrpc.
It provides REST clients that don't support server-side streaming
via keep-alive connections to use the streaming endpoint in the
typical request/response pattern. The url just needs to contain
?no_inflight_updates=true and only the terminal response is sent
back before the connection is closed.
2020-04-21 17:02:09 -07:00
1e51ec0a2d lnrpc/invoicesrpc: clamp down on max invoice size
In this commit, we move to clamp down somewhat on the max invoice size
after the limit was removed as part of the mpp changes. In #4210, it was
reported that a value of -1, would underflow and end up as 18 million
BTC, which would trip checks w.r.t the max expressible value in mSAT.
In this commit, we clamp things down to 100k BTC, which should be more
than enough for anybody.

Fixes #4210.
2020-04-21 16:44:44 -07:00
b4e98874de Merge pull request #4212 from guggero/make-release
make+build: call release script from make
2020-04-21 16:16:12 -07:00
024980a23f Merge pull request #4205 from cfromknecht/mailbox-test-fixups
htlcswitch/mailbox_test: use mailboxContext everywhere
2020-04-21 16:12:15 -07:00
528dadd04b Merge pull request #4211 from cfromknecht/absolute-fee-floor
lnwallet: absolute fee floor sanity check
2020-04-21 16:11:43 -07:00
c70a333ea7 Merge pull request #4182 from joostjager/routerrpc-legacy-revival
routerrpc: revive legacy send and track rpcs
2020-04-21 16:07:23 -07:00
89bd58786e lnwallet/channel: enforce absolute fee floor of 250 sat/kw
This enforces the _actualized_ fee rate of the  commitment transaction,
rather than the fee floor used for estimation. The new value of 250
sat/kw corresponds to 1 sat/byte, rather than 253 which is only rounded
up during estimation to account for the fact that BOLT 3 rounds down to
the nearest satoshi and that the vbyte fee estimation is lossy.

Previously we would incorrectly fail to sign the next commitment even
though the fee was technically high enough. Restarting with this commit
should solve the issue as long as the channel hasn't already gone to
chain.
2020-04-21 12:37:34 -07:00
7fe100bcfb routerrpc: bring back legacy track and send rpcs
To soften the transition for routerrpc users to the V2 messages.
2020-04-21 20:37:45 +02:00
ad5f1404cb lnrpc: remove experimental tag from payment htlcs 2020-04-21 20:36:59 +02:00
d451ef4ee1 routerrpc: rename rpcs to SendPaymentV2 and TrackPaymentV2
The message in the response stream changed. Rename the calls themselves,
to prevent older applications from getting decode errors. Especially
troublesome is the case where the request is executed (send payment),
but the application can't read the outcome (payment sent or not?)
2020-04-21 20:36:58 +02:00
4384319b4a travis: use make command for windows build 2020-04-21 11:28:42 +02:00
c08ddad22e build/README: describe how to use make release 2020-04-21 11:28:41 +02:00
317ccb2cc9 make+build: call release script from makefile 2020-04-21 11:28:41 +02:00
ce00f52ca2 make: add new release flags 2020-04-21 11:16:39 +02:00
3ab5899853 lnwallet/channel: fix log typo 2020-04-20 22:12:49 -07:00
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
4ed0a35b10 build: bump dep to cert v1.0.2 2020-04-20 14:17:53 -07:00
e4d10fa149 Merge pull request #4209 from guggero/tls-ext-key-usage
cert: define ExtendedKeyUsage as required by macOS 10.15/iOS 13.
cert/v1.0.2
2020-04-20 14:14:43 -07:00
3b8ddece41 Merge pull request #4198 from joostjager/mpp-precheck
routing: payment splitting pre-check
2020-04-20 14:10:17 -07:00
68e54bb583 Merge pull request #4206 from C-Otto/master
lnrpc: fix typos
2020-04-20 08:28:05 +02:00
7785d16919 fix typos 2020-04-18 11:12:18 +01:00
7fc1938f10 routing: payment splitting pre-check
This commit reverts cb4cd49dc8 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
f44a9e1d4c routing/test: make test channel capacities configurable 2020-04-17 15:56:19 +02:00
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
805641adf5 routing: do not split payment if destination does not support mpp 2020-04-17 14:23:57 +02:00
9bd7eb74b6 routing: add prefix logger for payment session 2020-04-17 14:23:55 +02:00
8920e20cf7 cert: define ExtendedKeyUsage as required by macOS 10.15 2020-04-17 09:22:32 +02:00
6e8442b333 routing: move payment session constructor 2020-04-16 16:25:24 +02:00
eec3799da9 build: bump version to bump version to v0.10.0-beta.rc2 v0.10.0-beta.rc2 2020-04-15 12:32:02 -07:00
30b7036709 Merge pull request #4195 from cfromknecht/mailbox-cancel-fixups
htlcswitch: mailbox cancel followups
2020-04-15 12:30:54 -07:00
b467f549b7 htlcswitch/link: return error from AddPacket 2020-04-14 22:34:59 -07:00
0a3fdf0271 htlcswitch/test_utils: extend PendingCommit timeout
Flakes locally on darwin.
2020-04-14 22:34:59 -07:00
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.
v0.10.0-beta.rc1
2020-04-14 20:08:36 -07:00
5955f83504 Merge pull request #4174 from cfromknecht/mailbox-cancel
htlcswitch: mailbox cancellation
2020-04-14 20:04:57 -07:00
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
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
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
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
4756c00474 Merge pull request #4188 from cfromknecht/verrpc-typo-fix
lnrpc/verrpc: correct mispelling of compilation
2020-04-14 10:51:11 -07:00
a8977651cc htlcswitch/linkfailure: use whitelist for ShouldSendToPeer 2020-04-14 10:51:06 -07:00
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
16ad0274c9 htlcswitch/mailbox: fail on duplicate adds 2020-04-14 10:50:25 -07:00
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
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
37dca27a3d htlcswitch: thread clock from switch to mailbox 2020-04-14 10:49:26 -07:00
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
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
12bbf28e65 htlcswitch: make handleBatchFwdErrors a pure function 2020-04-14 10:48:23 -07:00
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