Commit Graph

621 Commits

Author SHA1 Message Date
Johan T. Halseth
f047c3517f
discovery/gossiper: remove source pubkey from ProcessLocalAnnouncement params 2021-02-11 15:13:51 +01:00
Johan T. Halseth
69770f15e4
server: use nodeKeyECDH everywhere 2021-02-11 15:13:51 +01:00
Olaoluwa Osuntokun
7b0ea3c029
Merge pull request #4909 from carlaKC/mc-paramsapi
routing: allow runtime updates to mission control config
2021-02-10 18:51:53 -08:00
Wilmer Paulino
bfc8523873
Revert "discovery: add new option to toggle gossip rate limiting"
This reverts commit 13a2598ded5944c1bc91ecff2c2b1b156486bda5.
2021-02-10 15:45:48 -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
carla
e10e8f11de
routing: extract probability estimator cfg and add validation
In preparation for allowing live update of mc config, we extract our
probability estimator cfg for easy update and add validation.
2021-01-19 10:57:13 +02:00
carla
0735d359b9
router: move self node out of config
We are going to use the config struct to allow getting and setting
of the mission control config in the commits that follow. Self node
is not something we want to change, so we move it out for better
separation.
2021-01-19 10:57:10 +02:00
eugene
dcdf36f410 lnd+funding: move Manager to funding, change references 2020-12-17 10:45:05 -05:00
eugene
936227798a lnd: remove openChanReq, call InitFundingWorkflow with InitFundingMsg 2020-12-17 09:50:48 -05:00
eugene
105e961b20 lnd: export Manager's InitFundingWorkflow method 2020-12-17 09:36:34 -05:00
eugene
6a209bbdaf lnd: export Manager, NewFundingManager 2020-12-17 09:36:34 -05:00
eugene
caa0f5da6a multi: move and export funding-related vars to funding package
Also moves the lnd global MaxFundingAmount to server.go
2020-12-17 09:36:34 -05:00
Johan T. Halseth
0fd76e53b8
multi: cap anchors feerate at configurable maximum
This commit caps the update fee the initiator will send when the anchors
channel type is used. We do not limit anything on the receiver side.

10 sat/vbyte is the current default max fee rate we use. This should be
enough to ensure propagation before anchoring down the commitment
transaction.
2020-12-15 19:54:50 +01:00
Johan T. Halseth
c92c06400b
config+protocol: enable anchor commitments (zero-fee HTLC ) by default 2020-12-15 10:13:25 +01:00
Marty Jones
c04773963b
healthcheck: add healthcheck to shutdown if cert is expired (#4792)
In certain container set ups, it's useful to optionally have lnd just shutdown if it detects that its certs are expired, as assuming there's a hypervisor to restart the container/pod, then upon restart, lnd will have fully up to date certs.
2020-12-01 18:34:19 -08:00
Johan T. Halseth
8ec4697fe3
Merge pull request #4810 from Roasbeef/gossip-throttle-config
multi: add new config option to toggle gossip rate limiting
2020-12-01 13:32:52 +01:00
Olaoluwa Osuntokun
13a2598ded
discovery: add new option to toggle gossip rate limiting
In this commit, we add a new option to toggle gossip rate limiting. This
new option can be useful in contexts that require near instant
propagation of gossip messages like integration tests.
2020-11-30 16:38:56 -08:00
Conner Fromknecht
0d0f22aacb
link+peer: thread anchor tower client to link 2020-11-25 15:39:14 -08:00
Conner Fromknecht
094ce09644
server: log tower client error on stop (lint) 2020-11-25 15:06:17 -08:00
Conner Fromknecht
60ad01e9c2
server: initialize distinct anchor tower client 2020-11-25 15:05:56 -08:00
Olaoluwa Osuntokun
e4f0f2aa69
Merge pull request #4667 from guggero/auto-compact
channeldb/kvdb/bolt: automatically compact database on startup
2020-11-16 17:50:14 -08:00
Oliver Gugger
32ee527f6b
server+htlcswitch: auto compact sphinx DB too 2020-11-13 10:19:51 +01:00
Oliver Gugger
35c1fad517
server+healthcheck: rename function, add absolute disk space function
With this commit we rename the existing AvailableDiskSpace function to
its correct name AvailableDiskSpaceRatio as it only returns a ratio. We
then go ahead and add a new function that returns the actual number of
free bytes available on a file system.

This also fixes some comments and always returns an error instead of
panicking.
2020-11-13 10:19:50 +01:00
Oliver Gugger
08042405c7
server: allow overwriting of DNS seeds 2020-11-13 10:07:03 +01:00
carla
ca3b36c4b1
multi: use uptime api for bitcoind healthcheck if version > 0.15
The getblockchaininfo call in bitcoind uses a commonly used lock,
csmain, in bitcoind. This made the endpoint unsuitable for a health
check, because some nodes were seeing waits up to 5 minutes (!). This
commit updates our health check function to use the uptime api, provided
our bitcoind version is > 0.15, when the api was added. We do not need
to switch our health check for btcd, because it has more granular
locking.
2020-11-11 11:26:15 +02:00
carla
91bf59df17
multi: allow specifying max csv for locally initiated channels 2020-11-04 13:55:39 +02:00
carla
f4136decae
multi: add max local csv config option
To allow nodes more control over the amount of time that their funds
will be locked up, we add a MaxLocalCSVDelay option which sets the
maximum csv delay we will accept for all channels. We default to the
existing constant of 10000, and set a sane minimum on this value so that
clients cannot set unreasonably low maximum csv delays which will result
in their node rejecting all channels.
2020-11-04 13:55:37 +02:00
Olaoluwa Osuntokun
297c614126
Merge pull request #4701 from carlaKC/4581-removeexperimential
multi: remove experimential build flag for assumechanvalid
2020-11-03 17:34:50 -08:00
Eugene
9571088756 lnd: log errors for ChainControl when shutting down 2020-10-29 15:24:17 -04:00
Eugene
bebe258e2d chainregistry+lnd: moving chainregistry+chainparams to new package 2020-10-29 15:24:14 -04:00
Eugene
4d238cfa2f lnd: export ChainControl, ChainRegistry 2020-10-29 15:20:00 -04:00
Eugene
933b959aa8 chainreg: export ChainCode to new pkg
Moves chainCode from the lnd package to the chainreg package,
where it is exported and can be used by other packages.
2020-10-29 15:19:57 -04:00
carla
c92b030652
multi: remove experimential build flag for assumechanvalid 2020-10-21 14:13:50 +02:00
eugene
e0859e121f multi: add fmgr.Manager interface, change usage in peer to use Manager
This gets rid of several config functions in the peer and should pave
the way for easier testing of the funding manager and peer.
2020-10-01 10:27:13 -04:00
eugene
fada3dd871 server.go + peer: use MessageConn interface instead of brontide.Conn 2020-09-25 12:05:36 -04:00
Wilmer Paulino
a5c5304c09
Merge pull request #4452 from yyforyongyu/add-connection-timeout
lnrpc+tor: add network connection timeout
2020-09-16 12:28:29 -07:00
Joost Jager
3531c3fbbe
Merge pull request #4602 from joostjager/proportional-attempt-cost
routing: proportional attempt cost
2020-09-16 14:12:19 +02:00
yyforyongyu
469aba9282
lnd+rpcserver: allow customized timeout in ConnectPeer 2020-09-16 11:50:04 +08:00
Calvin Zachman
f5fb64e552 add new max channel size config option
- let users specify their MAXIMUM WUMBO with new config option which sets the maximum channel size lnd will accept
- current implementation is a simple check by the fundingManager rather than anything to do with the ChannelAcceptor
- Add test cases which verify that maximum channel limit is respected for wumbo/non-wumbo channels
- use --maxchansize 0 value to distinguish set/unset config. If user sets max value to 0 it will not do anything as 0 is currently used to indicate to the funding manager that the limit should not be enforced. This seems justifiable since --maxchansize=0 doesn't seem to make sense at first glance.
- add integration test case to ensure that config parsing and valiation is proper. I simplified the funding managers check electing to rely on config.go to correctly parse and set up either i) non wumbo default limit of 0.16 BTC OR ii) wumbo default soft limit of 10 BTC

Addresses: https://github.com/lightningnetwork/lnd/issues/4557
2020-09-14 21:16:32 -05:00
Joost Jager
bbfeeec8b1
routing: add proportional attempt cost 2020-09-08 15:47:08 +02:00
Joost Jager
17a6175e8b
routing+routerrpc: rename PaymentAttemptPenalty to AttemptCost
Make field names consistent with the command line flag.
2020-09-08 14:07:56 +02:00
carla
a550ca3d64
multi: store peer flap rate on disk on best effort basis
Since we will use peer flap rate to determine how we rate limit, we
store this value on disk per peer per channel. This allows us to
restart with memory of our peers past behaviour, so we don't give badly
behaving peers have a fresh start on restart. Last flap timestamp is
stored with our flap count so that we can degrade this all time flap
count over time for peers that have not recently flapped.
2020-09-08 13:49:46 +02:00
carla
94accfb69d
chanfitness: pass clock in to chaneventstore for testing 2020-09-08 13:47:15 +02:00
carla
3aa008ab04
multi: add interface for subscribe client so it can be mocked
The current implementation of subscribe is difficult to mock because
the queue that we send updates on in unexported, so you cannot create
a subscribe.Client object and then add your own updates. While it is
possible to run a subscribe server in tests, subscribe servers will
shutdown before dispatching their udpates to all clients, which can be
flakey (and is difficult to workaround). In this commit, we add a
subscription interface so that these testing struggles can be addressed
with a mock.
2020-09-08 13:47:13 +02:00
Conner Fromknecht
5c91be3f57
config+rpcserver: allow configurable defualt-remote-max-htlcs 2020-08-24 20:11:23 -07:00
Conner Fromknecht
ef69537c7f
fundingmanager: add maxHtlcs to openChanReq 2020-08-24 20:08:19 -07:00
carla
5a73029442
multi: add minimum disk space check 2020-08-24 09:38:11 +02:00
carla
c365a16656
healthcheck: monitor access to chain backend
Add a new health check package which will periodically poll health
check functions and shutdown if we do not succeed after our set number
of attempts. The first check that we add is one for our chain backend,
to ensure that we are connected to a bitcoin node.
2020-08-24 09:35:36 +02:00
András Bánki-Horváth
c3821e5ad1
Merge pull request #4493 from bhandras/invoice_gc
invoices: garbage collect settled/canceled invoices
2020-08-24 08:34:58 +02:00
Conner Fromknecht
d04df11c44
Merge pull request #4505 from Crypt-iQ/activeNet_cleanup_0803
lnd: removing activeNetParams global, passed around instead via configs
2020-08-20 12:59:15 -07:00