lnd v0.9.1-beta.rc1

This marks the first minor release in the `v0.9.0` series. As this is a minor release, no major features are included in this release, but a number of important bug fixes are present. These bug fixes should eliminate the current known instance of erroneous force closes between nodes, optimize invoice expiry for larger nodes, and fix some accounting issues related to estimating the correct amount of available balance when forwarding. # Verifying the Release In order to verify the release, you'll need to have `gpg` or `gpg2` installed on your system. Once you've obtained a copy (and hopefully verified that as well), you'll first need to import the keys that have signed this release if you haven't done so already: ``` curl https://keybase.io/roasbeef/pgp_keys.asc | gpg --import ``` Once you have the required PGP keys, you can verify the release (assuming `manifest-v0.9.1-beta.rc1.txt` and `manifest-v0.9.1-beta.rc1.txt.sig` are in the current directory) with: ``` gpg --verify manifest-v0.9.1-beta.rc1.txt.sig ``` You should see the following if the verification was successful: ``` gpg: assuming signed data in 'manifest-v0.9.1-beta.rc1.txt' gpg: Signature made Thu Feb 20 20:38:37 2020 PST gpg: using RSA key 4AB7F8DA6FAEBB3B70B1F903BC13F65E2DC84465 gpg: Good signature from "Olaoluwa Osuntokun " [ultimate] ``` That will verify the signature of the manifest file, which ensures integrity and authenticity of the archive you've downloaded locally containing the binaries. Next, depending on your operating system, you should then re-compute the `sha256` hash of the archive with `shasum -a 256 `, compare it with the corresponding one in the manifest file, and ensure they match *exactly*. ## Verifying the Release Binaries Our release binaries are fully reproducible. Third parties are able to verify that the release binaries were produced properly without having to trust the release manager(s). See our [reproducible builds guide](https://github.com/lightningnetwork/lnd/tree/master/build/release) for how this can be achieved. The release binaries are compiled with `go1.13.7`, which is required by verifiers to arrive at the same ones. They include the following build tags: `autopilotrpc`, `signrpc`, `walletrpc`, `chainrpc`, `invoicesrpc`, `routerrpc`, and `watchtowerrpc`. Note that these are already included in the release script, so they do not need to be provided. Finally, you can also verify the _tag_ itself with the following command: ``` git verify-tag v0.9.0-beta ``` # Building the Contained Release Users are able to rebuild the target release themselves without having to fetch any of the dependencies. In order to do so, assuming that `vendor.tar.gz` and `lnd-source-v0.9.1-beta.rc1.tar.gz` are in the current directory, follow these steps: ``` tar -xvzf vendor.tar.gz tar -xvzf lnd-source-v0.9.1-beta.rc1.tar.gz GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.9.1-beta" ./cmd/lnd GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.9.1-beta" ./cmd/lncli ``` The `-mod=vendor` flag tells the `go build` command that it doesn't need to fetch the dependencies, and instead, they're all enclosed in the local vendor directory. Additionally, it's now possible to use the [enclosed `release.sh` script to bundle a release for a _specific_ system like so](https://github.com/lightningnetwork/lnd/pull/2191): ``` LNDBUILDSYS="linux-arm64 darwin-amd64" ./build/release/release.sh ``` ⚡️⚡️⚡️ OK, now to the rest of the release notes! ⚡️⚡️⚡️ # Release Notes ## RPC Configuration [A new flag (`--tlsautorefresh`) has been added to instruct `lnd` to _re-generate_ TLS certs](https://github.com/lightningnetwork/lnd/pull/3932) if the certs on disk differ from the specified configuration options. An example would be if you add a new TLS domain, but the certs on disk only have `localhost` as a valid domain for the cert. [We've updated a config on our end to ensure all default values are ALWAYS emitted when using the REST interface](https://github.com/lightningnetwork/lnd/pull/3965). As an example, if the field `"f"` wasn't set, rather than omitting it in our response, we'll emit: `"f": false"`. ## Peer to Peer Gossip [We'll now send blank response if a peer sends us a request for channels](https://github.com/lightningnetwork/lnd/pull/3925) on a different chain than we advertise. ## Invoice Handling [A bug has been fixed that would result in a deadlock with the invoice managing sub-system on a rare occasion](https://github.com/lightningnetwork/lnd/pull/3980). [Batch invoice expiry has been optimized for larger nodes](https://github.com/lightningnetwork/lnd/pull/3950). Before this change, very large nodes (10s of thousands of invoices) may have witnessed very slow start up if they just upgraded to this new version, or had a large number of invoices expire while they were offline. ## Wallet [A bug has been fixed in the wallet](https://github.com/lightningnetwork/lnd/pull/4017) where rescans would include more addresses that actually necessary. This would result in slower times to readiness for larger nodes, and also trigger an increased amount of false positives for neutrinos nodes. ## Channel State Machine [A number of accounting related fixes have been made to the channel state machine](https://github.com/lightningnetwork/lnd/pull/3691). With these fixes, we'll now more accurately estimate the types of HTLCs that the commitment transaction can carry, properly factoring in things like the added cost of an HTLC, the reserve, and asymmetric dust values across commitments. User affected by this bug might've seen weird retry loops when path finding due to not properly recoding the "available balance" in one's commitment transaction. This bug fixes also preps us for payment splitting, as balance will run lower as we're able to utilize multiple channels to make a single payment. [We now perform _stricter_ accounting w.r.t the maximum number of HTLCs allowed in a single commitment transaction](https://github.com/lightningnetwork/lnd/pull/3910). [A series of fixes in our unit tests will now properly exercise expected behavior between other implementations](https://github.com/lightningnetwork/lnd/pull/3998). [A bug that would at times causes a de-sync that would lead to an inadvertent force close between `lnd` nodes, and also other implementations](https://github.com/lightningnetwork/lnd/pull/3872). ## On-Chain Contract Handling [A new config option has been added to allow mobile clients to give their connected parties a chance to settle/fail an HTLC before we go to chain](https://github.com/lightningnetwork/lnd/pull/3876). This new config option takes the form of `--payments-expiration-grace-period=T`, where `T` is a "duration" (1s, 5s, 5m, 5h, etc). Developers deploying `lnd` for mobile applications may want to set this value as they see fit, if their users are reporting frequent channel force closes due to intermittent connectivity. ## Changelog The full list of changes since `v0.9.0-beta` can be found here: * https://github.com/lightningnetwork/lnd/compare/v0.9.0-beta...v0.9.1-beta.rc1 # Contributors (Alphabetical Order) Andras Banki-Horvath Eugene Seigel Johan T. Halseth Joost Jager Olaoluwa Osuntokun Oliver Gugger Roei Erez Wilmer Paulino