pull down to refresh

This is a scenario that I've done some years ago, as testing purposes, but I didn't post it publicly until now. But today I saw the article of Shinobi on Bitcoin Magazine and reminds me of my old experiment. So I went back to my old draft notes and bring them here in form of a new quick guide.
I think this scenario can be used also in isolated communities, with high latency of internet (@BTCLNAT I am talking about you, on your island) or those that want MORE privacy than LN is already providing on public channels.
This scenario can be applied also for this guide I wrote about Private banks over LN
YES, YOU DO NOT NEED TO USE THE WHOLE PUBLIC LN !
Let's get started.

Requirements:

  • a LN node, best option is to have a desktop node, with a LND for the convenience. Let's say this will be a LN bank, to get started.
  • various LN wallets ready. Must be some of Zeus, Blixt, Electrum, Breez or any other wallet app that can open customized channels.
  • move some funds in node onchain wallets. Do not use your holding cold wallets for this, just move some sats into your onchain wallet of your LN nodes. Think about how much you want to spend in this experiment of circular economy.
  • network ready, you still need internet to be able to broadcast the opening channels tx. After that it can even be used a mesh network between all those private LN nodes. Important is that is to be reachable between them. The private LN network you are going to build only needs to reach all the peer participants in this private ring. So when you configure your LN nodes, apart from the public IP, announce also the private IP you will going to use in your private LN. You will find that setting in your lnd.conf.

First steps:

  • start opening private (unannounced) channels between private ring peers.
  • open channels with all possible peers so you will be well connected to each others and can send/receive sats to anybody in the ring. Keep in mind that private channels DO NOT DO ROUTING.
  • you can do the experiment with public (announced) channels, but again, your LN nodes must operate on public and private network. If you just want to use the regular public internet is also OK. These public channels can act as routing LSPs for all other nodes that choose to open private channels.

Example: Let's build a private / public ring.
  • Alice (private LN node) open a private channel with Bob (public LSP). Let's say 100k sats
  • Carol (private LN node) also open a private channel with Bob, this time 200k, for variation.
  • John (a local merchant with a public node) open a public channel with Bob (LSP). In this moment Alice and Carol are connected not only with Bob but also to John and can pay him for the groceries.
This simple scenario can be extended even further and Alice and Carol can open direct private channels with John, without using the Bob's routing node. But in that case they have to refill those channels all the time they get emptied. How?
  • closing the drained channel and opening new ones
  • using a swap from onchain. Swaps services can be provided by the same peers (so called ghetto swaps) or another ones, but they must have channels between their nodes or at least with their peers to be able to route the swap.
Another aspect to take in consideration is that if you want to pay a peer that is 3 hops from your node and between you and them are only private channels, you will need to build the route with hints and you need at least one peer that can build the path as a bridge.

Conclusion

As you can see there are ways to do payments over LN in a more private way, without using ANY of the public nodes, LSPs, compromised nodes, NSA nodes or whatever you consider a spy.
Build your own private LN using only channels between trusted peers and you can still transact with Bitcoin. Using public known routing nodes is useful ONLY if you want to use BTC payments to other unknown destinations. But if you run your own LN in your closed community, you do not need them or even go onto all the rest of the public internet.
LN channels are just some pipes between 2 peers, as long as their nodes are reachable, you can still transact on any closed network, but keep in mind... ONLY between those participants in your closed network, not outside.
This scenario can be applied also with SN.
246 sats \ 3 replies \ @aljaz 9 Jan
I think "private" LN might even be a wrong name here. Lightning network doesn't really exist. Its just bitcoin nodes with contracts on chain (channels).
What makes it "private" in this case is just the fact that the contracts are in a closed loop, but I'd argue that this is where lightning will strive towards when liquidity deployment starts reflecting economic activity. Lets say the nodes in a village will be hyper connected between themselves or have one big bank in between, and that bank will have connectivity to the world. Aka how internet works :)
Point being that there is no such thing as private network, it is just an isolated cluster of nodes that still uses the same chain (bitcoin mainet) for its operation, it just went as far to not only express their economic activity through routing over the cheapest/shortest paths in their circular economy but to actually contractually ensure noone will be able to deal with the outside world if they wanted to
reply
Yes indeed. I said "private" to give the reader an image somehow that is separated from the well known "public". Literally a mesh network with local nodes. I've seen many noobs saying that in order to use BTC over LN they have to be connected to a well known node. That is false. You can still transact over LN with just 2 nodes. But yes, only between them.
Lets say the nodes in a village will be hyper connected between themselves or have one big bank in between, and that bank will have connectivity to the world
Exactly that scenario I described in this guide.
reply
21 sats \ 1 reply \ @aljaz 9 Jan
sorry, I didnt read the links :)
reply
hahaha you don't have to... you are the Lightning Chad
links are for mortals
reply
Are there any know Lightning nets that aren't connected to THE Lightning network?
I don't mean like a few nodes connecting for the sake of being a private LN Network... like a real big unconnected subnet?
reply
34 sats \ 2 replies \ @pillar 21h
Theoretically, it can be. And practically, there probably is. There are many situations where this could make sense. For instance, big exchanges that support lightning would probably benefit from having a private LN among themselves to clear transfers between each other without "amateur" nodes in between (and also potentially keeping info private).
But the reality is there is no way to be sure if this is the case. If there's a subnet that is not connected to the "main" net, taking into account all the benefits that would derive from merging into it, it's probably because the operators have a strong incentive to keep things private and away from the public. In which case, we wouldn't know they exist, right?
reply
You can also use decoy nodes, like Bitrefill is doing.
You put a public node as a front-runner with a bunch of big fat public channels and also you can let other small nodes to connect but you can filter them out. Then behind that front-node you have a bunch of other private nodes, connected to this public node with a big fat private channel, that can be even a 0-conf channel, so no trace on the blockchain.
Then you create a "private" ring with many other "private" (unannounced) nodes interconnected with multiple private channels, moving funds between them. This could act as a "subnet" or a hidden lightning network that nobody knows about it.
I remember some years ago the SBW wallet dev, Anton, was proposing a kind of "private routing" using the Immortan LN implementation. Will be interesting if it could be taken over and have a finished protocol.
I think also with some trampoline routing you can do this, like Electrum is doing.
reply
100 sats \ 0 replies \ @aljaz 3h
I think you are mixing up hosted channels (virtual, no chain footprint) and 0-conf channels (node giving you the ability to spend/receive before channel opening tx has the first confirmation)
I think there is a decent size of huge channels connecting some of the bigger players that might be unannounced (priv channels), but not necessarily completely cut of from the rest of the network. There is very little upside for doing that unless you have a completely closed ecosystem, which is hardly ever the case.
What you call decoy nodes are also very practical for various reasons, first of all plebs will give you lots of capacity due to the brand name and you can make sure you are well connected within the network, but you want to keep the node doing any kind of business activity separate so you don't have routing revenue etc polluting your accounting books, you just do one (or two just in case) priv channels to your routing node from the business node and do the actual payments from there.
reply
I think Strike started like that, but then later they open their network to the rest. Then using a big wumbo channel with the rest of the network for moving liquidity in/out from that closed sub-network. This could provide a closed traffic between all Strike users, even with 0 routing fees, but when is about to move funds out of "strike network" the strike node will route the payments through their public or other private channels with other public nodes.
Yeah visualizing this as a VLAN or subnets. It's an interesting experiment.
reply
36 sats \ 3 replies \ @nym 9 Jan
What is the best way to create a ring yourself? Multiple VM’s or a different wallet for each ring, or Docker or something.
reply
Interesting question, but I don't get where is going, what will be used for? Why have to be in VM or dockers?
reply
0 sats \ 1 reply \ @nym 9 Jan
Maybe those aren’t needed, thinking of the most efficient way to have say 10 private channels of my own before opening others
reply
But what for those 10 channels? And with which peers? Between 2 of your testing nodes? If you need quick testing LN nodes, you can always use Rizful nodes (https://rizful.com). These are perfect for this testing scenario.
Or... Put a central BTC core node on a local machine with neutrino activated, then spin up 2-3 LND nodes in the same LAN and point to your local neutrino BTC core node. Done, you have built in few minutes a local lightning "private" network.
reply
I forgot to add... To open channels on a private network you can do it also with 0-fee.
0-confirmation channel is a Lightning channel that is not yet fully confirmed on the Bitcoin blockchain. This means that the funds in the channel are not yet completely secure, but they are still very likely to be safe and usable over the LN. Peers can still make payments between them using that "unconfirmed" channel.
reply
55 sats \ 1 reply \ @pillar 21h
The whole "The Lightning Network" idea falls in the same bucket as the "The Mempool" one.
For anyone reading and not understanding: there is no "the mempool". Each node has a different mempool.
Same with Lightning: any two lightning nodes are forming a network. There is one massive one that everyone and their mother plugs into because it's useful for their needs, but any pair of nodes can start a different network. There is an unknown number of private networks out there.
reply
There is an unknown number of private networks out there.
Exactly. Like in 2022 when was the crazy FUD hysteria that LN nodes are running on Amazon servers, people start panicking. So I wrote another article about: https://darth-coin.github.io/general/omg-ln-nodes-on-amazon-en.html
reply
This is actually pretty cool stuff. I could see this being a fun project to do with my brother if I can get him a bit more interested in bitcoin.
reply
you will lean a lot doing experiments Like I did another one here
reply
0 fee LN node seems like a good goal. It seems like something i can eventually do to give back to the community. I'll get there in time.
reply
Please read carefully the documentation for 0fee / 0 conf channels. Are not to be used everywhere.
reply
Yea, I'll definitely be very careful before I take on a project like that. I just like to have long term goals, even if I don't know exactly how to achieve them yet. It keeps me moving in the right direction.
reply
Small steps. That's why I always drop on SN many ideas / experiments / quick guides. So people will start using bitcoin more in many different situations.
reply
Do it. Listen to Darth's valuable advice. He is an all-knowing idiot maxi.
reply
If you disagree with his advice, I would be happy to read your extensive library of guides.
I'll wait for the link....
reply
Why do you sell yourself for a few sats by writing sugary comments on Darth's posts?
reply
43 sats \ 1 reply \ @Aardvark 9 Jan
I'm not sure what you're trying to accomplish, but I'm genuinely trying to learn more about this stuff. Injecting yourself into a conversation I'm having with the sole purpose of being disruptive makes you the prick.
reply
I'm not sure what you're trying to accomplish, but I'm genuinely trying to learn more about this stuff.
Good for you!
reply
Bookmarked this for a deeper dive into Lightning node usage.
reply
Thanks again brother. Among the graduates of the basic course on Bitcoin I have a guy who is dedicated to networks. So with this suggestion and his knowledge we could make a mesh network between us and at least 1 public node in case we have to receive or send outside the network we are going to build.
Would that be the idea?
There would be no fee between us because we are all using the same node.
That happens with WoS wallets, there is no fee between them because they are all related or connected in the same network?
reply
Great, going to read deeper later. I've been trying to learn more about this. Established a couple of channels already so that's been fun figuring out.
reply
🚩 This post might be more relevant and engaging in the ~lightning territory.
0 sats \ 0 replies \ @Karlm 20h
Very helpful
reply