This release marks a minor release in the
0.6-beta series. This release contains no major new features, and instead contains a series of bug-fixes, optimizations, and stability improvements.
Verifying the Release
In order to verify the release, you'll need to have
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 his PGP key you can verify the release (assuming
manifest-v0.6.1-beta-rc2.txt.sig are in the current directory) with:
gpg --verify manifest-v0.6.1-beta-rc2.txt.sig
You should see the following if the verification was successful:
gpg: assuming signed data in 'manifest-v0.6.1-beta-rc2.txt'
gpg: Signature made Mon May 6 13:10:07 2019 PDT
gpg: using RSA key F8037E70C12C7A263C032508CE58F7F8E20FD9A2
gpg: Good signature from "Olaoluwa Osuntokun <firstname.lastname@example.org>" [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):
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.6.1-beta-rc2
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
lnd-source-v0.6-beta.tar.gz are in the current directory:
tar -xvzf vendor.tar.gz
tar -xvzf lnd-source-v0.6.1-beta-rc2.tar.gz
GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.6.1-beta" ./cmd/lnd
GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.6.1-beta" ./cmd/lncli
-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
release.sh script will now also properly include the commit hash once again, as a regression caused by a change to the internal build system has been fixed.
⚡️⚡️⚡️ OK, now to the rest of the release notes! ⚡️⚡️⚡️
A bug has been fixed in the minimum version verification for the Tor daemon that
lnd enforces. Before this fix,
lnd would at times fail to connect to a Tor daemon with a version beyond the minimum version we require.
Protocol and Cross Implementation Compatibility Improvements
lnd will now properly handle the conversion from an
UpdateFailMalformedHTLC error to a regular
UpdateFailHTLC error. Before this fix,
lnd would incorrectly send an error that wasn't able to be decrypted by the sender of an the original HTLC.
On-Chain Commitment/HTLC Handling
A series of parameters related to when
lnd will go to chain for an HTLC, and also when it will reject an incoming/outgoing HTLC for being "too close for comfort" have been adjusted. As a result, it's no longer possible for
lnd to accept an HTLC then immediately go to chain for it. Additionally, it's now possible for
lnd to forward an HTLC as the last hop to a destination with a very low final CLTV delta.
lnd will now detect a local force close (self initiated) based on the outputs rather then the old
txid based comparison. This patches an edge case related to SCB restoration where if a user broadcasted a force close then restored their SCB,
lnd would miss this local force close transaction and attempt to redeem using an incorrect path. This bug has never been observed in the wild, but nevertheless warranted patching.
Gossip and P2P Handling
Non Write Pool Blocking Writes
Flushing a message to the socket is no longer blocks the write pool. One result of this change is that we are now we are able to gracefully handle timeout errors and resume partially sent messages. As of #2819, if a message is partially written to the wire due to a timeout error, we will try to write the full message again. In turn, this will produce an authentication error on the remote side (after it is able to read the number of bytes specified in the header) since the middle of the latter ciphertext will not pass as the MAC check.
We resolve this by splitting the Write call into two subroutines, WriteMessage and Flush. WriteMessage encrypts the plaintext and buffers the ciphertext on the underlying connection. A subsequent call to Flush will then attempt to write the bytes out on the wire. If a timeout error is encountered during flush, we can safely resume the byte stream by calling Flush again. In addition to being able to resume partial writes, this also has a yuuuge benefit in not blocking the write pool with network operations. This fully decouples the number of write pool workers from the number of peers, since the blocking operations now take place in each peer.
Synchronous Gossip Response Writes
All replies to gossip query messages are now fully synchronous. This means that if a peer requests a set of channels, then we won't send the next message until after the current message has been flushed to the socket. Node operators should find that start up is now much snappier, and the post start up memory burst to also be much lower.
SyncManager Simplification and Improvements
We've made some improvements to the recently introduced SyncManager. These improvements include:
* Active syncers will no longer attempt to synchronize our graph with remote peers. Instead, we'll now rely on synchronizing our graph with remote peers through the routine historical syncs performed by the
SyncManager. Since active syncers will no longer attempt this synchronization, the
SyncManager's round-robin is no longer needed.
* Handling initial historical sync disconnections: Every time lnd starts up, it attempts an initial historical graph sync with the first peer that connects. If the peer ends up disconnecting, then we wouldn't handle finding a replacement to continue performing the initial historical sync.
* Queueing active syncers until the initial historical sync completes: We do this to ensure we can properly handle any new channel updates at tip. This is required for fresh nodes that are syncing the channel graph for the first time. If we begin accepting updates at tip while the initial historical sync is still ongoing, then we risk not processing certain updates since we've yet to learn of the channels themselves.
RPC Bug Fixes
Sends to regular
p2pk(Pay to PubKey) addresses are now disallowed.
The route cache has been removed. After updates to the
SendToRoute RPC command, the cache could at times cause an incorrect result from
Networking Bug Fixes
We've fixed an issue that would cause our automatic NAT traversal to fail on certain Linux distributions.
It's now again possible for the gRPC server to listen on both IPv4 and IPv6 simultaneously.
lnd will now automatically re-create port port forwarding if we detect that the external public IP has changed.
lnd is now able to connect to Litecoin coins running on the
regest network as well as the
There is no longer a
main package, instead the top-level package within the project is now
lnd. This is a prep for changes to make
lnd easier to embed in mobile applications for iOS and Android.
The full list of changes since
0.6.0-beta can be found here:
Contributors (Alphabetical Order)
Johan T. Halseth