multi: Fix typos and grammar in multiple docs

This commit is contained in:
Marcia Waite 2024-07-15 00:59:00 -07:00
parent 71ba355d90
commit e6dca0ce6e
29 changed files with 81 additions and 81 deletions

View File

@ -51,7 +51,7 @@ said, the current status of `lnd`'s BOLT compliance is:
The daemon has been designed to be as developer friendly as possible in order The daemon has been designed to be as developer friendly as possible in order
to facilitate application development on top of `lnd`. Two primary RPC to facilitate application development on top of `lnd`. Two primary RPC
interfaces are exported: an HTTP REST API, and a [gRPC](https://grpc.io/) interfaces are exported: an HTTP REST API, and a [gRPC](https://grpc.io/)
service. The exported API's are not yet stable, so be warned: they may change service. The exported APIs are not yet stable, so be warned: they may change
drastically in the near future. drastically in the near future.
An automatically generated set of documentation for the RPC APIs can be found An automatically generated set of documentation for the RPC APIs can be found

View File

@ -11,7 +11,7 @@ process. A lack of a birthday means that wallets dont know how far
back to look in the chain to ensure that they derive all the proper back to look in the chain to ensure that they derive all the proper
user addresses. Additionally, BIP39 use a very weak [KDF](https://en.wikipedia.org/wiki/Key_derivation_function). We use user addresses. Additionally, BIP39 use a very weak [KDF](https://en.wikipedia.org/wiki/Key_derivation_function). We use
scrypt with modern parameters (n=32768, r=8, p=1). A set of benchmarks has scrypt with modern parameters (n=32768, r=8, p=1). A set of benchmarks has
been added, on my laptop I get about 100ms per attempt): been added, on my laptop I get about 100ms per attempt:
```shell ```shell
$ go test -run=XXX -bench=. $ go test -run=XXX -bench=.
@ -48,13 +48,13 @@ the keys of the wallet.
The 2 byte timestamp is expressed in Bitcoin Days Genesis, meaning that The 2 byte timestamp is expressed in Bitcoin Days Genesis, meaning that
the number of days since the timestamp in Bitcoins genesis block. This the number of days since the timestamp in Bitcoins genesis block. This
allow us to save space, and also avoid using a wasteful level of allows us to save space, and also avoid using a wasteful level of
granularity. This can currently express time up until 2188. granularity. This can currently express time up until 2188.
Finally, the entropy is raw entropy that should be used to derive the Finally, the entropy is raw entropy that should be used to derive the
wallets HD root. wallets HD root.
## aezeed enciphering/deciperhing ## aezeed enciphering/deciphering
Next, well take the plaintext seed described above and encipher it to Next, well take the plaintext seed described above and encipher it to
procure a final cipher text. Well then take this cipher text (the procure a final cipher text. Well then take this cipher text (the

View File

@ -217,7 +217,7 @@ bob $ lncli --network=simnet channelbalance
``` ```
Now we have open channel in which we sent only one payment, let's imagine Now we have open channel in which we sent only one payment, let's imagine
that we sent lots of them and we'd now like to close the channel. Let's do that we sent lots of them, and we'd now like to close the channel. Let's do
it! it!
```shell ```shell
# List the "Alice" channel and retrieve "channel_point" which represents # List the "Alice" channel and retrieve "channel_point" which represents
@ -300,7 +300,7 @@ bitcoins. The schema will be following:
to "Faucet" then the already created "btcd" node would be sufficient. to "Faucet" then the already created "btcd" node would be sufficient.
``` ```
First of all you need to run `btcd` node in `testnet` and wait for it to be First you need to run `btcd` node in `testnet` and wait for it to be
synced with test network (`May the Force and Patience be with you`). synced with test network (`May the Force and Patience be with you`).
```shell ```shell
# Init bitcoin network env variable: # Init bitcoin network env variable:
@ -330,11 +330,11 @@ and send some amount of bitcoins to `Alice`.
### Building standalone docker images ### Building standalone docker images
Instructions on how to build standalone docker images (for development or Instructions on how to build standalone docker images (for development or
production), outside of `docker-compose`, see the production), outside `docker-compose`, see the
[docker docs](../docs/DOCKER.md). [docker docs](../docs/DOCKER.md).
### Using bitcoind version ### Using bitcoind version
If you are using the bitcoind version of the compose file i.e `docker-compose-bitcoind.yml`, follow these additional instructions: If you are using the bitcoind version of the compose file i.e. `docker-compose-bitcoind.yml`, follow these additional instructions:
#### Start Bitcoin Node with bitcoind using Docker Compose #### Start Bitcoin Node with bitcoind using Docker Compose
To launch the Bitcoin node using bitcoind in the regtest network using Docker Compose, use the following command: To launch the Bitcoin node using bitcoind in the regtest network using Docker Compose, use the following command:

View File

@ -3,7 +3,8 @@
There are two flavors of Dockerfiles available: There are two flavors of Dockerfiles available:
- `Dockerfile`: Used for production builds. Checks out the source code from - `Dockerfile`: Used for production builds. Checks out the source code from
GitHub during build. The build argument `--build-arg checkout=v0.x.x-beta` GitHub during build. The build argument `--build-arg checkout=v0.x.x-beta`
can be used to specify what git tag or commit to check out before building. can be used to specify what git tag or commit to `git checkout`
before building.
- `dev.Dockerfile` Used for development or testing builds. Uses the local code - `dev.Dockerfile` Used for development or testing builds. Uses the local code
when building and allows local changes to be tested more easily. when building and allows local changes to be tested more easily.

View File

@ -39,7 +39,7 @@ are released by the team. See
[release.md for more information about reproducible builds](release.md). [release.md for more information about reproducible builds](release.md).
Finally, there is the option to build `lnd` fully manually. This requires more Finally, there is the option to build `lnd` fully manually. This requires more
tooling to be set up first but allows to produce non-production (debug, tooling to be set up first but allows producing non-production (debug,
development) builds. development) builds.
## Installing a binary release ## Installing a binary release
@ -136,7 +136,7 @@ the following commands for your OS:
<details> <details>
<summary>macOS</summary> <summary>macOS</summary>
First, install [Homebrew](https://brew.sh) if you dont already have it. First, install [Homebrew](https://brew.sh) if you don't already have it.
Then Then
@ -205,7 +205,7 @@ make install
The command above will install the current _master_ branch of `lnd`. If you The command above will install the current _master_ branch of `lnd`. If you
wish to install a tagged release of `lnd` (as the master branch can at times be wish to install a tagged release of `lnd` (as the master branch can at times be
unstable), then [visit then release page to locate the latest unstable), then [visit the release page to locate the latest
release](https://github.com/lightningnetwork/lnd/releases). Assuming the name release](https://github.com/lightningnetwork/lnd/releases). Assuming the name
of the release is `v0.x.x`, then you can compile this release from source with of the release is `v0.x.x`, then you can compile this release from source with
a small modification to the above command: a small modification to the above command:
@ -294,7 +294,7 @@ To check that `lnd` was installed properly run the following command:
``` ```
This command requires `bitcoind` (almost any version should do) to be available This command requires `bitcoind` (almost any version should do) to be available
in the system's `$PATH` variable. Otherwise some of the tests will fail. in the system's `$PATH` variable. Otherwise, some tests will fail.
**Command-line completion for `lncli`** **Command-line completion for `lncli`**
@ -308,7 +308,7 @@ time of writing of this document, there are three available chain backends:
`btcd`, `neutrino`, `bitcoind`. All including neutrino can run on mainnet with `btcd`, `neutrino`, `bitcoind`. All including neutrino can run on mainnet with
an out of the box `lnd` instance. We don't require `--txindex` when running an out of the box `lnd` instance. We don't require `--txindex` when running
with `bitcoind` or `btcd` but activating the `txindex` will generally make with `bitcoind` or `btcd` but activating the `txindex` will generally make
`lnd` run faster. Note that since version 0.13 pruned nodes are supported `lnd` run faster. Note that since version 0.13 pruned nodes are supported,
although they cause performance penalty and higher network usage. although they cause performance penalty and higher network usage.
The set of arguments for each of the backend modes is as follows: The set of arguments for each of the backend modes is as follows:
@ -461,7 +461,7 @@ the following:
- Make sure the config setting `-rpcserialversion` in `bitcoind` is either set - Make sure the config setting `-rpcserialversion` in `bitcoind` is either set
to 1 or NOT used because bitcoind's default behaviour is already correct to 1 or NOT used because bitcoind's default behaviour is already correct
(see [bitcoin/issues/28730](https://github.com/bitcoin/bitcoin/issues/28730) (see [bitcoin/issues/28730](https://github.com/bitcoin/bitcoin/issues/28730)
for more infos). Lightning depends on segwit transactions therefore we need for more info). Lightning depends on segwit transactions therefore we need
the witness data when querying the bitcoind backend for transaction details. the witness data when querying the bitcoind backend for transaction details.
- Start `bitcoind` running against testnet, and let it complete a full sync with - Start `bitcoind` running against testnet, and let it complete a full sync with
@ -541,7 +541,7 @@ document](wallet.md).
`lnd`'s authentication system is called **macaroons**, which are decentralized `lnd`'s authentication system is called **macaroons**, which are decentralized
bearer credentials allowing for delegation, attenuation, and other cool bearer credentials allowing for delegation, attenuation, and other cool
features. You can learn more about them in Alex Akselrod's [writeup on features. You can learn more about them in Alex Akselrod's [writeup on
Github](https://github.com/lightningnetwork/lnd/issues/20). GitHub](https://github.com/lightningnetwork/lnd/issues/20).
Running `lncli create` to create a wallet, will by default generate Running `lncli create` to create a wallet, will by default generate
the `admin.macaroon`, `read_only.macaroon`, and `macaroons.db` the `admin.macaroon`, `read_only.macaroon`, and `macaroons.db`
@ -596,7 +596,7 @@ Optionally, if you'd like to have a persistent configuration between `lnd`
launches, allowing you to simply type `lnd --bitcoin.testnet --bitcoin.active` launches, allowing you to simply type `lnd --bitcoin.testnet --bitcoin.active`
at the command line, you can create an `lnd.conf`. at the command line, you can create an `lnd.conf`.
**On MacOS, located at:** **On macOS, located at:**
`/Users/<username>/Library/Application Support/Lnd/lnd.conf` `/Users/<username>/Library/Application Support/Lnd/lnd.conf`
**On Linux, located at:** **On Linux, located at:**

View File

@ -10,7 +10,7 @@ $ make install
``` ```
The command `make check` requires `bitcoind` (almost any version should do) to The command `make check` requires `bitcoind` (almost any version should do) to
be available in the system's `$PATH` variable. Otherwise some of the tests will be available in the system's `$PATH` variable. Otherwise, some tests will
fail. fail.
Developers Developers

View File

@ -56,7 +56,7 @@ not hard requirements as we will gladly accept code contributions as long as
they follow the guidelines set forth on this page. That said, if you don't have they follow the guidelines set forth on this page. That said, if you don't have
the following basic qualifications you will likely find it quite difficult to the following basic qualifications you will likely find it quite difficult to
contribute to the core layers of Lightning. However, there are still a number contribute to the core layers of Lightning. However, there are still a number
of low hanging fruit which can be tackled without having full competency in the of low-hanging fruit which can be tackled without having full competency in the
areas mentioned below. areas mentioned below.
- A reasonable understanding of bitcoin at a high level (see the - A reasonable understanding of bitcoin at a high level (see the
@ -82,7 +82,7 @@ security and performance implications.
it must follow the guidelines therein. it must follow the guidelines therein.
- [Original Satoshi Whitepaper](https://bitcoin.org/bitcoin.pdf) - This is the white paper that started it all. Having a solid - [Original Satoshi Whitepaper](https://bitcoin.org/bitcoin.pdf) - This is the white paper that started it all. Having a solid
foundation to build on will make the code much more comprehensible. foundation to build on will make the code much more comprehensible.
- [Lightning Network Whitepaper](https://lightning.network/lightning-network-paper.pdf) - This is the white paper that kicked off the Layer 2 revolution. Having a good grasp of the concepts of Lightning will make the core logic within the daemon much more comprehensible: Bitcoin Script, off-chain blockchain protocols, payment channels, bi-directional payment channels, relative and absolute time-locks, commitment state revocations, and Segregated Witness. - [Lightning Network Whitepaper](https://lightning.network/lightning-network-paper.pdf) - This is the white paper that kicked off the Layer 2 revolution. Having a good grasp of the concepts of Lightning will make the core logic within the daemon much more comprehensible: Bitcoin Script, off-chain blockchain protocols, payment channels, bidirectional payment channels, relative and absolute time-locks, commitment state revocations, and Segregated Witness.
- The original LN was written for a rather narrow audience, the paper may be a bit unapproachable to many. Thanks to the Bitcoin community, there exist many easily accessible supplemental resources which can help one see how all the pieces fit together from double-spend protection all the way up to commitment state transitions and Hash Time Locked Contracts (HTLCs): - The original LN was written for a rather narrow audience, the paper may be a bit unapproachable to many. Thanks to the Bitcoin community, there exist many easily accessible supplemental resources which can help one see how all the pieces fit together from double-spend protection all the way up to commitment state transitions and Hash Time Locked Contracts (HTLCs):
- [Lightning Network Summary](https://lightning.network/lightning-network-summary.pdf) - [Lightning Network Summary](https://lightning.network/lightning-network-summary.pdf)
- [Understanding the Lightning Network 3-Part series](https://bitcoinmagazine.com/articles/understanding-the-lightning-network-part-building-a-bidirectional-payment-channel-1464710791) - [Understanding the Lightning Network 3-Part series](https://bitcoinmagazine.com/articles/understanding-the-lightning-network-part-building-a-bidirectional-payment-channel-1464710791)
@ -478,7 +478,7 @@ also likely be asked to split the commit into several smaller, and hence more
manageable, commits. manageable, commits.
Keeping the above in mind, most small changes will be reviewed within a few Keeping the above in mind, most small changes will be reviewed within a few
days, while large or far reaching changes may take weeks. This is a good reason days, while large or far-reaching changes may take weeks. This is a good reason
to stick with the [Share Early, Share Often](#share-early-share-often) to stick with the [Share Early, Share Often](#share-early-share-often)
development practice outlined above. development practice outlined above.
@ -552,7 +552,7 @@ also ping them to remind them to re-request review if needed. (default x = 3)
To control the bot, you need to add a comment on the PR starting with To control the bot, you need to add a comment on the PR starting with
`!lightninglabs-deploy` followed by the command. There are 2 control types: `!lightninglabs-deploy` followed by the command. There are 2 control types:
mute/unmute & cadence. Only the latest comment for each control type will be mute/unmute & cadence. Only the latest comment for each control type will be
used. This also means you dont need to keep adding new control comments, just used. This also means you don't need to keep adding new control comments, just
edit the latest comment for that control type. edit the latest comment for that control type.
- `!lightninglabs-deploy mute` will mute the bot on the PR completely. - `!lightninglabs-deploy mute` will mute the bot on the PR completely.

View File

@ -180,8 +180,8 @@ like `require.NoErrorf()`.
### Wrapping long function definitions ### Wrapping long function definitions
If one is forced to wrap lines of function arguments that exceed the 80 If one is forced to wrap lines of function arguments that exceed the
character limit, then indentation must be kept on the following lines. Also, 80-character limit, then indentation must be kept on the following lines. Also,
lines should not end with an open parenthesis if the function definition isn't lines should not end with an open parenthesis if the function definition isn't
finished yet. finished yet.
@ -241,7 +241,7 @@ support the `EditorConfig` scheme (for example GoLand, GitHub, GitLab,
VisualStudio). In addition, specific settings for Visual Studio Code are checked VisualStudio). In addition, specific settings for Visual Studio Code are checked
into the code base as well. into the code base as well.
Other editors (for example Atom, Nodepad++, Vim, Emacs and so on) might install Other editors (for example Atom, Notepad++, Vim, Emacs and so on) might install
a plugin to understand the rules in the `.editorconfig` file. a plugin to understand the rules in the `.editorconfig` file.
In Vim you might want to use `set colorcolumn=80`. In Vim, you might want to use `set colorcolumn=80`.

View File

@ -86,8 +86,8 @@ Tor:
--tor.privatekeypath= The path to the private key of the onion service being created --tor.privatekeypath= The path to the private key of the onion service being created
``` ```
There are a couple things here, so let's dissect them. The `--tor.active` flag There are a couple of things here, so let's dissect them. The `--tor.active`
allows `lnd` to route all outbound and inbound connections through Tor. flag allows `lnd` to route all outbound and inbound connections through Tor.
Outbound connections are possible with the use of the `--tor.socks` and Outbound connections are possible with the use of the `--tor.socks` and
`--tor.dns` arguments. The `--tor.socks` argument should point to the interface `--tor.dns` arguments. The `--tor.socks` argument should point to the interface
@ -160,7 +160,7 @@ authentication methods (arguably, from most to least secure):
In order to listen for inbound connections through Tor, an onion service must be In order to listen for inbound connections through Tor, an onion service must be
created. There are two types of onion services: v2 and v3. v3 onion services created. There are two types of onion services: v2 and v3. v3 onion services
are the latest generation of onion services and they provide a number of are the latest generation of onion services, and they provide a number of
advantages over the legacy v2 onion services. To learn more about these advantages over the legacy v2 onion services. To learn more about these
benefits, see [Intro to Next Gen Onion Services](https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions). benefits, see [Intro to Next Gen Onion Services](https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions).

View File

@ -2,7 +2,7 @@
With the recent introduction of the `kvdb` interface LND can support multiple With the recent introduction of the `kvdb` interface LND can support multiple
database backends allowing experimentation with the storage model as well as database backends allowing experimentation with the storage model as well as
improving robustness through eg. replicating essential data. improving robustness through e.g. replicating essential data.
Building on `kvdb` in v0.11.0 we're adding experimental [etcd](https://etcd.io) Building on `kvdb` in v0.11.0 we're adding experimental [etcd](https://etcd.io)
support to LND. As this is an unstable feature heavily in development, it still support to LND. As this is an unstable feature heavily in development, it still
@ -21,7 +21,7 @@ $ make tags="kvdb_etcd"
The important tag is the `kvdb_etcd`, without which the binary is built without The important tag is the `kvdb_etcd`, without which the binary is built without
the etcd driver. the etcd driver.
For development it is advised to set the `GOFLAGS` environment variable to For development, it is advised to set the `GOFLAGS` environment variable to
`"-tags=test"` otherwise `gopls` won't work on code in `channeldb/kvdb/etcd` `"-tags=test"` otherwise `gopls` won't work on code in `channeldb/kvdb/etcd`
directory. directory.

View File

@ -9,7 +9,7 @@ It is recommended that processes be set to the number of processor cores in the
```shell ```shell
$ make fuzz pkg=lnwire fuzztime=1m parallel=4 $ make fuzz pkg=lnwire fuzztime=1m parallel=4
``` ```
Alternatively, individual fuzz tests can be ran manually by setting the working directory to the location of the .go file holding the fuzz tests. Alternatively, individual fuzz tests can be run manually by setting the working directory to the location of the .go file holding the fuzz tests.
The go test command can only test one fuzz test at a time: The go test command can only test one fuzz test at a time:
```shell ```shell
$ cd lnwire $ cd lnwire
@ -21,7 +21,7 @@ $ cd lnwire
$ go test -list=Fuzz.* $ go test -list=Fuzz.*
``` ```
Fuzz tests can be ran as normal tests, which only runs the seed corpus: Fuzz tests can be run as normal tests, which only runs the seed corpus:
```shell ```shell
$ cd lnwire $ cd lnwire
$ go test -run=FuzzAcceptChannel -parallel=4 $ go test -run=FuzzAcceptChannel -parallel=4

View File

@ -9,7 +9,7 @@ account path (`m/purpose'/coin_type'/account'`) or at the address index path
the `WalletKit` APIs. the `WalletKit` APIs.
Note that in order to follow the rest of this document and/or use the Note that in order to follow the rest of this document and/or use the
`WalletKit` APIs, users will need to obtain a `lnd` build compiled with the `WalletKit` APIs, users will need to obtain an `lnd` build compiled with the
`walletrpc` tag. Our release builds already include this tag by default, so this `walletrpc` tag. Our release builds already include this tag by default, so this
would only be necessary when compiling from source. would only be necessary when compiling from source.

View File

@ -136,7 +136,7 @@ To avoid leaking the macaroon information, `lnd` supports the so called
before the `changepassword` command still remain valid. If a user wants to before the `changepassword` command still remain valid. If a user wants to
invalidate all previously created macaroons, the `--new_mac_root_key` flag invalidate all previously created macaroons, the `--new_mac_root_key` flag
of the `changepassword` command should be used! of the `changepassword` command should be used!
* An user of `lncli` will see the returned admin macaroon printed to the screen * A user of `lncli` will see the returned admin macaroon printed to the screen
or saved to a file if the parameter `--save_to=some_file.macaroon` is used. or saved to a file if the parameter `--save_to=some_file.macaroon` is used.
* **Important:** By default, `lnd` will create the macaroon files during the * **Important:** By default, `lnd` will create the macaroon files during the
`unlock` phase, if the `--stateless_init` flag is not used. So to avoid `unlock` phase, if the `--stateless_init` flag is not used. So to avoid

View File

@ -17,7 +17,7 @@ $ make install
## Configuring Postgres for LND ## Configuring Postgres for LND
In order for LND to run on Postgres, an empty database should already exist. A In order for LND to run on Postgres, an empty database should already exist. A
database can be created via the usual ways (psql, pgadmin, etc). A user with database can be created via the usual ways (psql, pgadmin, etc.). A user with
access to this database is also required. access to this database is also required.
Creation of a schema and the tables is handled by LND automatically. Creation of a schema and the tables is handled by LND automatically.

View File

@ -129,7 +129,7 @@ $ bitcoin-cli decodepsbt cHNidP8BAHECAAAAAeJQY2VLRtutKgQYFUajEKpjFfl0Uyrm6x23Ou
Let's now look at how we can implement manual coin selection by using the `fund` Let's now look at how we can implement manual coin selection by using the `fund`
command. We again want to send half a coin to command. We again want to send half a coin to
`bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re` but we want to select our inputs `bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re`, but we want to select our inputs
manually. manually.
The first step is to look at all available UTXOs and choose. To do so, we use The first step is to look at all available UTXOs and choose. To do so, we use
@ -183,7 +183,7 @@ $ lncli wallet psbt fund --outputs='{"bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz
} }
``` ```
Inspecting this PSBT, we notice that the two inputs were chosen and a large Inspecting this PSBT, we notice that the two inputs were chosen, and a large
change output was added at index 1: change output was added at index 1:
```shell ```shell
@ -319,7 +319,7 @@ outputs are used to fund a channel. See
This is a step-by-step guide on how to open a channel with `lnd` by using a PSBT This is a step-by-step guide on how to open a channel with `lnd` by using a PSBT
as the funding transaction. as the funding transaction.
We will use `bitcoind` to create and sign the transaction just to keep the We will use `bitcoind` to create and sign the transaction just to keep the
example simple. Of course any other PSBT compatible wallet could be used and the example simple. Of course any other PSBT compatible wallet could be used, and the
process would likely be spread out over multiple signing steps. The goal of this process would likely be spread out over multiple signing steps. The goal of this
example is not to cover each and every possible edge case but to help users of example is not to cover each and every possible edge case but to help users of
`lnd` understand what inputs the `lncli` utility expects. `lnd` understand what inputs the `lncli` utility expects.

View File

@ -193,7 +193,7 @@ rescan.
### Forced In-Place Rescan ### Forced In-Place Rescan
The recovery methods described above assume a clean slate for a node, so The recovery methods described above assume a clean slate for a node, so
there's no existing UTXO or key data in the node's database. However, there're there's no existing UTXO or key data in the node's database. However, there are
times when an _existing_ node may want to _manually_ rescan the chain. We have times when an _existing_ node may want to _manually_ rescan the chain. We have
a command line flag for that! Just start `lnd` and add the following flag: a command line flag for that! Just start `lnd` and add the following flag:
```shell ```shell
@ -249,7 +249,7 @@ There are multiple ways of obtaining SCBs from `lnd`. The most commonly used
method will likely be via the `channel.backup` file that's stored on-disk method will likely be via the `channel.backup` file that's stored on-disk
alongside the rest of the chain data. This is a special file that contains SCB alongside the rest of the chain data. This is a special file that contains SCB
entries for _all_ currently open channels. Each time a channel is opened or entries for _all_ currently open channels. Each time a channel is opened or
closed, this file is updated on disk in a safe manner (atomic file rename). As closed, this file is updated on disk safely (atomic file rename). As
a result, unlike the `channel.db` file, it's _always_ safe to copy this file a result, unlike the `channel.db` file, it's _always_ safe to copy this file
for backup at ones desired location. The default location on Linux is: for backup at ones desired location. The default location on Linux is:
`~/.lnd/data/chain/bitcoin/mainnet/channel.backup` `~/.lnd/data/chain/bitcoin/mainnet/channel.backup`

View File

@ -226,7 +226,7 @@ documentation](../psbt.md#use-the-batchopenchannel-rpc-for-safe-batch-channel-fu
discussion](https://github.com/lightningnetwork/lnd/pull/4685#discussion_r503080709)). discussion](https://github.com/lightningnetwork/lnd/pull/4685#discussion_r503080709)).
This synchronization check is put back now as we want to make the integration This synchronization check is put back now as we want to make the integration
test more robust in catching real world situations. This also means it might test more robust in catching real world situations. This also means it might
take longer to start a `lnd` node when running in `simnet` or `regtest`, take longer to start an `lnd` node when running in `simnet` or `regtest`,
something developers need to watch out from this release. something developers need to watch out from this release.
### Remote signing ### Remote signing

View File

@ -10,7 +10,7 @@ utilize a work around needed until `go1.13.2`.
## Building a New Release ## Building a New Release
### MacOS ### macOS
The first requirement is to have [`docker`](https://www.docker.com/) The first requirement is to have [`docker`](https://www.docker.com/)
installed locally and running. The second requirement is to have `make` installed locally and running. The second requirement is to have `make`

View File

@ -93,7 +93,7 @@ That `accounts-signer.json` file has to be copied to the machine on which
"watch-only" will be running. It contains the extended public keys for all of "watch-only" will be running. It contains the extended public keys for all of
`lnd`'s accounts (see [required accounts](#required-accounts)). `lnd`'s accounts (see [required accounts](#required-accounts)).
A custom macaroon can be baked for the watch-only node so it only gets the A custom macaroon can be baked for the watch-only node, so it only gets the
minimum required permissions on the signer instance: minimum required permissions on the signer instance:
```shell ```shell

View File

@ -17,7 +17,7 @@ what header fields are allowed to be sent. Therefore, the macaroon cannot just
be added as a `Grpc-Metadata-Macaroon` header field as it would work with normal be added as a `Grpc-Metadata-Macaroon` header field as it would work with normal
REST calls. The browser will just ignore that header field and not send it. REST calls. The browser will just ignore that header field and not send it.
Instead we have added a workaround in `lnd`'s WebSocket proxy that allows Instead, we have added a workaround in `lnd`'s WebSocket proxy that allows
sending the macaroon as a WebSocket "protocol": sending the macaroon as a WebSocket "protocol":
```javascript ```javascript
@ -101,12 +101,12 @@ ws.on('message', function(body) {
## Request-streaming RPCs ## Request-streaming RPCs
Starting with `lnd v0.13.0-beta` all RPCs can be used through REST, even those Starting with `lnd v0.13.0-beta` all RPCs can be used through REST, even those
that are fully bi-directional (e.g. the client can also send multiple request that are fully bidirectional (e.g. the client can also send multiple request
messages to the stream). messages to the stream).
**Example**: **Example**:
As an example we show how one can use the bi-directional channel acceptor RPC. As an example we show how one can use the bidirectional channel acceptor RPC.
Through that RPC each incoming channel open request (another peer opening a Through that RPC each incoming channel open request (another peer opening a
channel to our node) will be passed in for inspection. We can decide channel to our node) will be passed in for inspection. We can decide
programmatically whether to accept or reject the channel. programmatically whether to accept or reject the channel.

View File

@ -29,7 +29,7 @@
This chapter describes the security/safety mechanisms that are implemented in This chapter describes the security/safety mechanisms that are implemented in
`lnd`. We encourage every person that is planning on putting mainnet funds into `lnd`. We encourage every person that is planning on putting mainnet funds into
a Lightning Network channel using `lnd` to read this guide carefully. a Lightning Network channel using `lnd` to read this guide carefully.
As of this writing, `lnd` is still in beta and it is considered `#reckless` to As of this writing, `lnd` is still in beta, and it is considered `#reckless` to
put any life altering amounts of BTC into the network. put any life altering amounts of BTC into the network.
That said, we constantly put in a lot of effort to make `lnd` safer to use and That said, we constantly put in a lot of effort to make `lnd` safer to use and
more secure. We will update this documentation with each safety mechanism that more secure. We will update this documentation with each safety mechanism that
@ -77,7 +77,7 @@ But the node will need to be restored using the
### TLS ### TLS
By default the two API connections `lnd` offers (gRPC on port 10009 and REST on By default, the two API connections `lnd` offers (gRPC on port 10009 and REST on
port 8080) use TLS with a self-signed certificate for transport level security. port 8080) use TLS with a self-signed certificate for transport level security.
Specifying the certificate on the client side (for example `lncli`) is only a Specifying the certificate on the client side (for example `lncli`) is only a
protection against man-in-the-middle attacks and does not provide any protection against man-in-the-middle attacks and does not provide any
@ -211,14 +211,14 @@ line, it is hashed and only the hash (or to be more exact, the BIP32 extended
root key) is stored in the `wallet.db` file. root key) is stored in the `wallet.db` file.
There is There is
[a tool being worked on](https://github.com/lightningnetwork/lnd/pull/2373) [a tool being worked on](https://github.com/lightningnetwork/lnd/pull/2373)
that can extract the BIP32 extended root key but currently you cannot restore that can extract the BIP32 extended root key, but currently you cannot restore
lnd with only this root key. lnd with only this root key.
Important to know: Important to know:
* Setting a password/passphrase for the aezeed is meant to protect it from * Setting a password/passphrase for the aezeed is meant to protect it from
an attacker that finds the paper/storage device. Writing down the password an attacker that finds the paper/storage device. Writing down the password
alongside the 24 seed words does not enhance the security in any way. alongside the 24 seed words does not enhance the security in any way.
Therefore the password should be stored in a separate place. Therefore, the password should be stored in a separate place.
### File based backups ### File based backups
@ -231,7 +231,7 @@ those risks.
The single most important file that needs to be backed up whenever it changes The single most important file that needs to be backed up whenever it changes
is the `<lnddir>/data/chain/bitcoin/mainnet/channel.backup` file which holds is the `<lnddir>/data/chain/bitcoin/mainnet/channel.backup` file which holds
the Static Channel Backups (SCBs). This file is only updated every time `lnd` the Static Channel Backups (SCBs). This file is only updated every time `lnd`
starts, a channel is opened or a channel is closed. starts, a channel is opened, or a channel is closed.
Most consumer Lightning wallet apps upload the file to the cloud automatically. Most consumer Lightning wallet apps upload the file to the cloud automatically.
@ -295,10 +295,9 @@ online.
Funds that are in such channels are at great risk, as is described quite Funds that are in such channels are at great risk, as is described quite
dramatically in dramatically in
[this article](https://medium.com/@gcomxx/get-rid-of-those-zombie-channels-1267d5a2a708?) [this article](https://medium.com/@gcomxx/get-rid-of-those-zombie-channels-1267d5a2a708?).
.
The TL;DR of the article is that if you have funds in a zombie channel and you The TL;DR of the article is that if you have funds in a zombie channel, and you
need to recover your node after a failure, SCBs won't be able to recover those need to recover your node after a failure, SCBs won't be able to recover those
funds. Because SCB restore funds. Because SCB restore
[relies on the remote node cooperating](#static-channel-backups-scbs). [relies on the remote node cooperating](#static-channel-backups-scbs).
@ -328,7 +327,7 @@ fallback way to do it.
This option works very well if the new device runs the same operating system on This option works very well if the new device runs the same operating system on
the same (or at least very similar) architecture. If that is the case, the whole the same (or at least very similar) architecture. If that is the case, the whole
`/home/<user>/.lnd` directory in Linux (or `/home/<user>/.lnd` directory in Linux (or
`$HOME/Library/Application Support/lnd` in MacOS, `%LOCALAPPDATA%\lnd` in `$HOME/Library/Application Support/lnd` in macOS, `%LOCALAPPDATA%\lnd` in
Windows) can be moved to the new device and `lnd` started there. It is important Windows) can be moved to the new device and `lnd` started there. It is important
to shut down `lnd` on the old device before moving the directory! to shut down `lnd` on the old device before moving the directory!
**Not supported/untested** is moving the data directory between different **Not supported/untested** is moving the data directory between different
@ -428,11 +427,11 @@ The following (non-exhaustive) list of things can lead to data corruption:
architectures. architectures.
To avoid most of these factors, it is recommended to store `lnd`'s main data To avoid most of these factors, it is recommended to store `lnd`'s main data
directory on an Solid State Drive (SSD) of a reliable manufacturer. directory on a Solid State Drive (SSD) of a reliable manufacturer.
An alternative or extension to that is to use a replicated disk setup. Making An alternative or extension to that is to use a replicated disk setup. Making
sure a power failure does not interrupt the node by running a UPS ( sure a power failure does not interrupt the node by running a UPS
uninterruptible power supply) might also make sense depending on the reliability (uninterruptible power supply) might also make sense depending on the
of the local power grid and the amount of funds at stake. reliability of the local power grid and the amount of funds at stake.
### Don't interrupt `lncli` commands ### Don't interrupt `lncli` commands

View File

@ -115,7 +115,7 @@ of some sort. It will also only work on Unix like file systems that support
named pipes. named pipes.
We will use the password manager [`pass`](https://www.passwordstore.org/) as an We will use the password manager [`pass`](https://www.passwordstore.org/) as an
example here but it should work similarly with other password managers. example here, but it should work similarly with other password managers.
- Start `lnd` without the flag: - Start `lnd` without the flag:
```shell ```shell
@ -179,7 +179,7 @@ There is a way to get rid of the need to unlock the wallet password: The
Using that flag with **real funds (mainnet) is extremely risky for two reasons**: Using that flag with **real funds (mainnet) is extremely risky for two reasons**:
1. On first startup a wallet is created automatically. The seed phrase (the 24 1. On first startup a wallet is created automatically. The seed phrase (the 24
words needed to restore a wallet) is never shown to the user. Therefore if words needed to restore a wallet) is never shown to the user. Therefore, if
the worst thing happens and the hard disk crashes or the wallet file is the worst thing happens and the hard disk crashes or the wallet file is
deleted by accident, **THERE IS NO WAY OF GETTING THE FUNDS BACK**. deleted by accident, **THERE IS NO WAY OF GETTING THE FUNDS BACK**.
2. In addition to the seed not being known to the user, the wallet database is 2. In addition to the seed not being known to the user, the wallet database is

View File

@ -175,7 +175,7 @@ With the addition of the `lncli wtclient` command, users are now able to
interact with the watchtower client directly to obtain/modify information about interact with the watchtower client directly to obtain/modify information about
the set of registered watchtowers. the set of registered watchtowers.
As as example, with the `lncli wtclient tower` command, you can obtain the As an example, with the `lncli wtclient tower` command, you can obtain the
number of sessions currently negotiated with the watchtower added above and number of sessions currently negotiated with the watchtower added above and
determine whether it is currently being used for backups through the determine whether it is currently being used for backups through the
`active_session_candidate` value. `active_session_candidate` value.

View File

@ -84,10 +84,10 @@ Standby nodes are `HarnessNode`s created when initializing the integration test
and stay alive across all the test cases. Creating a new node is not without a and stay alive across all the test cases. Creating a new node is not without a
cost. With block height increasing, it takes significantly longer to initialize cost. With block height increasing, it takes significantly longer to initialize
a new node and wait for it to be synced. Standby nodes, however, dont have a new node and wait for it to be synced. Standby nodes, however, dont have
this problem as they are digesting blocks all the time. Thus its encouraged to this problem as they are digesting blocks all the time. Thus, its encouraged to
use standby nodes wherever possible. use standby nodes wherever possible.
Currently there are two standby nodes, Alice and Bob. Their internal states are Currently, there are two standby nodes, Alice and Bob. Their internal states are
recorded and taken into account when `HarnessTest` makes assertions. When recorded and taken into account when `HarnessTest` makes assertions. When
making a new test case using `Subtest`, theres a cleanup function which making a new test case using `Subtest`, theres a cleanup function which
further validates the current test case has no dangling uncleaned states, such further validates the current test case has no dangling uncleaned states, such

View File

@ -225,7 +225,7 @@ implementation project(":lndmobile", { "default" })
In LND v0.15+ all API methods have prefixed the generated methods with the subserver name. This is required to support subservers with name conflicts. In LND v0.15+ all API methods have prefixed the generated methods with the subserver name. This is required to support subservers with name conflicts.
eg. `QueryScores` is now `AutopilotQueryScores`. `GetBlockHeader` is now `NeutrinoKitGetBlockHeader`. e.g. `QueryScores` is now `AutopilotQueryScores`. `GetBlockHeader` is now `NeutrinoKitGetBlockHeader`.
## API docs ## API docs

View File

@ -21,7 +21,7 @@ or the specified budget has been used up.
There are two questions when spending a UTXO - how much fees to pay and what There are two questions when spending a UTXO - how much fees to pay and what
the confirmation target is, which gives us the concepts of budget and deadline. the confirmation target is, which gives us the concepts of budget and deadline.
This is especially important when sweeping the outputs of a force close This is especially important when sweeping the outputs of a force close
transaction - some of the outputs are time-sensitive, and may result in fund transaction - some outputs are time-sensitive, and may result in fund
loss if not confirmed in time. On the other hand, we dont want to pay more loss if not confirmed in time. On the other hand, we dont want to pay more
than what we can get back - if a sweeping transaction spends more than what is than what we can get back - if a sweeping transaction spends more than what is
meant to be swept, we are losing money due to fees. meant to be swept, we are losing money due to fees.
@ -80,7 +80,7 @@ flowchart LR
`UtxoAggregator` is an interface that handles the batching of inputs. `UtxoAggregator` is an interface that handles the batching of inputs.
`BudgetAggregator` implements this interface by grouping inputs with the same `BudgetAggregator` implements this interface by grouping inputs with the same
deadline together. Inputs with the same deadline express the same time deadline together. Inputs with the same deadline express the same time
sensitivity so it makes sense to sweep them in the same transaction. Once sensitivity, so it makes sense to sweep them in the same transaction. Once
grouped, inputs in each batch are sorted based on their budgets. The only grouped, inputs in each batch are sorted based on their budgets. The only
exception is inputs with the `ExclusiveGroup` flag set, which will be swept exception is inputs with the `ExclusiveGroup` flag set, which will be swept
alone. alone.