Skip to content

Commit

Permalink
Merge pull request #673 from lightninglabs/docs-lnd
Browse files Browse the repository at this point in the history
Update lnd documentation
  • Loading branch information
github-actions[bot] committed Jul 24, 2024
2 parents ff41abc + 0451047 commit ccb8a2d
Show file tree
Hide file tree
Showing 22 changed files with 69 additions and 64 deletions.
5 changes: 3 additions & 2 deletions docs/lnd/DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
There are two flavors of Dockerfiles available:
- `Dockerfile`: Used for production builds. Checks out the source code from
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
when building and allows local changes to be tested more easily.

Expand Down Expand Up @@ -32,7 +33,7 @@ You first need to build the `lnd` docker image:
$ docker build --tag=myrepository/lnd --build-arg checkout=v0.14.1-beta .
```

It is recommended that you checkout the latest released tag.
It is recommended that you check out the latest released tag.

You can continue by creating and running the container:

Expand Down
16 changes: 8 additions & 8 deletions docs/lnd/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ are released by the team. See
[release.md for more information about reproducible builds](release.md).

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.

## Installing a binary release
Expand Down Expand Up @@ -136,7 +136,7 @@ the following commands for your OS:
<details>
<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

Expand Down Expand Up @@ -205,7 +205,7 @@ make install

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
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
of the release is `v0.x.x`, then you can compile this release from source with
a small modification to the above command:
Expand Down Expand Up @@ -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
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`**

Expand All @@ -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
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
`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.

The set of arguments for each of the backend modes is as follows:
Expand Down Expand Up @@ -461,7 +461,7 @@ the following:
- Make sure the config setting `-rpcserialversion` in `bitcoind` is either set
to 1 or NOT used because bitcoind's default behaviour is already correct
(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.

- Start `bitcoind` running against testnet, and let it complete a full sync with
Expand Down Expand Up @@ -541,7 +541,7 @@ document](wallet.md).
`lnd`'s authentication system is called **macaroons**, which are decentralized
bearer credentials allowing for delegation, attenuation, and other cool
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
the `admin.macaroon`, `read_only.macaroon`, and `macaroons.db`
Expand Down Expand Up @@ -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`
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`

**On Linux, located at:**
Expand Down
2 changes: 1 addition & 1 deletion docs/lnd/MAKEFILE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $ make install
```

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.

Developers
Expand Down
12 changes: 6 additions & 6 deletions docs/lnd/code_contribution_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
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.

- A reasonable understanding of bitcoin at a high level (see the
Expand All @@ -82,7 +82,7 @@ security and performance implications.
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
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):
- [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)
Expand All @@ -101,7 +101,7 @@ be recommended for newcomers to read first in order to get up to speed.
# Development Practices

Developers are expected to work in their own trees and submit pull requests when
they feel their feature or bug fix is ready for integration into the master
they feel their feature or bug fix is ready for integration into the master
branch.

## Share Early, Share Often
Expand Down Expand Up @@ -478,7 +478,7 @@ also likely be asked to split the commit into several smaller, and hence more
manageable, commits.
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)
development practice outlined above.
Expand Down Expand Up @@ -506,7 +506,7 @@ make the necessary changes.
During the process of responding to review comments, we prefer that changes be
made with [fixup commits](https://robots.thoughtbot.com/autosquashing-git-commits).
The reason for this is two fold: it makes it easier for the reviewer to see
The reason for this is twofold: it makes it easier for the reviewer to see
what changes have been made between versions (since Github doesn't easily show
prior versions like Critique) and it makes it easier on the PR author as they
can set it to auto squash the fix up commits on rebase.
Expand Down Expand Up @@ -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
`!lightninglabs-deploy` followed by the command. There are 2 control types:
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.
- `!lightninglabs-deploy mute` will mute the bot on the PR completely.
Expand Down
8 changes: 4 additions & 4 deletions docs/lnd/code_formatting_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ like `require.NoErrorf()`.

### Wrapping long function definitions

If one is forced to wrap lines of function arguments that exceed the 80
character limit, then indentation must be kept on the following lines. Also,
If one is forced to wrap lines of function arguments that exceed the
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
finished yet.

Expand Down Expand Up @@ -241,7 +241,7 @@ support the `EditorConfig` scheme (for example GoLand, GitHub, GitLab,
VisualStudio). In addition, specific settings for Visual Studio Code are checked
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.
In Vim you might want to use `set colorcolumn=80`.
In Vim, you might want to use `set colorcolumn=80`.
8 changes: 4 additions & 4 deletions docs/lnd/configuring_tor.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Tor:
--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
allows `lnd` to route all outbound and inbound connections through Tor.
There are a couple of things here, so let's dissect them. The `--tor.active`
flag allows `lnd` to route all outbound and inbound connections through Tor.
Outbound connections are possible with the use of the `--tor.socks` and
`--tor.dns` arguments. The `--tor.socks` argument should point to the interface
Expand Down Expand Up @@ -125,7 +125,7 @@ disabled to prevent inadvertent leaks.
## Tor Stream Isolation

Our support for Tor also has an additional privacy enhancing modified: stream
isolation. Usage of this mode means that Tor will always use _new circuit_ for
isolation. Usage of this mode means that Tor will always use _new circuit_ for
each connection. This added features means that it's harder to correlate
connections. As otherwise, several applications using Tor might share the same
circuit.
Expand Down Expand Up @@ -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
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
benefits, see [Intro to Next Gen Onion Services](https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions).

Expand Down
4 changes: 2 additions & 2 deletions docs/lnd/etcd.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

With the recent introduction of the `kvdb` interface LND can support multiple
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)
support to LND. As this is an unstable feature heavily in development, it still
Expand All @@ -21,7 +21,7 @@ $ make tags="kvdb_etcd"
The important tag is the `kvdb_etcd`, without which the binary is built without
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`
directory.

Expand Down
4 changes: 2 additions & 2 deletions docs/lnd/fuzz.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is recommended that processes be set to the number of processor cores in the
```shell
$ 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:
```shell
$ cd lnwire
Expand All @@ -21,7 +21,7 @@ $ cd lnwire
$ 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
$ cd lnwire
$ go test -run=FuzzAcceptChannel -parallel=4
Expand Down
2 changes: 1 addition & 1 deletion docs/lnd/grpc/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following dependencies are required.
</dependency>
</dependencies>
```
In the build section, we'll need to configure the following things :
In the build section, we'll need to configure the following things:
```xml
<build>
<extensions>
Expand Down
2 changes: 1 addition & 1 deletion docs/lnd/key_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ account path (`m/purpose'/coin_type'/account'`) or at the address index path
the `WalletKit` APIs.

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
would only be necessary when compiling from source.

Expand Down
2 changes: 1 addition & 1 deletion docs/lnd/macaroons.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
invalidate all previously created macaroons, the `--new_mac_root_key` flag
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.
* **Important:** By default, `lnd` will create the macaroon files during the
`unlock` phase, if the `--stateless_init` flag is not used. So to avoid
Expand Down
2 changes: 1 addition & 1 deletion docs/lnd/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ make install
## Configuring Postgres for LND

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.

Creation of a schema and the tables is handled by LND automatically.
Expand Down
6 changes: 3 additions & 3 deletions docs/lnd/psbt.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ $ bitcoin-cli decodepsbt cHNidP8BAHECAAAAAeJQY2VLRtutKgQYFUajEKpjFfl0Uyrm6x23Ou

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
`bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re` but we want to select our inputs
`bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re`, but we want to select our inputs
manually.

The first step is to look at all available UTXOs and choose. To do so, we use
Expand Down Expand Up @@ -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:

```shell
Expand Down Expand Up @@ -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
as the funding transaction.
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
example is not to cover each and every possible edge case but to help users of
`lnd` understand what inputs the `lncli` utility expects.
Expand Down
8 changes: 4 additions & 4 deletions docs/lnd/recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ rescan.
### Forced In-Place Rescan

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
a command line flag for that! Just start `lnd` and add the following flag:
```shell
Expand Down Expand Up @@ -231,7 +231,7 @@ knows if they have the latest state of a channel or not. Instead, we aim to
provide a simple, safe method to allow users to recover the settled funds in
their channels in the case of partial or complete data loss. The backups
themselves are encrypted using a key derived from the user's seed, this way we
protect privacy of the users channels in the back up state, and ensure that a
protect privacy of the users channels in the backup state, and ensure that a
random node can't attempt to import another user's channels.

Given a valid SCB, the user will be able to recover funds that are fully
Expand All @@ -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
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
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
for backup at ones desired location. The default location on Linux is:
`~/.lnd/data/chain/bitcoin/mainnet/channel.backup`
Expand Down Expand Up @@ -280,7 +280,7 @@ $ lncli --network=simnet exportchanbackup --all
$ lncli --network=simnet exportchanbackup --all --output_file=channel.backup
```

As shown above, a user can either: specify a specific channel to backup, backup
As shown above, a user can either: specify a specific channel to back up, backup
all existing channels, or backup directly to an on-disk file. All backups use
the same format.

Expand Down
2 changes: 1 addition & 1 deletion docs/lnd/release-notes/release-notes-0.14.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
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
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.

### Remote signing
Expand Down
5 changes: 5 additions & 0 deletions docs/lnd/release-notes/release-notes-0.18.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@

## Tooling and Documentation

* [`lntest.HarnessTest` no longer exposes `Miner`
instance](https://github.com/lightningnetwork/lnd/pull/8892). Instead, it's
changed into a private `miner` instance and all mining related assertions are
now only accessible via the harness.

# Contributors (Alphabetical Order)

* Andras Banki-Horvath
Expand Down
Loading

0 comments on commit ccb8a2d

Please sign in to comment.