Commit Graph
94 Commits
Author SHA1 Message Date
Oliver Gugger 8a9b7595b7 Merge pull request #4094 from guggero/btcd-docker
docker: pin down btcd version
2020-03-18 10:05:21 +01:00
Oliver Gugger f5f0b2107b docker: pin down btcd version
There was a recent change merged into btcd that isn't backward
compatible with older RPC clients. To make sure our docker quick
start example still works, we need to pin down btcd to the version
that is still compatible with lnd.
2020-03-18 08:54:48 +01:00
Oliver Gugger 7917d22daf Makefile: don't format proto
There are different versions of clang-format being installed on
different versions of ubuntu that apparently produce different
results when formatting the proto files. This is likely too much
of a hurdle for new contributors to also manually install the
correct version of a command line tool just to format stuff.
2020-03-11 10:17:45 +01:00
Oliver Gugger f55860ccd8 lncli: fix windows compilation 2020-03-11 10:07:43 +01:00
Oliver Gugger 3b8dd4bd63 travis: cross-compile windows 2020-03-11 09:12:52 +01:00
Oliver Gugger 0a9dc6aeb2 Merge pull request #4042 from guggero/travis-rpc
travis: format, compile and verify protos
2020-03-11 09:04:21 +01:00
Oliver Gugger 59875b6ec4 github: add proto formatting to pull request template 2020-03-10 20:19:21 +01:00
Oliver Gugger 10e247540f watchtowerrpc: fix typo 2020-03-10 20:19:21 +01:00
Oliver Gugger 1e1b68accf lnrpc: update README to describe new commands 2020-03-10 20:19:20 +01:00
Oliver Gugger fdcb30e57f lnrpc: run clang-format 2020-03-10 20:19:08 +01:00
Oliver Gugger ed8924c6c5 lncli: allow unlock with password from stdin 2020-03-10 14:29:45 +01:00
Oliver Gugger 9aff896b10 lnrpc+rpcserver+lncli: rename RPC fields to previous JSON name 2020-03-07 11:24:13 +01:00
Oliver Gugger 3a5348ea8b wtclientrpc: format wtclient.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:09 +01:00
Oliver Gugger ad0fba548f watchtowerrpc: format watchtower.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:09 +01:00
Oliver Gugger 54fede0ae9 walletrpc: format walletkit.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:08 +01:00
Oliver Gugger 5a35ffa395 signrpc: format signer.proto 2020-03-07 11:23:08 +01:00
Oliver Gugger 1b543f0d50 routerrpc: format router.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:07 +01:00
Oliver Gugger 5a6fea31d9 invoicesrpc: format invoices.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:07 +01:00
Oliver Gugger 23f5472cd3 chainrpc: format chainnotifier.proto 2020-03-07 11:23:06 +01:00
Oliver Gugger bcfe92cee1 autopilotrpc: format autopilot.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:06 +01:00
Oliver Gugger b99a457dd0 lnrpc: format rpc.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:06 +01:00
Oliver Gugger e435cd5fc6 lncli: use original snake_case names for JSON serializing
Because we now use printRespJSON everywhere where we print RPC
responses as JSON, we can simply instruct the jsonpb marshaler to
use the original snake_case name specified in the proto file for
the JSON field names and not the default camelCase.
2020-03-07 11:22:36 +01:00
Oliver Gugger 165769ea82 lncli: use printRespJSON for probability response 2020-03-07 11:22:35 +01:00
Oliver Gugger 092a0b4a0a Merge pull request #4053 from turcane/master
sample-lnd.conf: remove deprecated wtclient option
2020-03-06 09:02:22 +01:00
Oliver Gugger ab024b98ee rpcserver+itest: remove channel from backup when abandoning it 2020-03-04 10:58:50 +01:00
Oliver Gugger 4e0c276154 rpcserver: don't skip pending channels in backup subscription
The synchronous call to get all channel backups also include
channels that are pending at the moment of the call. A previous
commit added pending channels to the file based backup as well. So
this is the last backup method that needs to be adjusted to also
contain unconfirmed channels.
2020-03-04 10:58:49 +01:00
Oliver Gugger 8a2c02f8ea itest: test unconfirmed channel backup file 2020-03-04 10:58:49 +01:00
Oliver Gugger d8c62c37a8 channel_notifier: update backup on pending chan
To fix the discrepancy between getting the channel backups via
RPC where all pending channels are included, we also update the
channel.backup file on disk whenever we get a pending channel
event notification.
2020-03-04 10:58:49 +01:00
Oliver Gugger ac28b2c692 travis: remove git clone depth limitation to fix linter
By default, Travis-CI does `git clone --depth=50` which limits the
repo to the last 50 commits. Because we do linting against an old
commit, it cannot be found any more. We remove the limit completely
to not run into this problem again.
2020-02-20 20:59:25 +01:00
Oliver Gugger 182835d504 fundingmgr+channelnotifier: add channel config to pending chan ntfn
To be able to write a new channel backup file for pending channels,
we need to include the channel configuration in the pending channel
notification event.
2020-02-14 10:04:26 +01:00
Oliver Gugger c8b7108eeb rpcserver: instruct REST marshaler to emit default values
This change instructs the REST proxy server to overwrite its default
JSON marshaler settings. That allows us to set EmitDefaults to true
which will result in all JSON fields returned in REST responses to
be fully populated, even if their values are falsey.
2020-01-27 15:40:39 +01:00
Oliver Gugger 548f42f6e7 doc: add Operational Safety Guidelines document 2020-01-27 11:40:04 +01:00
Oliver Gugger 3f45fb3781 walletunlocker: use fast scrypt options for unit tests 2020-01-24 14:02:40 +01:00
Oliver Gugger 29ece5fe24 keychain: use fast scrypt options for unit tests 2020-01-24 14:02:40 +01:00
Oliver Gugger 1cb52491a3 mod: update btcwallet dependency 2020-01-24 14:02:39 +01:00
Oliver Gugger 0ce2d6f523 Merge pull request #2699 from yancyribbens/docker-compose-up
docker-compose up
2020-01-10 09:56:21 +01:00
Oliver Gugger 4f98642b5e signrpc: derive custom shared key
With this commit we add the ability to create a shared DH key by using
a custom node private key instead of the node's identity private key.
If no key locator is specified the node's identity private key will be
used as a fallback.
2020-01-06 14:53:32 +01:00
Oliver Gugger ae1f7348f0 lntest: fix macaroon paths
This change makes sure that all macaroons are stored in the same
folder. This makes it possible to use the lntest package in external
projects that use loop's lndclient library which currently assumes
that the admin macaroon and subserver macaroons are in the same sub
folder of lnd's data directory.
2020-01-03 09:19:18 +01:00
Oliver Gugger ce711a1de7 lntest: specify lnd binary
Integration tests in external projects might not have the same folder
structure as lnd does. Therefore we want to allow the path to the
lnd itest binary to be configurable.
2020-01-03 09:17:23 +01:00
Oliver Gugger b762d441cf lntest: expose configuration of harness node
When using the lntest package for itests in external projects, it
is necessary to access a harness node's configuration, for example
to get its data directory on disk. This commit exports that
configuration.
2020-01-03 09:13:29 +01:00
Oliver Gugger 33e8077181 signrpc: add DeriveSharedKey 2019-12-20 09:25:52 +01:00
Oliver Gugger 95226771ed signrpc+rpcserver: add signer macaroon permissions 2019-12-11 22:37:40 +01:00
Oliver Gugger 9a73b9be78 signrpc: sign and verify messages with custom key
To allow signing of messages with any key in the key chain
we add two new methods to the signer RPC. These behave differently
to the methods with the same name in the main RPC as described
in the documentation comment.
2019-12-11 22:37:39 +01:00
Oliver Gugger d47f67d260 signrpc+subserver: add key chain to signer 2019-12-10 09:48:13 +01:00
Oliver Gugger a124bb24da lntest: add unconfirmed channel SCB test 2019-11-28 08:59:38 +01:00
Oliver Gugger fb683f74a4 chanbackup: set funding broadcast height on restore 2019-11-26 14:45:22 +01:00
Oliver Gugger d4f836ecb3 chanbackup: encode broadcast height in chan ID for unconfirmed channels 2019-11-26 14:45:21 +01:00
Oliver Gugger 570275435b lntest: add SCB repeated restore test 2019-11-20 10:57:20 +01:00
Oliver Gugger 4cd06465ea lnd: increase max message receive size for REST proxy 2019-11-18 14:06:14 +01:00
Oliver Gugger 4728ac844a chanbackup: continue recovery if channel already exists 2019-11-18 10:51:23 +01:00
Oliver Gugger 6a807b2d4c mod: use tagged version of cert package 2019-11-18 09:51:30 +01:00
Oliver Gugger b145378a4d cert: create independent go modules 2019-11-18 09:44:55 +01:00
Oliver Gugger dbbb169e06 lnd: use TLS code from cert package 2019-11-18 09:44:54 +01:00
Oliver Gugger 7470f696ae cmd/lncli: increase gRPC max message receive size to 200MiB 2019-11-15 16:21:20 +01:00
Oliver Gugger 543b258e30 lnd_test: add integration test for macaroon authentication 2019-11-14 16:34:52 +01:00
Oliver Gugger b18698c321 cert: copy common TLS code from lnd to cert package 2019-11-14 10:23:40 +01:00
Oliver Gugger bfe10376f3 lnd: prepare TLS code for extraction 2019-11-14 10:23:35 +01:00
Oliver Gugger e8df2757ae lntest: allow client to connect with specific macaroon 2019-11-13 15:29:00 +01:00
Oliver Gugger 7e9c4f0f87 proto: deprecate duplicate string fields in requests
With this PR we deprecate fields that have been specifically added to
to work around a bug in the gRPC/REST gateway that didn't allow bytes
fields to be encoded in REST requests.
That bug has now been fixed so the fields are no longer required.
To make it more clear how bytes fields have to be used in REST,
comments have been added to all those fields.
2019-11-07 08:53:00 +01:00
Oliver Gugger 2b163480cf docs: bitcoind is required for unit tests 2019-11-06 09:47:48 +01:00
Oliver Gugger ae04bdb98a doc: describe macaroon bakery 2019-11-04 15:07:24 +01:00
Oliver Gugger b6c7ff8183 lnrpc: generate protos with new gateway version 2019-10-31 09:13:38 +01:00
Oliver Gugger b6b57d1c00 proto: update to grpc-gateway v1.8.6 2019-10-31 09:13:33 +01:00
Oliver Gugger 1270a8ebae lncli: add command for baking new macaroons 2019-10-24 10:25:38 +02:00
Oliver Gugger 6a463de7a2 lnrpc: add command for baking new macaroons 2019-10-24 10:25:32 +02:00
Oliver Gugger 05096b0c2d input+sweep: log input witness types instead of CSV/CLTV count 2019-10-23 17:09:31 +02:00
Oliver Gugger c66c4052ec lnrpc: document missing ForwardingHistory command 2019-10-23 13:28:04 +02:00
Oliver Gugger fa948c23fe chainntnfs: add test that validates fixed nil pointer dereference 2019-10-23 11:25:30 +02:00
Oliver Gugger 51c066e7ed chainntnfs: don't register notifications twice if details exist 2019-10-23 11:19:25 +02:00
Oliver Gugger fb0051a318 input+sweep: rework witness type into an interface 2019-10-14 15:32:54 +02:00
Oliver Gugger 8e4a897a60 sweep: use chain notifier instead of chain IO for best block
Because the BestBlock method of ChainIO is not exposed through any
RPC we want to get rid of it so we can use the sweeper outside of
lnd too. Since the chain notifier now also delivers the current best
block we don't need the BestBlock method any more.
2019-10-14 15:32:54 +02:00
Oliver Gugger b6dda143d0 sweep: use bbolt DB directly instead of channeldb 2019-10-14 15:32:53 +02:00
Oliver Gugger 4190146066 sweep: add test to make sure fee estimation is correct 2019-10-14 15:32:53 +02:00
Oliver Gugger 3ca2c363fe lnd+rpcserver: initialize new log writer correctly 2019-10-14 14:56:32 +02:00
Oliver Gugger 94f49192cf lnd: refactor sub logger setup to use new rotating log writer 2019-10-14 14:56:31 +02:00
Oliver Gugger d3995a73ae build: move log rotator code 2019-10-14 14:56:31 +02:00
Oliver Gugger 3ea74c4362 build: move log level parse code and add new leveled sub logger interface 2019-10-14 14:56:30 +02:00
Oliver Gugger c01f9f043d lnd: pin go version to 1.12 in go.mod 2019-09-24 09:18:21 +02:00
Oliver Gugger 976c996fda queue: run go mod tidy 2019-09-23 15:11:20 +02:00
Oliver Gugger 567c357c61 ticker+queue: run go mod tidy 2019-07-26 09:29:38 +02:00
Oliver Gugger 3704c0e149 keychain: fix comment about derivation path 2019-07-22 21:52:36 +02:00
Oliver Gugger 10b976187d rpcserver: handle unconfirmed TX properly when listing all transactions 2018-09-15 11:29:32 +02:00
Oliver Gugger c943f02c32 Merge branch 'master' into unix-sockets 2018-06-26 09:35:55 +02:00
Oliver Gugger 4d521da1a3 Merge branch 'master' into unix-sockets 2018-06-19 11:27:24 +02:00
Oliver Gugger f22b0ccdbc macaroons: fix incorrect comparison in isRegistered, wrap long lines 2018-05-18 10:14:06 +02:00
Oliver Gugger 3eff9804ee macaroons: add technical documentation, fix comments 2018-05-18 10:13:25 +02:00
Oliver Gugger 8e4e2bd889 macaroons: add tests for service and constraints 2018-05-18 10:08:05 +02:00
Oliver Gugger 45ccace41c docs: add line wrap to contribution checklist 2018-05-07 19:21:03 +03:00
Oliver Gugger 8ce73b3f74 lncli: improve error message for unlock commands 2018-05-07 18:44:03 +03:00
Oliver Gugger 80852601db lncli: group startup commands, make full sentences 2018-05-03 11:49:09 +03:00
Oliver Gugger ad106bcefd lncli: group commands into categories 2018-05-02 08:55:55 +03:00
Oliver Gugger b75429c6fe test: upload integration test logs from TravisCI to file.io 2018-05-01 13:16:21 +03:00
Oliver Gugger cbd981c236 lnd_test: make sure node ID is correctly initialized in log file name 2018-04-30 11:59:34 +03:00
Oliver Gugger 578f1d9332 lnd_test: give nodes a name and print that name in log file name 2018-04-28 17:46:50 +03:00