Bitcoin Gold (BTG) - Lightning Network Technical Preview

  • Lightning Network Technical Preview

    We have a treat from our developers – a Technical Preview release of Lightning Network running on Bitcoin Gold!

    Our devs have successfully brought to life all the core functions for a BTG-based implementation of Lightning Network, based on LND (the Lightning Network Daemon) from Lightning Labs. This release provides a Technical Preview version that other developers can test and experiment with.

    What is Lightning Network?

    It’s a brilliant way to create super-fast, micro-cost BTG payments with virtually no limits to the transactions per second or the number of users.

    Lightning Network payments take place through payment channels directly between users, without waiting for blocks on the blockchain, so they are instantaneous. At the same time, the payments are reliable and trustable because of the way those payment channels are created and funded: with smart contracts on the blockchain.

    Because Lightning Network depends on a Segwit-enabled blockchain (like the BTG blockchain) as a base layer where the channels can be created, it’s often called a “second layer solution.”

    The last piece of the puzzle? Routing:


    On the Lightning Network, two people don’t need a direct channel to send money to each other because the payment can travel across many peoples’ channels. As long as there’s a path between people, the network can route the funds between them. The payment “hops” through channels between multiple people to reach the recipient, and clever cryptography within the Lightning Network payment system ensures that nobody in the chain gets paid unless everybody in the chain gets paid. And since each individual transfer is instantaneous, the entire chain of payments can be completed in a moment!

    This code is backed by solid engineering, but the combined effect is somewhat magical. Channels between nodes are secure and trusted because they’re based on coins and contracts on the base-layer blockchain. Meanwhile, payments across those channels in the second-layer Lightning Network happen instantly, without waiting for the blockchain, by flowing through those pre-established channels.

    So Lightning Network is super-fast – but how is it micro-cost?

    The cost of opening or closing a channel is based on the cost of transactions on the blockchain – every new channel puts activity on the underlying blockchain, which incurs a fee. But, once a channel is opened, it can be used for thousands of payments without touching the blockchain again, so none of the payments incur that cost. Each Lightning Network payment includes a tiny, tiny fee which is paid to the node that relays a payment. The tiny fee is so small it’s almost negligible, but it gives people an incentive to allow their nodes to serve as relays, and it also prevent spamming (if transactions were completely free, someone could write bots to just push massive number of tiny payments to try to cause trouble.)

    What it All Means

    When many thousands of people have Lightning Network nodes, this system is capable of sending millions to billions of transactions per second!!! Without changing the underlying blockchain, Lightning Network delivers:

    • instant transactions – payments in a fraction of a second
    • phenomenal scalability – perhaps millions of transactions per second before a block size needs to be increased
    • tiny fees so that even true micropayments are possible

    And that’s just the beginning – the advent of Lightning Network provides the basis for future developments. When Lightning Networks for different blockchains are compatible, transactions can be made across blockchains in what’s called a “cross-chain atomic swap.” You’ll be able instantly trade BTG for Bitcoin or Litecoin with someone else, without involving an Exchange, without needing an escrow, and without needing to trust the other party!

    The Technical Preview

    If you’re adept enough to install a computer language, compile code, and configure software, you can go ahead and install our LND implementation from this GitHub repo, and play with it yourself. There isn’t yet a graphical user interface, and it’s only intended for use on the BTG testnet at this time, but the code is fully functional and you can walk through the Lightning Network Developers tutorialBOLT specification.)

    For those of use who aren’t ready to compile and configure our own nodes manually, there’s a walkthrough below of how the technology works; you can see what we’re already able to do on the BTG Lightning Network.


    We’re excited about the possibilities this new technology brings (you should be, too!), and that’s why we’re working hard to bring it to fruition on our blockchain – but we’d be remiss if we didn’t mention that the open-source LND code we’re working on is being developed by Lightning Labs, who announced their first mainnet beta of Lightning for Bitcoin just a few months ago, and we want to thank the authors of the original Lightning Network whitepaper, Joseph Poon and Thaddeus Dryja.

    As always, we’re grateful for the fantastic community of open source developers working on exciting projects today and we look forward to making our own contributions to these projects in the future.

    Building better every day, The Bitcoin Gold Organization #1CPU#1VOTE

    Lightning Network Technical Preview: a Basic Walkthrough

    Developers can install our Technical Preview and perform the walkthrough with real nodes, but for the rest of us, here’s a description of what we’re not able to do on BTG with Lightning Network.

    Let’s say that Alice and Bob want to be able to interact. First, they each set up a Lightning Node of their own:     They’ve set up software on their computers, but they haven’t touched the BTG blockchain, yet.

    Now, Alice opens a payment channel to Bob, and funds it with 1 BTG:

    Next, Alice sends 0.2 BTG to Bob:

    Now, let’s add Charlie to the picture. He puts up a node:

    And then Charlie opens a channel with Bob, funding it with 0.2 BTG:

    Now, the magical part – it’s easy to see that Charlie can send money to Bob, but Charlie can also send money to Alice, even though they don’t have a channel! Here’s Charlie sending 0.1 BTG to Alice through Bob:

    Here’s one last image, the same as the previous one, but you can see how the two channels are tied to the blockchain:

Looks like your connection to Cryptocentral was lost, please wait while we try to reconnect.