written by @veriphibtc
With the Lightning Network still in its infancy, development continues at breakneck speed in an effort to make the user experience more simple and fluid.
The Lightning Network is a fascinating, growing peer-to-peer network aiming to create a fully functional second layer for Bitcoin. Even if we are still in the early stages of its development and potential, the amount of innovation and solutions proposed to make it work are tremendous.
Although the Lightning Network is still in an infancy state, it’s already working and open-source projects and companies alike are already integrating it for their users. The state of the network is also pretty impressive knowing that it isn’t controlled by a singular centralized entity. There are currently over 13,000 nodes and 37,000 public channels benefiting from over 1,000 BTC in liquidity.
In many Bitcoin enthusiasts' opinion, before a form of money can be considered as such it must pass through different stages of development in a particular order. The first one being the store of value, second one being an unit of account and finally the last one as a medium of exchange. Bitcoin is starting to fulfill its store of value promise, but must still grow considerably in market cap to stabilize its purchasing power before being recognized widely as a medium of exchange. Attempting this process in reverse (as some projects do) are likely to yield undesirable results.
Given the milestones Bitcoin still needs to achieve, the Lightning Network still has time to flesh out different technological solutions. Today we will explore one such solution: trampoline nodes. If you’re still learning about the basic intricacies of the Lightning Network check out this previous article we wrote for the BTSE Academy.
Quick Recap On Lighting Network Nodes
In order to better understand trampolines nodes, let's have a quick reminder on regular Lightning Network nodes. As previously mentioned, the Lightning Network (LN) is a network composed of Lightning Network nodes which run the main LN software needed to interact independently on Bitcoin’s second layer.
One of the core features of a regular Lightning Network node is that it is connected directly to a full Bitcoin Node in order to be able to trustlessly report its latest channel states. That encompasses the ability to create channels with other constituents of the network through a peer establishment system.
Once a user of a LN node wants to send a transaction, their node will have a full view of the network, also called the network graph, which is necessary to create a route through the different nodes that compose it. This is especially useful if the recipient of the payment isn’t connected directly to its sender, and the payment will have to hop between different nodes before reaching its final destination. This is all possible through the exchange of cryptographic secrets called HTLC’s, which stand for Hashed timelock contracts. Therefore, the nodes helping to route the payment aren’t able to cash out the payment, but nonetheless will get compensated with a small fee for their efforts.
Challenges Of A Lightning Network Node
Over the years, Bitcoin operational security measures have been constantly worked on by developers and companies. Long gone are the days where one could only keep their bitcoins on a wallet.dat file. Now, users have different tools, such as hardware wallets and secure software wallets, that let them generate private keys in the form of humanly readable words.
The Lightning Network however isn’t fully mature yet and therefore there are some considerable risks of losing your funds when using it. The LN developers themselves advise users to only allocate what they are ready to lose. This way you can redeem satoshis locked in a LN channel by publishing the latest channel state to the first layer. However, if you lose the latest state or publish inadvertently an older state, the channel counterparty can take all the funds.
A Lightning Network node has to constantly download and update its network graph before each payment in order to be able to construct a route depending on the latest network topology. This currently isn't an issue, as the Lightning Network isn’t that heavy in terms of space, but it may become a big problem in terms of bandwidth and storage when the LN reaches extraordinary levels of adoption.
However, if we infer that a lot of people will use the LN through their mobile devices, these particular constraints aren’t viable if we want the user experience to improve in the long run.
Fortunately, Lightning Network developers are thinking ahead about solutions that may resolve that issue by the use of what is called Trampoline nodes.
What Are Trampoline Nodes?
Trampolines nodes are a way to mitigate the necessary resources of a full LN node in order to send payments without compromising the privacy capabilities of the Lightning Network.
Trampolines nodes will contain the full network graph and will be in charge of finding a route to the final destination instead of the sender. This will especially be useful for mobile applications using the Lighting Network by letting them run light clients instead of full LN nodes once the number of channels and nodes grows further. They have all the same properties of a full LN node, the trampoline feature is an additional capability chosen to be executed by its owner.
Light clients will only have to sync a partial network local graph along certain pre-identified trampoline nodes. That process is considerably less CPU and memory intensive and brings down the loading time of an application.
Once the partial graph is loaded, the light client will identify a singular trampoline node inside that graph and will take care of creating the first route for the payment to reach it. However once the payment reaches the first trampoline node, the responsibility of reaching the ultimate destination is then deferred to the other pre-identified trampoline nodes in the network. Since the “work” to find the ultimate route falls upon the trampoline nodes, this technique to send LN payment will be more expensive on a transactional basis than sending it through your own Lightning Node.
This process uses variable-length onions which are a way to send messages through a cryptographic layered manner. Simply put, each participant along the payment route has to peel a cryptographic layer by responding correctly to its secret in order to receive its corresponding reward and send the message further down the road.
In order to better understand the concepts explained before, you can follow the train of steps of a trampoline node payment by following this image.
The initial light client (the sender of the payment) is identified with a light blue dot and their corresponding local graph with the dotted circle. The darker blue dot identified with a “1” is the trampoline node used as a payment gateway to pass the payment further on through the pre-identified trampoline nodes (dark blue dot).
The first part of the route is identified with the light green and is taken care of by the light client. However, once it reaches the first trampoline node, the other parts of the payment (orange and light blue lines) are constructed by the remaining trampoline nodes of the route.
HOP, HOP and there you have it. A lightning network payment jumping through the network on trampolines nodes.
No matter how complicated the challenges of Bitcoin and its corresponding second layers are, it is amazing to see the minds of developers working relentlessly to resolve them. Trampoline nodes are just another display of their abilities as they work on a solution that doesn’t compromise on the Lightning Network privacy feature and its usability.
To further understand trampolines nodes, we recommend the following presentation by Christian Decker.
To start testing the lightning network yourself using trampoline nodes, check out this easy tutorial from BTC Sessions on how to use Acinq's "Phoenix Wallet".
If you have any feedback on this or any other topic, please feel free to reach out to us at any time at email@example.com or @BTSEcom on Twitter. We always love to hear from our amazing BTSE community.