Commit Graph
100 Commits
Author SHA1 Message Date
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 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
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