Building a Lightning Network Node for Routing - Part 1.1

Follow our Support Engineer, Nate, as he walks through building a Lightning Network Routing Node. You won't want to miss this!

Building a Lightning Network Node for Routing -  Part 1.1

Advanced Peer Selection

If you missed the previous blog, click here for part 1.  It has been a few days since I have done anything with the node. I wanted to see how well the routing is going for at least another week. But, I do have some sats to open some more channels with, and there is a pretty neat tool called moneni that I wanted to talk about. When you provide your node pubkey to Moneni, it analyzes the public lightning network graph data to give you a read-out of what peers you could open with that have access to the wider network.  

Take this result for example:

It's telling me that if I open a channel with gameb_1, I would gain routing access to 585 other nodes with 2 hops, meaning that payments from the wider network are more likely to succeed (depending of course on payment size, etc.). Something to keep in mind is that not all of those 585 other nodes may be considered healthy or route-able. That's okay though. For the current stage of our node, which is 10+ channels and looking to grow, this is valuable information.

Usually, the biggest nodes on the network will be listed at the top because they have the largest reach. However, it may not be the best idea to only open channels only with the biggest nodes in the network. While it is okay to have some channels with the big players, one strategy I like to use is to open channels with a wide range of healthy nodes regardless of size. Here is a visualization of what I am trying to accomplish with this strategy, in rough MS PAINT form:

The Orange Line represents the two channels that the network needs, but doesn't have yet. It's the channel that turns the payments of many others that may be 3+ hops into 2 hops or less. This is the golden goose that everyone should be looking for. Over time, we will be able to have channels that equally flow both ways. To have a node full of self balancing channels is the ultimate goal of a lightning routing node. If you are able to do this, you essentially can sit back and have a fee generating node with very minimal babysitting.

Through my experience, I have developed a theory that if all you do is open channels with nodes that are gigantic, you are essentially competing with everyone else who has channels with the big node, which could be thousands of other nodes. This is not optimal or ideal for a new node or for fee generation. The idea is to tap into parts of the network that no one else is tapping into, to secure your own little corner of the network.

Another way we can see what peers our node may have an affinity with is with Balance of Satoshis. I will be going more in depth on the BOS tool in future posts, but for those that have it running, I highly recommend running this command when you are looking to open new channels on an established node:

$ bos chart-fees-paid --network --most-forwarded

This command will show you the nodes that your payments moved through the most but do not have channels open with. You can also add the --days flag to give the results a timeframe. Example: --days 30 will show the last 30 days worth of forwards.

Output would be something like this:

This is showing us how many sats our payments went through to specific peers as a next-hop. It's important to note that the nodes in this chart may not be the final-hop in a payment. Your node only knows the next hop and nothing more unless it is your own payment, then it knows the whole path. The Voltage node paid  about 10,000,000 sats through LayerCake. LayerCake might  be a good peer! Let's go ahead and look them up on amboss.space and terminal.lightning.engineering :

It looks like it is a very healthy node indeed! With this information, we can have a reasonably good bet that a channel with them would be beneficial for our node.

I will be opening a channel with LayerCake and am going to have a large channel open session within the coming week. Until then, think about your node's channels and how they interact. Try to analyze the data shown in Thunderhub forwards page and see which channels tend to flow which way. In the next blog, we will be growing the node out and discussing the fine line between manually rebalancing too much and too little along with opening more channels.

_________________________________________________________

You can follow along by creating a routing node for yourself on the Voltage platform. You could be up and running in about 2 minutes with a production grade Lightning node. If you have any questions or comments either email us at support@voltage.cloud or join us in Telegram. ⚡️