Commit Graph

8341 Commits

Author SHA1 Message Date
Joost Jager
ecd3c59f7a
cnct: do not log resolver shutting down as error 2019-09-11 15:54:41 +02:00
Olaoluwa Osuntokun
9f1c6e9394
build: update to latest version of lightning-onion 2019-09-11 05:57:08 -07:00
Olaoluwa Osuntokun
5ecde6d552
lnwallet+chainntnfs: update to use latest neutrino APIs 2019-09-11 05:57:06 -07:00
Olaoluwa Osuntokun
5fc003d6a1
build: update to latest versions of btcwallet and neutrino 2019-09-11 05:57:05 -07:00
Olaoluwa Osuntokun
6691c039ec
docs: update docs to build using go 1.13 2019-09-11 05:56:47 -07:00
Olaoluwa Osuntokun
a4e2bb47d2 build: update travis to build against go 1.13
In this commit, we update Travis to start building against the newly
released go 1.13. Additionally, we'll now utilize the new `trimpath` to
the `go build` and `go install` commands. This new flag serves to remove
all file system paths from the compiled Go executable, which will make
our binaries more reproducible.
2019-09-11 05:54:33 -07:00
Johan T. Halseth
2dd23819bb
Merge pull request #3486 from joostjager/remove-unused
multi: remove dead code
2019-09-11 08:52:50 +02:00
Joost Jager
51f2096dbd
build: enable unused linting 2019-09-10 17:22:05 +02:00
Joost Jager
e64542aa1c
build: lint with build tags 2019-09-10 17:22:03 +02:00
Joost Jager
3186c0f3a2
cnct: use resolverType type 2019-09-10 17:22:01 +02:00
Joost Jager
3d7de2ad39
multi: remove dead code 2019-09-10 17:21:59 +02:00
Joost Jager
62a9c2c3ac
channeldb/test: make route comparison a pure function
Previously the route to compare was modified in order for DeepEqual to
function properly. This created problems when tests were ran in
parallel.
2019-09-10 15:46:49 +02:00
Joost Jager
7f4af8f9ae
channeldb/test: make hop record comparison stricter 2019-09-10 15:46:48 +02:00
Matheus Degiovani
d6286e9463
itest: Shutdown final Dave node in testChanRestore
This changes the defer function in the test for channel backups to
correctly close over the 'dave' variable.

Without this closure, the shutdownAndAssert call would attempt to
shutdown the original (non-restored) dave instead of the most recently
created (restored) dave, causing a leak of a node during tests.
2019-09-10 09:26:24 -03:00
Wilmer Paulino
5d016f8c62
Merge pull request #3439 from valentinewallace/fix-zero-fwding-policy-updates
discovery+switch: apply zero forwarding policy updates in-memory as w…
2019-09-10 01:00:14 -07:00
Valentine Wallace
8ce7f82da0 discovery+switch: apply zero forwarding policy updates in-memory as well as on disk
In this commit, we fix a bug where if a user updates a forwarding policy to be
zero, the update will be applied to the policy correctly on-disk, but not
in-memory.

We solve this issue by having the gossiper return the list of on-disk updated
policies and passing these policies to the switch, so the switch can assume
that zero-valued fields are intentional and not just uninitialized.
2019-09-09 23:39:44 -07:00
Hampus Sjöberg
2445be6552 mobile: Updating sample_lnd.conf to contain norest config 2019-09-10 01:01:27 +02:00
Hampus Sjöberg
7c85363ef6 config: Add norest config for disabling REST API
This commit adds a new config `norest` for disabling the REST API.
This is useful in cases where it is not needed (i.e lnd running on
mobile devices).
2019-09-09 22:18:38 +02:00
Olaoluwa Osuntokun
2cf10ada0f
Merge pull request #3465 from cfromknecht/tlv-parsed-types
tlv+htlcswitch: validate presence/omission of parsed onion payload types
2019-09-09 05:42:03 -07:00
Olaoluwa Osuntokun
330de2b174
Merge pull request #3483 from Roasbeef/migration-9-test-fix
channeldb: ensure test for migration 9 is fully enclosed
2019-09-09 05:41:25 -07:00
Joost Jager
3a2ca434fe htlcswitch/hop: fix logging
Logging for the hop package is controlled via the parent htlcswitch
package. Unfortunately the parent package only controlled the
initialization, but didn't enable the logger when the log level came
in from the main lnd package.
2019-09-09 13:52:35 +02:00
Olaoluwa Osuntokun
62dcc4b7d5
channeldb: ensure test for migration 9 is fully enclosed
In this commit, we ensure that the test for migration 9 uses the same
encoding/decoding functions as was present in the repo when the
migration was first added. Otherwise, the test will fail as it'll try to
use the decoding functions of master (migration 10 and onwards) rather
than the decoding function of migration 9.
2019-09-09 03:57:52 -07:00
Olaoluwa Osuntokun
1f92b7587c
Merge pull request #3468 from joostjager/move-onion-processor
htlcswitch: move hop iterator into htlcswitch/hop package
2019-09-09 03:29:41 -07:00
chokoboko
ac617a0d01 channeldb: return errors in various missed places 2019-09-09 02:41:43 -07:00
Spencer Dupre
e2d5825df0 docs: update INSTALL.md to include first wallet creation (#3403)
Add 'Creating a wallet' section, explaining that 'lncli create' must be run
with a new instance. Also describe the password prompt and mnemonic this
command presents to the user.
2019-09-09 02:37:23 -07:00
Olaoluwa Osuntokun
918fd9e8ff
Merge pull request #3282 from halseth/mobile-rpcs
[mobile] Mobile RPCs
2019-09-09 02:23:26 -07:00
Olaoluwa Osuntokun
acb38a8b8b
Merge pull request #3479 from Roasbeef/migration-9-10-fix-min-version
channeldb: fix migration bug due to interplay between migration #9 an…
2019-09-09 02:20:49 -07:00
Olaoluwa Osuntokun
754809406d
channeldb: fix migration bug due to interplay between migration #9 and #10
In this commit, we fix an issue that was recently introduced as a result
of migration #10. The new TLV format ended up modifying the
serialization functions called in `serializePaymentAttemptInfo`.
Migration #9, also used this `serializePaymentAttemptInfo` method to
serialize the _new_ (pre TLV, but new payment attempt structure) routes
into the database during its migration. However, migration #10 failed to
copy over the existing unmodified `serializePaymentAttemptInfo` method
into the legacy serialization for migration #9. As a result, once
migration #9 was run, the routes/payments were serialized using the
_new_ format, rather than the format used for v0.7.1. This then lead to
de-serialization either failing, or causing partial payment corruption
as migration #10 was expecting the "legacy" format (no TLV info).

We fix this issue by adding a new fully enclosed
`serializePaymentAttemptInfoMigration9`method that will be used for
migration #9. Note that our tests didn't catch this, as they test the
migration in isolation, rather than in series which is how users will
encounter the migrations.

Fixes #3463.
2019-09-09 02:16:13 -07:00
Johan T. Halseth
78e87d148f
Merge pull request #3475 from chokoboko/fix-pilot-log-message
trivial: fix log message in initAutoPilot
2019-09-09 10:25:46 +02:00
chokoboko
c38f241b51 pilot: fix log message in initAutoPilot 2019-09-06 17:04:47 +03:00
Conner Fromknecht
6015567927
htlcswitch/iterator: validate presence/omission of payload types
From BOLT 04:

The writer:
 - MUST include amt_to_forward and outgoing_cltv_value for every node.
 - MUST include short_channel_id for every non-final node.
 - MUST NOT include short_channel_id for the final node.
2019-09-05 09:32:03 -07:00
Conner Fromknecht
aefec9b10f
tlv: return parsed types from DecodeWithParsedTypes
This commit adds an additional return value to
Stream.DecodeWithParsedTypes, which returns the set of types that were
encountered during decoding. The set will contain all known types that
were decoded, as well as unknown odd types that were ignored.

The rationale for the return value (rather than an internal member) is
so that the stream remains stateless.

This return value can be used by callers during decoding to make
assertions as to whether specific types were included in the stream.
This is need, for example, when parsing onion payloads where certain
fields must be included/omitted depending on the hop type.

The original Decode method would incur the additional performance hit of
needing to track the parsed types, so we can selectively enable this
functionality when a decoder requires it by using a helper which
conditionally tracks the parsed types.
2019-09-05 09:30:37 -07:00
Joost Jager
e54b24289f
htlcswitch: move hop iterator into htlcswitch/hop package
Prepares for onion blob decoding outside of htlcswitch.
2019-09-05 15:30:31 +02:00
Joost Jager
fb565bcd5d
Merge pull request #3449 from joostjager/route-success-prob
routerrpc: report route success probability
2019-09-05 12:34:18 +02:00
Joost Jager
6638e1ddde
Merge pull request #3466 from cfromknecht/htlcswitch-hop
htlcswitch/hop: new package for hop payload parsing/encapsulation
2019-09-05 12:31:23 +02:00
Conner Fromknecht
138b0798f5
htlcswitch/iterator: use hop.Payload constructors 2019-09-05 01:35:24 -07:00
Conner Fromknecht
378e0558c5
htlcswitch/hop: move hop.Exit and hop.Source to hop pkg 2019-09-05 01:35:23 -07:00
Conner Fromknecht
fc0e4be4d8
htlcswitch+hop: move ForwardingInfo to hop.ForwaringInfo 2019-09-05 01:35:23 -07:00
Conner Fromknecht
83d2112e8b
htlcswitch/hop: move NetworkHop to hop.Network 2019-09-05 01:35:20 -07:00
Johan T. Halseth
a8cb1c80eb
mobile: add README 2019-09-05 09:22:54 +02:00
Johan T. Halseth
fef2074c1d
mobile: add sample_lnd.conf 2019-09-05 09:22:54 +02:00
Johan T. Halseth
3aa9f18395
make: define make android, make mobile (ios+android) 2019-09-05 09:22:54 +02:00
Johan T. Halseth
4dcaea1f5d
make: define make ios, make vendor 2019-09-05 09:22:54 +02:00
Johan T. Halseth
8a92ccbbf4
mobile/bindings: add mobile bindings 2019-09-05 09:22:54 +02:00
Johan T. Halseth
a5c63786c6
make+mobile: define gen_bindings.sh
gen_bindings uses falafel to generate Go bindings from the lnrpc
protos.
2019-09-05 09:22:54 +02:00
Johan T. Halseth
fa21601d07
lnd+cmd/lnd/main: add ListenerCfg to Main
ListenerCfg allows passing custom listeners to the main method, to be
used for the wallet unlocker and rpc server. If these are set these will
be used instead of the regular RPC listeners.
2019-09-05 09:22:54 +02:00
Johan T. Halseth
2562fdbdda
lnd+rpcserver: extract listener setup into closure 2019-09-05 09:22:54 +02:00
Johan T. Halseth
187bd29d2d
gitignore: add mobile/build 2019-09-05 09:22:53 +02:00
Joost Jager
99a920f2a3
routerrpc: report route success probability
The intention of adding this field is to make probability based path
finding more transparent and help understand why a route is returned.
2019-09-05 08:35:04 +02:00
Olaoluwa Osuntokun
866867a4b0
Merge pull request #3401 from wpaulino/channel-initiator-max-fee
htlcswitch: avoid proposing fee updates exceeding max fee allowed
2019-09-04 20:38:52 -07:00