Commit Graph
100 Commits
Author SHA1 Message Date
Oliver Gugger 76cd94c277 lntest: make sure restored chans can't be closed 2020-08-12 16:49:39 +02:00
Oliver Gugger 0655a1bcfb itest: move channel backup tests to own file 2020-08-12 16:06:34 +02:00
Oliver Gugger fe834bc0c0 rpcserver: don't allow closing restored channels
To avoid the scenario where the user tries to force close a channel too
early that was restored through SCB, we check the channel status in the
RPC server already. If a restored channel cannot connect to its peer and
mark it as local data loss the channel arbitrator would try to publish
the commitment TX it does not have and crash.
2020-08-12 16:03:35 +02:00
Oliver Gugger af8ffc9764 lntest: add WS test case with custom header macaroon 2020-08-06 12:11:20 +02:00
Oliver Gugger c7cb2c0a78 docs: describe how to use WebSockets with the REST API
We add a new document that shows two examples of how to use the
WebSocket REST API with JavaScript.
2020-08-06 12:09:15 +02:00
Oliver Gugger c5c28564e9 lnrpc: add macaroon workaround for WebSockets in browsers
For security reasons, browsers are limited in the header fields they can
send when opening a WebSocket connection. Specifically, the macaroon
cannot be sent in the Grpc-Metadata-Macaroon header field as that would
be possible for normal REST requests. Instead we only have the special
field "Sec-Websocket-Protocol" that can be used to transport custom
data. We allow the macaroon to be sent there and transform it into a
proper header field for the target request.
2020-08-06 12:07:07 +02:00
Oliver Gugger 97c73706b5 channeldb: fix for Windows clock resolution
We use the event timestamp of a forwarding event as its primary storage
key. On systems with a bad clock resolution this can lead to collisions
of the events if some of the timestamps are identical. We fix this
problem by shifting the timestamps on the nanosecond level until only
unique values remain.
2020-08-05 09:15:03 +02:00
Oliver Gugger b21b2ebd6f lntest: improve fee calculation in multi-hop test 2020-08-05 09:06:32 +02:00
Oliver Gugger a6a7aca8af travis: add itest on Windows
This commit adds an integration test that runs on a Windows virtual
machine on Travis. The tests run inside of a "Git Bash" environment
which supports the same command line syntax as a proper bash but doesn't
have all the tooling installed. Some tools also behave differently on
Windows. Therefore we also have to simplify the command to upload the
logs to termbin and remove the upload to file.io on Windows because both
the find and tar command don't work as expected.
2020-08-05 09:02:42 +02:00
Oliver Gugger 6115a7b12b make+itest: make itest Windows compatible 2020-08-05 08:53:04 +02:00
Oliver Gugger 2f1f8561ae mod: update to latest btcd version 2020-08-05 08:53:04 +02:00
Oliver Gugger 77fc1ac68f travis: add sanity check stage 2020-07-29 10:16:47 +02:00
Oliver Gugger da447233c8 mod: update to latest x/crypto version w/o broken ARM assembly
This update previously happened in 1589810 but was overwritten again by
a later PR. We need to use a version that doesn't include the broken ARM
assembly for poly1305. We might as well use the latest version of the
library.
2020-07-27 14:15:44 +02:00
Oliver Gugger ecca1f9653 itest: fix flakiness around/startup/reconnect 2020-07-27 14:15:36 +02:00
Oliver Gugger 5d5e6c369d travis: add integration test on ARMv7 (32bit) 2020-07-24 09:49:43 +02:00
Oliver Gugger 17b8b7ea0c github+travis: split CI tasks between Travis and GitHub
To free up build in Travis, we decided to run the non-flaky parts of
the CI pipeline in GitHub Workflows/Actions only. The integration tests
on the other hand are removed from GitHub because individual actions
cannot be restarted there which caused us to restart the whole workflow
if one test was flaky.

This split should give us the best of both worlds: Fast run of small
checks, linting and unit tests with an easy overview of what failed in
the PR directly. And more free build slots on Travis to do more advanced
integration tests on other architectures and/or operating systems. And
the option to restart a single flaky integration test on Travis.
2020-07-23 15:06:05 +02:00
Oliver Gugger 8d2a3ce8ac github: add mobile compilation to GitHub workflow 2020-07-23 15:06:04 +02:00
Oliver Gugger 4ec878e1a2 docs: describe batch funding and --no_publish flag 2020-07-09 14:09:12 -07:00
Oliver Gugger 1a57dfc24c itest: do batch PSBT channel open 2020-07-08 22:19:18 -07:00
Oliver Gugger 563e56987b lncli: add --no_publish to PSBT channel opening 2020-07-08 22:19:17 -07:00
Oliver Gugger 56b916a313 lnwallet: don't publish funding TX if flag set on assembler
The first channels of a batch shouldn't publish the batch TX
to avoid problems if some of the funding flows can't be completed.
Only the last channel of a batch should publish. We set the channel flag
accordingly depending on the flag in the assembler.
2020-07-08 17:13:14 -07:00
Oliver Gugger 258996233f lnwallet+rpcserver: add no_publish flag to PSBT assembler 2020-07-08 17:12:57 -07:00
Oliver Gugger 3a818b9735 lnrpc: add no_publish flag to PSBT shim 2020-07-08 17:12:41 -07:00
Oliver Gugger 1cda467701 lnrpc: explain how to use map types in REST 2020-06-17 08:35:52 +02:00
Oliver Gugger e73c9218d7 itest: add REST API tests 2020-06-17 08:35:51 +02:00
Oliver Gugger 6250ed1cf1 lnrpc: add WebSocket proxy 2020-06-17 08:34:54 +02:00
Oliver Gugger be36776120 Merge pull request #4251 from guggero/rest-2-subservers
REST saga 2/3: Add REST endpoints to all RPCs
2020-06-04 10:26:42 +02:00
Oliver Gugger 19e3dc6378 routerrpc: format proto 2020-06-04 08:50:44 +02:00
Oliver Gugger f48b0289f5 make: check that all RPCs are defined in yaml 2020-06-04 08:50:44 +02:00
Oliver Gugger 558d63718b rpcserver+lnrpc: register REST subservers with root server 2020-06-04 08:50:44 +02:00
Oliver Gugger fe16be5bb8 lnrpc: extract or add REST annotations to yaml 2020-06-04 08:50:00 +02:00
Oliver Gugger 3ef41dd198 lnrpc: update grpc-gateway to v1.14.3 2020-06-04 08:43:49 +02:00
Oliver Gugger 75f916b026 log+config: remove global RootLogWriter variable 2020-05-27 09:43:59 +02:00
Oliver Gugger 70772ab99b config+lnd+rpcserver: use log writer from cfg 2020-05-27 09:43:59 +02:00
Oliver Gugger 42ac187932 peer: fix struct alignment
Integers used atomically MUST be aligned properly, otherwise the
sync library will crash on purpose. Therefore non-aligned struct
members must come later.
2020-05-21 11:28:49 +02:00
Oliver Gugger a17ddc5dd1 channeldb+htlcswitch: don't use fastsha256 in tests
The btcsuite/fastsha256 registers itself in the crypto package of
golang as a replacement for sha256. This causes problems in TLS1.3
connections that require the hash implementations to be serializable
and results in the "tls: internal error: failed to clone hash" error.
By removing all uses of the library we fix that error.
2020-05-20 11:07:38 +02:00
Oliver Gugger 3afaed8b5c rpcserver: fix linter error 2020-05-20 09:12:53 +02:00
Oliver Gugger 36b90382d3 lnd+server+keychain: remove unused code 2020-05-20 09:07:21 +02:00
Oliver Gugger 08d6a61e2a signrpc: use DigestSigner interface for signing 2020-05-20 09:06:59 +02:00
Oliver Gugger 4003f25281 signrpc: use ECDH interface for shared key generation 2020-05-20 09:06:58 +02:00
Oliver Gugger f97e7b9951 watchtower: use ECDH interface for watchtower session 2020-05-20 09:06:57 +02:00
Oliver Gugger 535a22c590 server+brontide: use ECDH interface for brontide handshake 2020-05-20 09:06:56 +02:00
Oliver Gugger ee74e4ba86 server+mod: use ECDH interface for sphinx router 2020-05-20 09:05:36 +02:00
Oliver Gugger be890ef9be lnd+server+netann: use signing interface in node signer 2020-05-20 09:05:35 +02:00
Oliver Gugger 6f702a43aa watchtower: extend and rename SecretKeyRing 2020-05-20 09:05:15 +02:00
Oliver Gugger b0cb110e86 watchtower: rename SessionPrivKey to SessionKeyECDH 2020-05-20 09:05:15 +02:00
Oliver Gugger 140731af00 lnd+watchtower: rename NodePrivKey to NodeKeyECDH 2020-05-20 09:05:14 +02:00
Oliver Gugger 7f1b865b53 multi: rename server's identityPriv to identityECDH 2020-05-20 09:05:14 +02:00
Oliver Gugger cf0380ac81 keychain: add single key wrapper implementations 2020-05-20 09:04:05 +02:00
Oliver Gugger 6cf1844b0e keychain: add new interface methods to wallet 2020-05-20 09:04:04 +02:00
Oliver Gugger d6ba0a5b85 keychain: add new abstraction interfaces 2020-05-20 09:04:04 +02:00
Oliver Gugger 4d3bd6f178 Merge pull request #4295 from guggero/fix-queue
mod: update to queue/v1.0.4
2020-05-18 14:51:16 +02:00
Oliver Gugger bd40f73be3 mod: update to queue/v1.0.4 2020-05-18 11:52:49 +02:00
Oliver Gugger 4261d3f5af lnd: remove global cfg variable 2020-05-14 16:18:02 +02:00
Oliver Gugger 50e86f88fe rpcserver+subrpcserver: don't use global cfg 2020-05-14 16:18:02 +02:00
Oliver Gugger 7c1304b31c peer: don't use global cfg 2020-05-14 16:18:02 +02:00
Oliver Gugger 4343f9e9a6 server+rpcserver: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger 7e4d0aba2f lnd+rpcserver: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger 7ce70321ac fundingmgr+server: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger d44f205e3f multi: move global networkDir to cfg 2020-05-14 14:47:35 +02:00
Oliver Gugger 85d5cdfbfd multi: move global registeredChains to cfg 2020-05-14 14:47:35 +02:00
Oliver Gugger a7e78112b7 multi: allow external subservers to register themselves
With two new callbacks we allow processes that use lnd as a library
to register additional gRPC and REST subservers to the main server
instances that lnd creates.
2020-05-14 14:47:33 +02:00
Oliver Gugger 620eaa3199 lnd+cmd: move interrupt into cmd
If the main package is used as a library, we don't want it to
register interrupt signals itself. Rather we want to pass in the
shutdown channel manually. We do this in the cmd now.
2020-05-14 14:37:51 +02:00
Oliver Gugger 7158103d4d lnd+config: move config parsing to cmd
Now that we have access to the configuration parsing outside of the
main package, we can move the actual parsing to the command line
package.
2020-05-14 14:37:51 +02:00
Oliver Gugger 3b2188d689 multi: move exported items to lncfg 2020-05-14 14:37:51 +02:00
Oliver Gugger 25f8a0804d config: fix comment and linter errors 2020-05-14 14:37:50 +02:00
Oliver Gugger 1f3a5ce0d4 config: export CleanAndExpandPath 2020-05-14 14:37:50 +02:00
Oliver Gugger bc3909050e multi: rename and export logWriter as RootLogWriter 2020-05-14 14:37:50 +02:00
Oliver Gugger a56ca0d0cf config: export default values for config file
Variables related to the default configuration file location are
needed if the config parsing is happening externally. We export them
so they don't need to be copied to projects that use lnd as a library.
2020-05-14 14:37:49 +02:00
Oliver Gugger aba29df84d config: extract config validation
To allow external configuration parsing and validation, this commit
exports the function that checks a configuration for sanity.
Also because we touch the code, we need to fix all linter errors.
2020-05-14 14:37:49 +02:00
Oliver Gugger d4d10b5c71 config: extract default config into function
To make it easy to extract the configuration parsing out of the main
package, the default config is exported as its own function.
2020-05-14 14:37:49 +02:00
Oliver Gugger 9ed1cd623f config+lncfg: move config structs to lncfg, drop suffix 2020-05-14 14:37:48 +02:00
Oliver Gugger 409d2c9a90 lnd+config: export config struct and LoadConfig
As a preparation to be moved to the lncfg package, the main struct and
functions related to configuration are exported.
2020-05-14 13:05:01 +02:00
Oliver Gugger e175a64540 github: remove continue-on-error
The continue-on-error was added to make sure the log files of the
failed itests would always be uploaded. But this has the side effect
of marking the whole job successful, even if the itest job itself
failed. The failure condition in the log file steps already solve
that, so the continue-on-error is not needed anymore.
2020-05-12 13:29:51 +02:00
Oliver Gugger b6ab16f02a github: add GitHub Actions configuration 2020-05-11 16:05:21 +02:00
Oliver Gugger ce4591437b docs: link to lnrpc README, remove json_name 2020-05-08 14:34:03 +02:00
Oliver Gugger 272598a706 lnrpc: generate gateway and swagger for all RPCs 2020-05-08 14:33:59 +02:00
Oliver Gugger 71c58c2c04 lnrpc: replace /// and /** with // and /* 2020-05-08 14:33:34 +02:00
Oliver Gugger 0800386138 lnrpc: unify proto style by moving services to top of file 2020-05-08 14:33:04 +02:00
Oliver Gugger acd105fccb lnrpc: split walletunlocker in own file 2020-05-08 14:31:37 +02:00
Oliver Gugger b7ff6ab4ef docs+javascript: add link to API documentation 2020-05-04 10:12:54 +02:00
Oliver Gugger 92abf3ed87 docs+javascript: switch to proto-loader 2020-05-04 10:12:54 +02:00
Oliver Gugger d950b7e4b1 docs+javascript: remove broken macaroon example 2020-05-04 10:12:53 +02:00
Oliver Gugger 192bcc15b7 docs+javascript: uset let and const, fix example formatting 2020-05-04 10:12:49 +02:00
Oliver Gugger af0bfd015a docs+javascript: fix headings 2020-05-04 10:02:26 +02:00
Oliver Gugger 26998e13de docs+python: add link to API documentation 2020-05-04 09:54:50 +02:00
Oliver Gugger d1629e9cf4 docs+python: add build instructions for subserver modules 2020-05-04 09:54:15 +02:00
Oliver Gugger 0bb449c8fe docs+python: fix headings, make numbered list 2020-05-04 09:53:40 +02:00
Oliver Gugger 2c979fc179 Merge pull request #4237 from theStack/20200501-doc-fix-tab-size-in-contrib-guidelines
docs: fix tab size (8 spaces) in contribution guidelines
2020-05-01 21:31:56 +02:00
Oliver Gugger fb17e9b863 docs: add PSBT publish warning 2020-04-26 21:05:24 +02:00
Oliver Gugger d765e73e57 lncli: add PSBT publish warning 2020-04-26 21:05:13 +02:00
Oliver Gugger caf4cb16c4 build+make: move release script
Because this script is now run from the main Makefile, it is more
suitable to be located in the main scripts folder where the other
build related scripts reside.
2020-04-24 14:29:06 +02:00
Oliver Gugger f4901d8ff9 docs: move build/release/README.md to docs/release.md
This readme file is better located in the docs directory as we
are going to move the release script itself as well in the next
commit.
2020-04-24 14:28:27 +02:00
Oliver Gugger 4384319b4a travis: use make command for windows build 2020-04-21 11:28:42 +02:00
Oliver Gugger c08ddad22e build/README: describe how to use make release 2020-04-21 11:28:41 +02:00
Oliver Gugger 317ccb2cc9 make+build: call release script from makefile 2020-04-21 11:28:41 +02:00
Oliver Gugger ce00f52ca2 make: add new release flags 2020-04-21 11:16:39 +02:00
Oliver Gugger 8920e20cf7 cert: define ExtendedKeyUsage as required by macOS 10.15 2020-04-17 09:22:32 +02:00
Oliver Gugger 1e3b0672d7 config+lnd+lncli: add commit back to version string 2020-04-14 15:51:44 +02:00
Oliver Gugger ec5bfd3df7 make: move escaped double quote to fix windows build 2020-04-14 15:51:44 +02:00