Skip to content

@Roasbeef Roasbeef released this Jul 30, 2019 · 111 commits to master since this release

This marks the first minor release in the v0.7.0 series. There are no database migration in this release. Instead, this release contains a number of optimization, bug fixes, slight RPC interface tweaks, and some minor features.

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.7.1-beta.txt and manifest-v0.7.1-beta.txt.sig are in the current directory) with:

gpg --verify manifest-v0.7.1-beta.txt.sig

You should see the following if the verification was successful:

gpg: assuming signed data in 'manifest-v0.7.1-beta.txt'
gpg: Signature made Thu Jul 25 16:56:33 2019 PDT
gpg:                using RSA key F8037E70C12C7A263C032508CE58F7F8E20FD9A2
gpg: Good signature from "Olaoluwa Osuntokun <laolu32@gmail.com>" [ultimate]

That will verify the signature on the main manifest page which ensures integrity and authenticity of the binaries you've downloaded locally. Next, depending on your operating system you should then re-calculate the sha256 sum of the binary, and compare that with the following hashes (which are included in the manifest file):

e4e347076f924c0b9800ca6ebe534ddc3994054df129ad55e14590a958a17825  lnd-darwin-386-v0.7.1-beta.tar.gz
bd2ce2df54d08df4e2c48ec26954946a1e05e2385efce2d40fbe952b20e237f3  lnd-darwin-amd64-v0.7.1-beta.tar.gz
f2e3b6a7bc4b1725fa81c6795919aad39c363cdb18763974a2691934f13809d4  lnd-dragonfly-amd64-v0.7.1-beta.tar.gz
57021bdab4693b16c7bc5afcbcde4ed31edebb1e0f4a4b1fa327d337f4001bd0  lnd-freebsd-386-v0.7.1-beta.tar.gz
95d263659a39e891986b121924c6c701218a390ecb04fb6898466b2f3da844af  lnd-freebsd-amd64-v0.7.1-beta.tar.gz
6c16d14d5514093ff9495c5ad56ccd2fea1585a38ed8ee078d75ce9838d4c8f7  lnd-freebsd-arm-v0.7.1-beta.tar.gz
273c21b7a6900ca91f3f09a9d8753cb0c0a549d8ac81fdc3748c1292141b5133  lnd-linux-386-v0.7.1-beta.tar.gz
8a7dcf0cdb1c3dda1f9936625f74644ee0b58940970f2025935590952be8d7ba  lnd-linux-amd64-v0.7.1-beta.tar.gz
755c505c48af1531f784cbff1fa62424c7831698433889680fd2f6030fc15f76  lnd-linux-arm64-v0.7.1-beta.tar.gz
afd3384adaf1adf7545ae7c47cf274532b5cda8cab547c2cc6fc65d21a52d231  lnd-linux-armv6-v0.7.1-beta.tar.gz
a8c5199fdad4a900ce2dc70d9de08e303235e796bf960d1a07f803f837c086da  lnd-linux-armv7-v0.7.1-beta.tar.gz
f657f914bc9a5fd4ebaa65ee4e94fac03e8b03fe59e193972e1038b4b9399388  lnd-linux-mips64-v0.7.1-beta.tar.gz
e1d7133e27be8507381357f3478f1aadcb4d328e446a1981e3f2427739fc2bb1  lnd-linux-mips64le-v0.7.1-beta.tar.gz
b7b43f4bce9738d28d60b79f57778fb14b6180eeed9f3f731a3b7bd4169834cf  lnd-linux-ppc64-v0.7.1-beta.tar.gz
366516b68d9e49775429ecd6c1971a2940c4c3e84421f59966342b45a44c5cf4  lnd-netbsd-386-v0.7.1-beta.tar.gz
eb9c83dca69696d195a5b98059f8aefb61e4522411ebc988bf25940adda6b570  lnd-netbsd-amd64-v0.7.1-beta.tar.gz
e7e70a835d4358e7357b19f857eb8ed2e05b3bf392aa0201016ac0e6282f4585  lnd-openbsd-386-v0.7.1-beta.tar.gz
10b0866377ef7452da4097596aa03afc42fcd2c037a3255e8e402a0bc04a1eea  lnd-openbsd-amd64-v0.7.1-beta.tar.gz
ae8cb77eb7567ed9f8041a17eb6f65280cf81f4fbc3bf10eb671a423f62fc948  lnd-source-v0.7.1-beta.tar.gz
b68357ffd9d9527d04cb7d16534998711bca5948d7704c1439437c993f68b555  lnd-windows-386-v0.7.1-beta.zip
249378747307d7dff0d5da9b0ef8acc14908d18d4b5adddc68a66939432f4770  lnd-windows-amd64-v0.7.1-beta.zip
3bbfa000e2b4c7702f92d24235b5a098f37fd7b5830ca42586678f03d7cf9da3  vendor.tar.gz

One can use the shasum -a 256 <file name here> tool in order to re-compute the sha256 hash of the target binary for your operating system. The produced hash should be compared with the hashes listed above and they should match exactly.

Finally, you can also verify the tag itself with the following command:

git verify-tag v0.7.1-beta

The binaries are compiled with go1.12.6 and include the following build tags: autopilotrpc, signrpc, walletrpc, chainrpc, invoicesrpc, and routerrpc.

Building the Contained Release

With this new version of lnd, we've modified our release process to ensure the bundled release is now fully self contained. As a result, with only the attached payload with this release, users will be able to rebuild the target release themselves without having to fetch any of the dependencies. Note that at this stage, binaries aren't yet fully reproducible (even with go modules). This is due to the fact that by default, Go will include the full directory path where the binary was built in the binary itself. As a result, unless your file system exactly mirrors the machine used to build the binary, you'll get a different binary, as it includes artifacts from your local file system. This will be fixed in go1.13, and before then we may modify our release system to do this automatically.

In order to re-build from scratch, assuming that vendor.tar.gz and lnd-source-v0.7.1-beta.tar.gz are in the current directory:

tar -xvzf vendor.tar.gz
tar -xvzf lnd-source-v0.7.1-beta.tar.gz
GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.7.1-beta" ./cmd/lnd
GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.7.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:

LNDBUILDSYS="linux-arm64 darwin-amd64" ./release.sh

⚡️⚡️⚡️ OK, now to the rest of the release notes! ⚡️⚡️⚡️

Release Notes (in progress)

Networking Payment Latency Improvements

We'll now pipeline HTLC pre-images across the route before each hop fully locks in the change. As a result, the network as a whole should now see dramatically reduced payment latency. Before this change, it would take 1.5 * N round trips (where N is the number of hops) for the sender of an HTLC to obtain a pre-image for a successful payment. With the prior logic, the pre-image would flow backwards in lock-step, with the receiver having it fully locked in first. With this new logic, it now only takes 0.5 * N RTT for the same operation. As a result, the sender of the payment will now get the pre-image much sooner, resulting in lower perceived payment latency. The higher the round trip latency between links, the more profound the speed up will be within the network.

Build

One of the dependencies required by lnd was being fetched from the author’s host rather than GitHub. At some point the host was down, causing new installations of lnd to fail. To resolve this, we’ve decided to use the author’s GitHub mirror of the dependency, which should provide a higher bar of reliability.

lncli Improvements

The help message for updatechannelpolicy has been updated to reflect the newly added ability to set fee rates to zero for channels.

We'll now confirm the aezeed pass phrase during initial wallet creation.

RPC Changes

The QueryRoutes command now has a new option UseMissionControl allowing it to tap into the central MissionControl path finding history. As a result, the command will now benefit from the path finding history of lnd as a whole, which means it'll now return more pertinent routes.

The ForwardingHistory command has been made easier to use by assuming an start+end time of within the past 24 hours. This makes the command easier to use both on the RPC level, and also on the command line.

An off-by-one error has been fixed in the AddInvoice call within the invoicerpc sub-server. This would at times caused lnd to add too many hop hints, making invoices invalid.

The payments returned from the ListPayments RPC included a fee field, indicating how many satoshis were paid in fees. This wasn’t consistent, as payments can have sub-satoshi fees. To address this, we’ve deprecated the existing fee field and have added two new ones to replace it: fee_msat and fee_sat. The existing fee field will likely be removed in a future release.

The addresses a transaction pays to are now included for unconfirmed transactions retrieved through the GetTransactions and SubscribeTransactions RPCs.

The channel reserve of each party within a channel is now shown through the ListChannels RPC. This provides applications building on top of lnd with finer granularity with regards to how much each party is allowed to send.

Payment related RPC calls in the new routerrprc sub-server have been extended to return richer error information. The SendPayment/SendToRoute calls will now also return the following concrete errors:

  • FailureReasonError: This is returned in case we get an unexpected response to our payment attempt for which it does not make sense to try different routes.

  • FailureReasonIncorrectPaymentDetails: This is returned in case the payment hash is unknown, the amount is incorrect and/or the final cltv expiry is incorrect. The route that triggered this failure is returned along side the failure message itself.

Additionally, individual hop hints can now be passed into routerrpc.SendPayment.

The channels returned from GetChanInfo, GetNodeInfo, and DescribeGraph will now properly display timestamp for when each channel policy was last updated.

The GetNetworkInfo command will now also return the number of zombie channels.

Graph Database + Pathfinding Optimizations

Pruning closed channels has been optimized to be much faster (20seconds to 1 second for hundreds of blocks worth of channels), and also utilize less memory (200 MB down to 1 MB for hundreds of channels).

We'll now explicitly track the past visited nodes during the core of our path finding algorithm. As a result, path finding has been sped up across the board when we need to explore more routes that normal.

The MissionControl sub-system is now fully globalized. As a result, all concurrent payment attempts are now able to share information with each other pertaining to failed routes. This allows concurrent attempts to avoid re-trying channels/nodes that have been known to recently fail.

Zombie channel pruning has been optimized. Users on mobile phones should see the biggest improvement. Before this change, pruning on a Samsung Galaxy S7 would take 5-12 seconds (on a fresh graph, no zombie pruning yet). After this change, that same operation now takes 15ms.

When sending a payment, we'll now add additional block padding to the CLTV value. This fixes an issue where if a block was mined right as a user sent a payment, then it would fail. By adding additional padding, we mitigate the issue, resulting in less extraneous payment failure.

Watchtower Improvements

A bug has been fixed that would cause lnd to crash if a lncli tower command was used while the tower wasn't actually active.

Wallet Changes

A sanity check has been added to ensure a transaction cannot be added to the wallet’s database as unconfirmed if it already exists as confirmed. This could lead to users at times seeing an inflated unconfirmed balance.

A bug has been fixed in our key derivation scheme that would cause us to be at times unable to close channels that were the very first a node opened. This could happen if a user kept their
same channel.db, but restored their wallet resulting in fresh wallet.db state.

Interfacing with bitcoind

We’ve addressed an issue in which connections to bitcoind’s ZMQ listeners would unnecessarily time out if there weren’t any messages available to read from the connection. This would cause connections to be torn down, which would then trigger the reconnection logic. With the issue fixed, we can expect ZMQ connections to be a bit more reliable.

Funding and Autopilot Fee Improvements

When opening a channel of a given size, lnd would add the transaction fee and take the this total amount from its wallet. This could fail if the attempted channel size was close to the wallet's remaining balance, as in high fee scenarios it wouldn't have enough funds left to cover the fee. This has been fixed by adding a new subtractFee option to the internal openChannel request, which instructs lnd to subtract the fee from the total channel size instead. Autopilot has been updated to use this option by default, which makes it possible to move all funds into channels by setting autopilot.allocation=1.0.

Gossip + P2P Improvements

We'll now no longe reply to nodes that request the old legacy full routing table dump via (initial_graph_sync). Nodes should instead now use the newer graph query extensions, which are more efficient and more granular.

Daemon Bug Fixes

We’ve fixed an issue where it was possible for lnd to panic if an error occurred while initializing a Neutrino backend. An error is returned instead, which can provide details as to what went wrong.

Errors that occurred while initializing lnd were only reported within stdout/stderr. We’ll now also write them to lnd’s logs. This is useful for node operators who run lnd through system service managers, e.g., systemd, which don’t easily provide access to stdout/stderr.

An exception on regtest chains to prevent waiting for the backend to be considered synced has been included. This allows nodes to start with old regtest chains without having to mine a new block.

We gracefully handle the go runtime failing to report hostname, which could happen on certain versions of Android.

Changelog

The full list of changes since 0.7.0-beta can be found here:

Contributors (Alphabetical Order)

Brett Cawley
Carla Kirk-Cohen
Chris Coverdale
Conner Fromknecht
Federico Bond
Eugene Sigel
Johan T. Halseth
Joost Jager
Olaoluwa Osuntokun
Oliver Gugger
Orbitalturtle
Otto Suess
Roei Erez
tyzbit
Valentine Wallace
Wilmer Paulino
Yaacov Akiba Slama

Assets 26
You can’t perform that action at this time.