Commit Graph

8453 Commits

Author SHA1 Message Date
Joost Jager
50abb41e94
cnct: store full htlc struct inside resolver
This change prepares for accessing the onion blob from a resolver.
2019-11-12 15:01:36 +01:00
Joost Jager
a83be177c6
cnct: move supplement method into resolvers 2019-11-12 14:55:03 +01:00
Joost Jager
e0a3f803d5
lnrpc: extract fee limit calculation 2019-11-12 14:24:53 +01:00
Joost Jager
a364d2cd82
routing: log route when payment attempt fails 2019-11-12 14:13:31 +01:00
Joost Jager
53076880f1
htlcswitch: report failure source index for forwarding errors 2019-11-12 14:13:29 +01:00
Joost Jager
85dcaff0d9
routing/route: report amount per hop in Route.String()
Makes log output slightly more descriptive to aid debugging of routing
problems.
2019-11-12 14:13:27 +01:00
Joost Jager
de33010e90
htlcswitch/test: do not string match error 2019-11-12 14:13:25 +01:00
Joost Jager
76c2b2cea2
Merge pull request #3665 from joostjager/resolver-constructors
cnct: add resolver constructors
2019-11-12 14:10:39 +01:00
Wilmer Paulino
9c454e9c6f
Merge pull request #3704 from halseth/neutrino-dep-update
mod: update neutrino dep
2019-11-11 13:20:38 -08:00
Wilmer Paulino
e1dd2a88e3
Merge pull request #3699 from Crypt-iQ/macaroon_store_race_1109
macaroons: add encKeyMtx to prevent race condition
2019-11-11 11:44:06 -08:00
Joost Jager
32249cb72e
cnct: add new methods for resolvers 2019-11-11 14:35:30 +01:00
Joost Jager
1e5eec990e
cnct: add new from reader resolver initializers 2019-11-11 14:35:28 +01:00
Johan T. Halseth
a8837478f4
mod: update neutrino dep 2019-11-11 10:45:09 +01:00
Johan T. Halseth
3b22540fc1
Merge pull request #2533 from yancyribbens/persistent-lnd-volume-docker-compose
add named volume to lnd service for persisting data accross container…
2019-11-11 09:47:30 +01:00
nsa
1018df991f
macaroons: add encKeyMtx to prevent race condition 2019-11-09 21:12:11 -05:00
Joost Jager
b222b6e625
Merge pull request #3685 from cfromknecht/flat-features
flat features
2019-11-09 11:43:45 +01:00
Olaoluwa Osuntokun
86bed393f9
Merge pull request #2927 from joostjager/hodl-drop-fix-better
htlcswitch: fix empty commit sig and no commit sig
2019-11-08 17:16:48 -08:00
yancy ribbens
5c4edcab8f add named volume to lnd service for persisting data accross container lifecycle 2019-11-08 11:30:41 -06:00
Conner Fromknecht
5e27b5022c
multi: remove LocalFeatures and GlobalFeatures 2019-11-08 05:32:00 -08:00
Conner Fromknecht
16318c5a41
multi: merge local+global features from remote peer 2019-11-08 05:31:47 -08:00
Conner Fromknecht
6c86075354
peer+server: use feature manager to generate feature vectors 2019-11-08 05:29:29 -08:00
Conner Fromknecht
fe566e1755
feature: add new feature pkg to manage feature sets
This commit introduces a feature.Manager, which derives feature vectors
for various contexts within the daemon. The sets can be described via a
staticly compiled format, which makes any runtime adjustments to the
feature sets when the manager is initialized.
2019-11-08 05:29:16 -08:00
Conner Fromknecht
90e36ca04b
lnwire/features: add unified Features namespace 2019-11-08 05:28:47 -08:00
Conner Fromknecht
92fb5ac363
Merge pull request #3686 from joostjager/local-apriori
routing: use distinct probability estimation for local channels
2019-11-08 03:32:37 -08:00
Wilmer Paulino
b0dc3b76fd
Merge pull request #3661 from guggero/deprecate-rest-string
proto: deprecate duplicate string fields in requests
2019-11-07 10:52:45 -08:00
Wilmer Paulino
2bec35a3d2
Merge pull request #3687 from joostjager/wallet-binding-fix
lnwallet: fix loop binding bug
2019-11-07 10:49:18 -08:00
Joost Jager
ff63a680a1
cnct: instantiate quit channels inside resolvers
Removes a bug-prone construction that existed previously where the quit
channel was replaced just-in-time.
2019-11-07 13:10:35 +01:00
Joost Jager
75ecbfd321
cnct: unexport ResolverKit quit field 2019-11-07 13:10:33 +01:00
Joost Jager
ee14eaec5f
cnct: remove redundant AttachResolverKit call 2019-11-07 13:10:31 +01:00
Joost Jager
53d210d741
cnct: remove unused Decode interface method 2019-11-07 13:10:29 +01:00
Johan T. Halseth
d50b3a9c81
Merge pull request #3684 from alexbosworth/patch-12
trivial: fix typo
2019-11-07 12:00:35 +01:00
Joost Jager
c7fad2d7cf
lnwallet: fix loop binding bug 2019-11-07 11:45:06 +01:00
Joost Jager
dc0399af51
routing: use distinct probability estimation for local channels
Previously we used the a priori probability also for our own untried
channels. This led to local channels that had seen a success already
being prioritized over untried local channels. In some cases, depending
on the configured payment attempt cost, this could lead to the payment
taking a two hop route while a direct payment was also possible.
2019-11-07 11:26:52 +01:00
Joost Jager
5a80c3459f
routing: create prob estimation func taking external node prob 2019-11-07 11:25:14 +01:00
Johan T. Halseth
2947036633
Merge pull request #3664 from joostjager/outgoing-contest-resolver-test
cnct/test: add outgoing contest resolver test
2019-11-07 10:54:45 +01:00
Oliver Gugger
7e9c4f0f87
proto: deprecate duplicate string fields in requests
With this PR we deprecate fields that have been specifically added to
to work around a bug in the gRPC/REST gateway that didn't allow bytes
fields to be encoded in REST requests.
That bug has now been fixed so the fields are no longer required.
To make it more clear how bytes fields have to be used in REST,
comments have been added to all those fields.
2019-11-07 08:53:00 +01:00
Olaoluwa Osuntokun
0fbcc3b2e9
Merge pull request #3682 from guggero/docs-make-check
docs: bitcoind is required for unit tests
2019-11-06 16:00:22 -08:00
Alex Bosworth
bfe3f07959
trivial: typo fix 2019-11-06 15:46:59 -08:00
Alex Bosworth
c390219f3d
trivial: fix typo 2019-11-06 15:44:12 -08:00
Joost Jager
f930dd42a6
cnct/test: add outgoing contest resolver test 2019-11-06 16:07:06 +01:00
Joost Jager
1cb796b9b7
cnct: remove redundant current block fetch
The block notifier now always sends the current block immediately.
2019-11-06 15:53:32 +01:00
Bjarne Magnussen
0328348431 docker: fix ltcd ports
Fixes execution in `start-ltcctl.sh` and simplifies building `PARAMS`


fixes `ltcctl` execution
2019-11-06 10:05:06 +01:00
Oliver Gugger
2b163480cf
docs: bitcoind is required for unit tests 2019-11-06 09:47:48 +01:00
Joost Jager
0b5afa64f3
htlcswitch: remove logCommitTick
Replace logCommitTick as a way to deal with revocation window exhaustion
by retrying to update the commit tx when the remote revocation is
received.

The rationale is that the revocation window always opens up because of a
revoke message that is received from the other party. It is therefore
not necessary to set a timer for this. The reception of the revoke
message is the trigger to send a new commit sig if necessary.
2019-11-06 09:21:33 +01:00
Joost Jager
ae67b1a4a4
htlcswitch/test: test revocation window exhaustion 2019-11-06 09:21:31 +01:00
Joost Jager
5078d662ef
htlcswitch: remove batch counter
Now that channel exposes the number of pending local updates, it is no
longer necessary to track the batch size separately in the link.
2019-11-06 09:21:29 +01:00
Joost Jager
2482d84d7d
htlcswitch: stop batch timer if there are no updates 2019-11-06 09:21:27 +01:00
Joost Jager
03b32d046a
htlcswitch+lnwallet: replace updateNeeded by check on channel itself
Instead of tracking local updates in a separate link variable, query
this state from the channel itself.

This commit also fixes the issue where the commit tx was not updated
anymore after a failed first attempt because the revocation window was
closed. Also those pending updates will be taken into account when the
remote party revokes.
2019-11-06 09:21:25 +01:00
Joost Jager
f59b4d62bf
htlcswitch: check for signature owed in link
Previously the channel method FullySynced was used to decide whether to
send a new commit sig message. However, it could happen that FullySynced
was false, but that we didn't owe a commitment signature. Instead we
were waiting on the other party to send us a signature. If that
happened, we'd send out an empty commit sig. This commit modifies the
condition that triggers a new commit sig and fixes this deviation from
the spec.
2019-11-06 09:21:23 +01:00
Joost Jager
64f4421d6c
htlcswitch/test: add test cases that triggers empty commit sig
Co-authored-by: Johan T. Halseth <johanth@gmail.com>
2019-11-06 09:21:21 +01:00