Commit Graph
100 Commits
Author SHA1 Message Date
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 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 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
Oliver Gugger 2f371556da docs: add PSBT funding tutorial 2020-03-31 10:00:12 +02:00
Oliver Gugger c4f20dada4 lntest: test PSBT channel funding 2020-03-31 10:00:12 +02:00
Oliver Gugger c892227953 lncli: add PSBT to openchannel command
We add a new flag --psbt to the openchannel command which triggers
an interactive conversation between the command line and the user.
2020-03-31 09:17:26 +02:00
Oliver Gugger 8b05d1b61f lncli: move openChannel command to new file
This is a pure code move!
2020-03-31 09:17:25 +02:00
Oliver Gugger 376a747bb2 rpcserver: implement PSBT funding flow
A PSBT funding flow consists of multiple steps. We add new RPC
messages that can trigger the underlying state machine to transition
to a new state. We also add new response messages that tell the
API user what the current state is.
2020-03-31 09:17:24 +02:00
Oliver Gugger 5a52420ab6 lnwallet+fundingmgr: interrupt funding flow for PSBT
In case the funding manager detects that a funding flow is requested
to be executed with the help of a PsbtIntent, the normal channel
negotiation with the remote peer is interrupted, as soon as the
accept_channel message was received. With the remote peer's funding
multisig key and our local key, we can derive the funding output
script and its address. This is enough to start the PSBT funding
and signing process which the user will do externally to the daemon.
2020-03-31 09:17:24 +02:00
Oliver Gugger 126f79dbb1 chanfunding: add PSBT assembler and intent
We add a new funding assembler and intent type that handle channel
funding through the use of a PSBT. The PsbtIntent is in itself a
simple state machine that can be stepped through the process of
assembling the required information for the funding output, verifying
a user supplied PSBT for correctness, accepting a fully signed PSBT
and then assembling the funding wire message.
2020-03-31 09:17:23 +02:00
Oliver Gugger 357f5978ad lnrpc: add new PSBT funding step messages 2020-03-31 09:17:22 +02:00
Oliver Gugger f97339c3e8 mod: add PSBT dependency 2020-03-31 09:17:05 +02:00
Oliver Gugger 4bc7524410 Merge pull request #4112 from guggero/bump-queue
mod: bump version of cert and queue packages
2020-03-24 19:24:36 +01:00
Oliver Gugger 4726c674db Merge pull request #4110 from halseth/itest-abandonchannel-flake
itest: wait for file writing in wait predicate
2020-03-24 15:33:37 +01:00
Oliver Gugger ce7970ec4a mod: bump version of cert package
To fix external projects depending on lind, we need to bump the cert
package to a new version for the changes to be picked up.
2020-03-24 14:58:45 +01:00
Oliver Gugger 45a59345e7 mod: bump version of queue package
To fix external projects depending on lnd, we need to bump the queue
package to a new version for the changes to be picked up.
2020-03-24 14:51:08 +01:00
Oliver Gugger 81730e6444 mod: update btcwallet dependency to fix neutrino flake 2020-03-24 10:01:28 +01:00
Oliver Gugger 770c80635c lntest: give async payments enough time to complete 2020-03-24 10:00:59 +01:00
Oliver Gugger eb531d0449 htlcswitch: add causing error to log and err msg 2020-03-24 10:00:59 +01:00
Oliver Gugger a101c8eeed lntest: fix timing issue with auto reconnect 2020-03-24 10:00:58 +01:00
Oliver Gugger 95a6796778 lnwallet/btcwallet: use fast scrypt options in itest 2020-03-24 09:52:40 +01:00
Oliver Gugger 847d27f8a6 macaroons: use fast scrypt options in itest and unit tests 2020-03-24 09:52:39 +01:00
Oliver Gugger 466294ed4c aezeed: use fast scrypt options in itest 2020-03-24 09:52:39 +01:00
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