Commit Graph

11026 Commits

Author SHA1 Message Date
Oliver Gugger
9bd8784ae8
GitHub: run cross compilation for all architectures
Because we now have conditionally compiled code that depends on the
architecture it is built for, we want to make sure we can build all
architectures that we also release. Since GitHub builds are very fast,
we can easily do this instead of only compiling for certain select
architectures.
2020-11-13 10:19:51 +01:00
Oliver Gugger
32ee527f6b
server+htlcswitch: auto compact sphinx DB too 2020-11-13 10:19:51 +01:00
Oliver Gugger
a8ef4fc158
channeldb: store and evaluate last compaction time 2020-11-13 10:19:51 +01:00
Oliver Gugger
505be0d8bc
channeldb: implement compaction
This commit adds the compaction feature of the bbolt compact to our bolt
backend. This will try to open the DB in read-only mode and create a
compacted copy in a temporary file. Once the compaction was successful,
the temporary file and the old source file are swapped atomically.
2020-11-13 10:19:50 +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
f8907fdb47
multi: add AutoCompact option to bolt backend
With this commit we thread the new AutoCompact flags all the way through
to the bolt backend.
2020-11-13 10:19:49 +01:00
Oliver Gugger
6131a53eb4
lncfg+channeldb: add autocompact flags to BoltConfig 2020-11-13 10:19:49 +01:00
Oliver Gugger
08042405c7
server: allow overwriting of DNS seeds 2020-11-13 10:07:03 +01:00
Oliver Gugger
1548528a3f
lncfg+sample-lnd.conf: add DNS seed flag to chain cfg 2020-11-13 09:49:18 +01:00
carla
697dbf7f3a
contractcourt: get arbitrator state before we start each arbitrator 2020-11-12 15:32:15 +02:00
carla
f1404af475
contractcourt: pass in optional txns to lookups required for arb startup
To allow us to grab all of the information we need for our channel arbs
in a more efficient way on startup, we add an optional tx to our lookup
functions required on start.
2020-11-12 15:25:35 +02:00
carla
89fe21b79a
contractcourt: use single block subscription for block epochs 2020-11-12 15:23:24 +02:00
Johan T. Halseth
3f9a707531
Merge pull request #4737 from bhandras/itest_clean_state
itest: clean harness state before each icase and better naming for icase logs
2020-11-12 13:03:22 +01:00
Andras Banki-Horvath
38e8184926
itest: update error log whitelist 2020-11-12 09:17:53 +01:00
Andras Banki-Horvath
9eac0dd3c9
itest: fix crash in parallel macaroon tests 2020-11-12 09:17:52 +01:00
Andras Banki-Horvath
979c8497b2
itest: add icase to node log filename + restart nodes before each icase
This commit adds the icase name to the log filename, to make it simpler
to find problematic tests. Additionally after this commit we'll restart
Alice and Bob (the base harness nodes) before each icase to start with a
clean state.
2020-11-12 09:17:52 +01:00
Andras Banki-Horvath
d6c2ee1bbf
itest: use require.NoError in TestLightningNetworkDaemon 2020-11-12 09:17:47 +01:00
Oliver Gugger
c7eea13f95
Merge pull request #4763 from carlaKC/fix-build
lnd: return missing shutdown parameter
2020-11-12 08:16:38 +00:00
carla
61777c41e4
lnd: return missing shutdown parameter 2020-11-12 09:12:32 +02:00
Olaoluwa Osuntokun
99b0913562
Merge pull request #3672 from breez/invoice-hints
Allow user specify routing hints in private invoice.
2020-11-11 19:57:49 -08:00
Olaoluwa Osuntokun
c2bba7ed71
Merge pull request #4691 from joostjager/sendtoroute-status-code
routerrpc: map errors to grpc status code
2020-11-11 19:51:45 -08:00
Olaoluwa Osuntokun
58f72df94a
Merge pull request #4715 from guggero/reset-wallet
Implement btcwallet's "dropwtxmgr" command as --reset-wallet-transactions flag
2020-11-11 19:50:21 -08:00
Olaoluwa Osuntokun
3825b9e463
feature: flip static remote key from optional to required
It's been sometime since we introduced this new safety enhancing feature
bit. At this point, we're now moving to require it as it makes our SCB
recovery system more robust, and it's also an implicit feature bit for
for anchor commitments as they're defined now.
2020-11-11 19:45:37 -08:00
Olaoluwa Osuntokun
05592ad3ba
Merge pull request #4755 from carlaKC/4669-nonlockedcall
multi: use bitcoind uptime api for healthcheck
2020-11-11 17:47:51 -08:00
Olaoluwa Osuntokun
9042a79db2
Merge pull request #4683 from carlaKC/4471-acceptorupfrontshutdown
channelacceptor: add new fields to acceptor response
2020-11-11 17:43:52 -08:00
Conner Fromknecht
b9f031b3e3
Merge pull request #4746 from wpaulino/tower-last-addr
watchtower: prevent removal of last tower addr
2020-11-11 09:27:54 -08:00
Johan T. Halseth
fac355c5a0
Merge pull request #4756 from guggero/itest-flakehunt
itest: add parallel flakehunter
2020-11-11 12:57:33 +01:00
Johan T. Halseth
b525c04432
Merge pull request #4648 from halseth/option-no-tls
RPC: add --no-rest-tls option
2020-11-11 11:52:23 +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
Johan T. Halseth
b529d42929
sample-config: add no-rest-tls 2020-11-11 09:41:23 +01:00
Johan T. Halseth
4d0537d4c3
config: enforce safe use of TLS 2020-11-11 09:37:53 +01:00
Johan T. Halseth
5be7e710c7
RPC: Add --notls to disable TLS for RPC endpoints
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2020-11-11 09:37:52 +01:00
Johan T. Halseth
a2a924e1e5
rpcserver: move TLS listen config to closure 2020-11-11 09:37:52 +01:00
Olaoluwa Osuntokun
36556cb772
Merge pull request #4753 from C-Otto/master
README: remove stray [
2020-11-10 17:41:13 -08:00
carla
5679dde1bc
multi: add channel open parameters to channel acceptor
Add more fields to channel acceptor response so that users can have more
fine grained control over their incoming channels. With our chained
acceptor, it is possible that we get inconsistent responses from
multiple chained acceptors. We create a conjugate repsponse from all the
set fields in our various responses, but fail if we get different, non-
zero responses from our various acceptors. Separate merge functions are
used per type so that we avoid unexpected outcomes comparing interfaces
(panic on comparing types that aren't comparable), with casting used
where applicable to avoid code duplication.
2020-11-10 21:09:10 +02:00
Johan T. Halseth
428ca37301
Merge pull request #2018 from halseth/peer-remove-failed-chans
Mark channels borked in case of remote error
2020-11-10 18:50:47 +01:00
Oliver Gugger
f51f247a1c
docs: describe new itest make commands 2020-11-10 13:57:31 +01:00
Oliver Gugger
47e8882480
make+itest: allow the same test to be run in parallel 2020-11-10 13:57:31 +01:00
carla
0d35ce7561
mutli: move parse upfront shutdown out of rpcserver 2020-11-10 11:40:52 +02:00
carla
38fd7d206f
multi: add custom error messages to channel acceptor
This commit adds an optional error message to the channel acceptor's
reponse to allow operators to inform (or insult) unsuccessful channel
initiators as to the reason for their rejection.

This field is added in addition to the existing accept field to maintain
backwards compatibity. If we were to deprecate accept and interpret a
non-nil error as rejecting the channel, then received a response with
accept=false and a nil error, the server cannot tell whether this is a
legacy rejection or new mesage type acceptance (due to nil error),
so we keep both fields.
2020-11-10 11:38:47 +02:00
carla
54c3e98b40
multi: move channel acceptor logic out of rpcserver
This commit moves and partially refactors the channel acceptor logic
added in c2a6c86e into the channel acceptor package. This allows us to
use the same logic in our unit tests as the rpcserver, rather than
needing to replicate it in unit tests.

Two changes are made to the existing implementation:
- Rather than having the Accept function run a closure, the closure
  originally used in the rpcserver is moved directly into Accept
- The done channel used to signal client exit is moved into the acceptor
  because the rpc server does not need knowledge of this detail (in
  addition to other fields required for mocking the actual rpc).

Crediting orginal committer as co-author:
Co-authored-by: Crypt-iQ
2020-11-10 11:38:45 +02:00
Olaoluwa Osuntokun
339a9d3915
Merge pull request #4754 from carlaKC/chainreg-uselogger
chainreg: register logger
2020-11-09 11:48:51 -08:00
carla
5668b335d3
chainreg: register logger 2020-11-09 14:11:31 +02:00
Carsten Otto
9b28925da2 README: remove stray [ 2020-11-08 13:43:24 +00:00
Oliver Gugger
72cacb9c5e
Merge pull request #1288 from guggero/stateless-init
walletunlocker+lnd: add command line flag to allow passing admin macaroon after wallet creation
2020-11-07 12:39:04 +00:00
Graham Krizek
5aa0d26251
lnrpc+macaroon: skip subserver macaroons on stateless_init
This will prevent the subservers from writing macaroons to disk
when the stateless_init flag is set to true. It accomplishes
this by storing the StatelessInit value in the Macaroon Service.
2020-11-07 11:24:35 +01:00
Oliver Gugger
0b9b7def15
docs: describe stateless wallet initialization 2020-11-07 11:24:35 +01:00
Oliver Gugger
24adf475ce
lnd_test: add integration tests for stateless init 2020-11-07 11:24:35 +01:00
Oliver Gugger
e7aa9256ab
walletunlocker+lnd: implement stateless wallet initialization 2020-11-07 11:24:34 +01:00
Oliver Gugger
4b0b20c98b
walletunlocker: use require library, fix linter issues
To prepare for new tests to be added, we first rewrite the existing
tests to use the require library and get rid of some smaller linter
issues.
2020-11-07 11:24:34 +01:00