Commit Graph

11199 Commits

Author SHA1 Message Date
Johan T. Halseth
7e34132c53
routing: let graph methods take scheduler option 2021-02-10 23:54:03 +01:00
Johan T. Halseth
b5d6d7b4fd
channeldb: add SchedulerOp arg to graph update methods 2021-02-10 23:54:03 +01:00
Johan T. Halseth
e3b529939e
batch: add option for executing requests immediately
We make the default non-lazy, and will make the incoming gossip requests
lazy.
2021-02-10 23:54:02 +01:00
Olaoluwa Osuntokun
503536c1e4
Merge pull request #5003 from Roasbeef/premature-upd-revert
Revert "Merge pull request #4895 from wpaulino/disallow-premature-cha…
2021-02-10 14:44:18 -08:00
Wilmer Paulino
904003fbcb discovery: use source of ann upon confirmed channel ann batch
We do this instead of using the source of the AnnounceSignatures
message, as we filter out the source when broadcasting any
announcements, leading to the remote node not receiving our channel
update. Note that this is done more for the sake of correctness and to
address a flake within the integration tests, as channel updates are
sent directly and reliably to channel counterparts.
2021-02-10 13:22:28 -08:00
Conner Fromknecht
58e924ad1c
discovery: don't historical sync when NumActiveSyncers == 0
Currently when numgraphsyncpeers=0, lnd will still attempt to perform
an initial historical sync. We change this behavior here to forgoe
historical sync entirely when numgraphsyncpeers is zero, since the
routing table isn't being updated anyway while the node is active.

This permits a no-graph lnd mode where no syncing occurs at all.
2021-02-10 09:35:45 -08:00
Olaoluwa Osuntokun
555de44d9f Revert "Merge pull request #4895 from wpaulino/disallow-premature-chan-updates"
This reverts commit 6e6384114c890cdfd486ace5885118150940df86, reversing
changes made to 98ea4332716f953c039308c4e28cb4e55f8f89bc.
2021-02-09 19:55:45 -08:00
7758fd1438
lncli addinvoice: allow specifying msat with --amt_msat
* pass amt and amt_msat to rpc, letting server give an error if both
are present

* take amt from an extra argument if neither amt nor amt_ms are
present

implementation analogous to 298f35cdfbcfbf171fb7de645e90bdf6a368d6c8,
which is for addholdinvoice.
2021-02-10 00:20:11 +03:00
Olaoluwa Osuntokun
5cec468ff4
Merge pull request #4996 from carlaKC/itest-privatehodl
itest: add coverage for hold invoices with hop hints
2021-02-08 16:56:21 -08:00
Johan T. Halseth
ef81217f7b
Merge pull request #4993 from rockstardev/patch-1
fix: correct no-rest-tls parameter in error message
2021-02-08 13:47:55 +01:00
carla
63bdd6b07b
itest: add coverage for hold invoices with hop hints
This PR updates the hold invoice itest to create a private
channel, and sets the private option on the invoices created
to add coverage for the addition of hop hints.
2021-02-08 09:19:21 +02:00
rockstardev
57ac57ea66
fix: correct no-rest-tls parameter in error message 2021-02-07 13:22:53 -06:00
Conner Fromknecht
a5aeca8ca2
Merge pull request #4983 from guggero/vendor-reproducible
make: clean mobile stubs before building release
2021-02-07 05:49:48 -08:00
eugene
80eb5dbece
lncfg: add isIPv6Host helper to force v6 addrs through system resolver
With this commit, if --tor.active is specified, then IPv6 addresses
will no longer go through the connmgr.TorLookupIP function from btcd.
This function does not have proper IPv6 support and would fail with
the error "tor general error". Instead, use the system resolver.
2021-02-05 15:37:39 -05:00
Oliver Gugger
3ddb92d99b
make: clean mobile stubs before building release
To fix an issue where the vendor.tar.gz in a release build had a
different hash if the mobile RPC stubs were in the mobile/ folder, we
clean those out first.

The culprit was the `google.golang.org/grpc/test/bufconn` package which
is currently only used in the mobile RPC stubs and nowhere else.
Therefore the vendor/module.txt was different when vendoring with the
generated mobile RPC stubs being around.
2021-02-05 13:11:35 +01:00
Johan T. Halseth
ce01cdd7d6
Merge pull request #4981 from lightningnetwork/halseth-patch-1
docs: correct sign command
2021-02-04 19:20:40 +01:00
Johan T. Halseth
b4d66662b9
docs: correct sign command 2021-02-04 10:05:37 +01:00
Conner Fromknecht
2d9a030ae5
Merge pull request #4915 from Crypt-iQ/revsigbool_01132021
multi: store bool to determine retransmission ordering
2021-02-03 19:51:26 -08:00
Olaoluwa Osuntokun
15bdff714c
Merge pull request #4979 from Roasbeef/payment-addr-only-unit-test
routing: add new TestPaymentAddrOnlyNoSplit test case
2021-02-03 19:46:42 -08:00
Olaoluwa Osuntokun
12f5d45e68
Merge pull request #4976 from cfromknecht/make-rpc-non-quiet
gen_protos_docker: make image build non-quiet
2021-02-03 19:15:24 -08:00
Olaoluwa Osuntokun
75c4f24ebf
Merge pull request #4961 from Roasbeef/ci-go-1-15-7
build: update CI builds to use go 1.15.7
2021-02-03 17:59:54 -08:00
Olaoluwa Osuntokun
107f19a049
routing: add new TestPaymentAddrOnlyNoSplit test case
This test case ensures that we won't try to split payment if the dest
has the payment addr bit, but NOT the mpp optional/require bit.
2021-02-03 17:53:40 -08:00
Olaoluwa Osuntokun
27c1779757
routing: allow custom dest feature bits in integratedRoutingContext.testPayment
This is a preparatory commit for a new test to ensure that if a node
only has the TLV and payment addr feature bits, we don't try to split a
payment.
2021-02-03 17:53:32 -08:00
Olaoluwa Osuntokun
301f1a870e
Merge pull request #4924 from champo/check_payreq_multipart
routerrpc,routing: limit max parts if the invoice doesn't declare MPP support
2021-02-03 16:53:49 -08:00
Olaoluwa Osuntokun
caac0e6347
build: update CI builds to use go 1.15.7 2021-02-03 16:51:40 -08:00
eugene
1c407f4026
htlcswitch: reestablish unit tests 2021-02-03 16:47:47 -05:00
eugene
9b09895bde
channeldb+lnwallet: lastWasRevokeKey to store last sent rev/sig 2021-02-03 16:43:04 -05:00
Conner Fromknecht
7f006832fb
Merge pull request #4934 from cfromknecht/pinned-active-syncers
discovery: pinned syncers
2021-02-03 10:54:00 -08:00
Johan T. Halseth
1a9fd09c01
Merge pull request #4978 from bhandras/addinvoice_crash
invoices+rpc: add missing channel graph to the AddInvoiceConfig
2021-02-03 11:46:14 +01:00
Andras Banki-Horvath
dde5750160
invoices+rpc: add missing channel graph to the AddInvoiceConfig
The Graph which is referenced later in the AddInvoice call graph is
unset when adding a hodl invoice. This resulted in a crash.
2021-02-03 11:33:27 +01:00
Conner Fromknecht
814b81bd25
Merge pull request #4902 from Crypt-iQ/lntestchannels_01072021
lntest/channels: introduce subpackage to deduplicate static structs
2021-02-01 14:12:08 -08:00
Conner Fromknecht
ff9165070a
Merge pull request #4974 from bolatovumar/fix/typo-manged
Fix typo in restorechanbackup command description
2021-02-01 10:22:39 -08:00
Conner Fromknecht
faddf98391
gen_protos_docker: make image build non-quiet
This allows users to see progress whenever the docker image is
[re]built, and (esp on non-linux hosts) track the size of the build
context being uploaded. Currently no output is displayed, so it's hard
to attribute the source of latency, e.g. network latency, building
layers, a large work directory, etc.
2021-02-01 10:11:09 -08:00
Johan T. Halseth
315f97ffd5
Merge pull request #4911 from guggero/docker-rpc-compile
lnrpc+mobile: use docker to compile/format protos
2021-02-01 13:42:42 +01:00
Umar Bolatov
4dc5cb5a3a
Fix typo in restorechanbackup command description 2021-01-31 17:37:27 -08:00
Conner Fromknecht
bd1c5378bf
Merge pull request #4919 from joostjager/getnodeinfo-notfound
rpcserver: use NotFound http status code in GetNodeInfo
2021-01-31 09:43:33 -08:00
Conner Fromknecht
227fd45da2
lntest: fix linter errors 2021-01-29 01:37:37 -08:00
Conner Fromknecht
b1fee734ec
discovery/sync_manager: remove unneeded markGraphSyncing
AFAICT it's not possible to flip back from bein synced_to_chain, so we
remove the underlying call that could reflect this. The method is moved
into the test file since it's still used to test correctness of other
portions of the flow.
2021-01-29 00:19:48 -08:00
Conner Fromknecht
e42301dee2
lntest: call markGraphSynced from gossipSyncer
Rather than performing this call in the SyncManager, we give each
gossipSyncer the ability to mark the first sync completed. This permits
pinned syncers to contribute towards the rpc-level synced_to_graph
value, allowing the value to be true after the first pinned syncer or
regular syncer complets. Unlinke regular syncers, pinned syncers can
proceed in parallel possibly decreasing the waiting time if consumers
rely on this field before proceeding to load their application.
2021-01-29 00:19:48 -08:00
Conner Fromknecht
920eda26fc
lntest/graph_top: test pinned syncers 2021-01-29 00:19:48 -08:00
Conner Fromknecht
ba67f3ecaa
lntest/graph_top: remove dependence on net.Alice/Bob 2021-01-29 00:19:47 -08:00
Conner Fromknecht
fcd5cb625a
config: expose gossip.pinned-syncers for conf
The pinned syncer set is exposed as a comma-separated list of pubkeys.
2021-01-29 00:19:47 -08:00
Conner Fromknecht
2371fc5a8e
lnrpc: expose PINNED_SYNC for listpeers 2021-01-29 00:19:47 -08:00
Conner Fromknecht
340414356d
discovery: perform initial historical sync for pinned peers 2021-01-29 00:19:47 -08:00
Conner Fromknecht
2f0d56d539
discovery: add support for PinnedSyncers
A pinned syncer is an ActiveSyncer that is configured to always remain
active for the lifetime of the connection. Pinned syncers do not count
towards the total NumActiveSyncer count, which are rotated periodically.

This features allows nodes to more tightly synchronize their routing
tables by ensuring they are always receiving gossip from distinguished
subset of peers.
2021-01-29 00:19:47 -08:00
Conner Fromknecht
9e932f2a64
discovery/sync_manager: Pause/Resume HistoricalSyncTicker
This gives each initial historical syncer an equal amount of time before
being rotated, even if some fail.
2021-01-29 00:19:47 -08:00
Conner Fromknecht
ef0cd82c1f
discovery/sync_manager: make setHistoricalSyncer closure 2021-01-29 00:19:46 -08:00
Conner Fromknecht
72fbd1283b
discovery/sync_manager: break out IsGraphSynced check 2021-01-29 00:19:46 -08:00
Conner Fromknecht
7c6aa20bd8
discovery: handle err for linter 2021-01-29 00:19:46 -08:00
Johan T. Halseth
10a81e01e3
Merge pull request #2162 from halseth/make-goimports
[Makefile] Define `make imports`
2021-01-29 08:54:00 +01:00