Lightning Network Q&A

19 replies 281 views
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#1Sep 16, 2020, 09:35 AM
This thread is now self-moderated since the last one went off-topic. Let’s skip discussions about whether the Lightning Network is a solid scaling option. If you're new to the Lightning Network, you might wanna check out "Basics of The Lightning Network" first. Here’s what we’ll cover: 1. Lightning basics 2. Wallets 3. Running a node 4. Concerns 5. Other questions Lightning Basics What’s the deal with coins on the Lightning Network compared to regular on-chain coins? They’re exactly the same coins. They sit in a multi-signature address, and transactions happen between two parties without posting anything to the blockchain, except for when you're opening or closing a channel. Every time a payment goes through, a fresh commitment transaction gets signed. This transaction shows the current status of the channel and can be broadcasted if one of the participants goes missing. How often can you use a payment channel? You can keep using payment channels as long as both parties are willing to cooperate. There are no usage or time restrictions on them. How big is the Lightning Network? The overall number of nodes, channels, and the network’s capacity has been on a steady rise for a while. If you wanna check out the latest stats, head over to 1ml.com. Just a heads up, some channels are private, so they won’t show up in the public stats. How fast are payments on the Lightning Network? They’re usually super quick. But sometimes, payments might take a few seconds if a wallet has to try different routes.
4 Reply Quote Share
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#2Sep 16, 2020, 11:19 AM
I decided to re-post this thread without making many changes. I will focus on answering questions from the previous thread and keeping this one clean. This thread is now self-moderated. Old thread got derailed. Please, don't discuss here whether or not the Lightning Network is a good scaling solution. Every channel has to maintain a reserve. It should be equal to 1% of the initial channel balance. Some wallets do not inform the user that such thing exists. I guess that you have already figured it out. The easiest way is to look for a well-connected node on 1ml.com and then copy its public key. Alternatively, users who run LND can take advantage of built-in autopilot which works quite well. It's called payment slicing. Unfortunately, this feature is not available yet.
6 Reply Quote Share
HyperCipherFull Member
Posts: 220 · Reputation: 780
#3Sep 16, 2020, 04:17 PM
Basic question. What kind of hardware specs, and bandwidth are recommended to maintain a routing node that has 100+ channels?
6 Reply Quote Share
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#4Sep 16, 2020, 10:17 PM
Running a Lightning Network node is not demanding. LNchat's node has 16 active channels and it uses less than 1% of available RAM (~300 MB out of 32 GB) and barely any CPU processing power. I don't monitor how much data is being used by the server since I also use it for a few different things. Xian01 had been running a Lightning Network node (~200 channels) and posted some information which might be useful to you.
4 Reply Quote Share
diamond_ledgerFull Member
Posts: 35 · Reputation: 295
#5Sep 17, 2020, 02:12 AM
Bandwith,Ram,Processor dont really hold any weight on hardware decisions,  I would however recommend running Raid 1 and 2 new drives, with APC. *Edit Raid 1 (not 0) You want to focus on stability over time to prevent the node from crashing. Hope this helps. If your just wanting to play with it google compute is offering $300 trials and have been stable for my projects.
4 Reply Quote Share
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#6Sep 17, 2020, 02:45 AM
Wouldn't RAID 1 be better in such case? On-chain funds can be easily recovered using a seed but it won't restore the file which keeps channel state. Once you lose it, you have to depend on the other party. They might attempt to cheat. Using an old backup will be treated as a cheat attempt.
2 Reply Quote Share
diamond_ledgerFull Member
Posts: 35 · Reputation: 295
#7Sep 17, 2020, 06:55 PM
Yes Raid one would be better, I got them mixxed up. But yes "Mirroring" is the best way, *considering its page 1 I felt it critical to edit that mistake xD I also wanted to add if your caught doing that you do get penalized as there are measures in place, I do not know the complexities behind the penalties though.
0 Reply Quote Share
Posts: 2 · Reputation: 120
#8Sep 17, 2020, 07:20 PM
FYI: Mirroring Increases Read Speeds, but decreases Write Speeds verses a single drive. This can always be compensated for by using a high end RAID controller, that has Ram installed on it specially for Caching Reads & Writes. If you want a professional designed system to stay up , you need to design a Server with Redundant Power Supplies running RAID 5 with hot swap able drives. That way if 1 drive fails, you just hot-swap the new one and it automatically recovers the data, No Down Time.   Also have a UPS ,that is connected to an alternative power source so if the normal power cuts off, your system stays up. In addition, have two separate ISPs, with an automatic rollover if 1 ISP fails. * I have seen companies do the above and even have redundant servers , if the motherboards failed for mission critical applications.*
0 Reply Quote Share
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#9Sep 17, 2020, 11:33 PM
That's an overkill for a simple Lightning Network node. By default, one have 24 hours to bring back one's node online before forced channel closure (old channel state might be broadcast to the network).
1 Reply Quote Share
diamond_ledgerFull Member
Posts: 35 · Reputation: 295
#10Sep 18, 2020, 02:21 AM
That would be a nice build go with a perc6 raid controller  slap on FOG snapshots to be extra bit excessive for how beta LN is, surly opennode and eclair are using build like this though. I know blockstream could be a viable option in the future on network/bandwidth redundancy, 1 way handshakes though even if LND got implemented. Unless we somehow get blockstream TRIA compatable (2 way LNB) blockstream would be something different entirely in that case if we could somehow get that to happen via BTC network fee's or something that would be sweet.
4 Reply Quote Share
Posts: 2 · Reputation: 120
#11Sep 18, 2020, 03:54 AM
Overkill is the point for a No DownTime Setup. But even the simple setup need to be prepared for Power Failures  , (Hurricanes or Ice Storms can have power off for weeks.) ISP Failures     All of which can still take you offline even if your PC is working perfectly. I imagine at some point the watchtowers will handle all of the fail-over concerns. Do you happen to know what specs & infrastructure the watch towers will be using? TIA. I always liked the PERC RAID Controllers.
7 Reply Quote Share
ape420Member
Posts: 2 · Reputation: 66
#12Sep 18, 2020, 08:15 AM
How Is Milisatoshi In A Channel Is Shared When The Channel Closed? And Who Pay For The Channel Closing Transaction Fee? Is It Shared Equally Between 2 Party? And What If One Party Has No Balance? Example: A Has 150000.5 Satoshi In X Channel B Has 49999.5 Satoshi In X Channel B Decided To Close X Channel, The Channel Closing Transaction Fee Is 20000 Satoshi. How Much Did A & B Get In This Case? Sorry If It Hard To Understand
4 Reply Quote Share
Posts: 1 · Reputation: 92
#13Sep 18, 2020, 02:33 PM
Great thread,happy to see that lightning network is here to solve micro transactions
2 Reply Quote Share
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#14Sep 18, 2020, 06:08 PM
The amount is rounded down when the channel is closed. 1 msat = 1/1000 sat. For example, if you have 900 msat then you will get 0 satoshi on channel closure. The person who opened the channel covers the closing fee. Note that it's not possible to use up all funds that are locked up in the channel.
3 Reply Quote Share
ape420Member
Posts: 2 · Reputation: 66
#15Sep 19, 2020, 12:01 AM
i.e Channel is Funded With 100 Satoshi A Has 50.1 Satoshi B Has 49.9 Satoshi Assume That There's No Transaction Fee A Get 50 satoshi while B Get 49 satoshi. Did That Mean The 1 Satoshi (Rounded Down Satoshi) Is Left Behind On The Multisig Wallet? Isn't That Will Ended Up Filling Bitcoin Network UTXO, Which Bitcoin Node Should Store? #PotatoNodesMatter What If The Channel Opener [X] Had So Little Balance That Will Not Enough To Pay For Fee? Did [Y] Must Give [X] Some BTC So He Can Pay For The Closing Fee? BTW I See That There's A Minimum Time Limit Before A Party Can Close A Channel(A Party Can't Close A Channel Before XX/XX/XXXX). Did That Achieved By Timelock or by The Lightning Protocol Itself?
3 Reply Quote Share
tonychadMember
Posts: 7 · Reputation: 145
#16Sep 19, 2020, 12:10 AM
I've reading trough the forum and some googling; because I'm considering opening a LN node with a raspberry, but there are some concerns I have and haven't really found any useful info out there (maybe I should have look further). Questions are the following: Would I be able to run a dual node on the raspberry? (BTC+LN)I understand that to run a node you don't need to have an open channel; am I right? I'm sorry to ask if this has been answered before. Thanks in advance I'll give some more details, as I believe that will help resolve the doubts. I'm planing on using a Raspberry PI 3 Model B+ plugged straight to the router, and with a 256gb flash card for the OS (Raspbian). Then I'll be using the Core client, then things start getting a bit fuzzy for  me; I'll use Lightning Network Daemon, then some port forwarding on the router and finally create an automatic reboot with a backup (I believe that's the order for everything)
4 Reply Quote Share
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#17Sep 19, 2020, 01:52 AM
@Farul I will answer your post tomorrow once I have more time to explain it. Yes, see the last answer for more details. What node are you reffering to? Bitcoin Core? If so, then the answer is yes. Lightning Network node? You don't have to open channels but then such node doesn't do anything. In order to route payments, you have to open quite a lot of channels. Raspberry Pi 3B+ is enough to handle Bitcoin Core and Lightning Network node (LND recommended). However, I would recommend you to synchronise with the Bitcoin network on your computer and then copy blockchain data to an external hard drive. Don't use 256 GB memory card. Most of such cards are not designed to handle constant reads and writes. If you haven't bought that model of Raspberry Pi yet then consider buying the latest model (4B) with some extra RAM.
4 Reply Quote Share
tonychadMember
Posts: 7 · Reputation: 145
#18Sep 19, 2020, 03:26 AM
Understood, thanks! I have not bought yet the hardware, but my budget is quite limited. I had thought about the flash card being a problem; and the only feasible solution I could find to that is to use an external HDD (or even SSD) rather than a flash card, connected on USB.
0 Reply Quote Share
h0dl3r_foxFull Member
Posts: 48 · Reputation: 326
#19Sep 19, 2020, 09:13 AM
Raspberry Pi 4's CPU is much faster than 3B+'s. 1 GB version seems to be priced the same as the third model, at least in my country. If I were you, I would buy 2 GB or 4GB model of Raspberry Pi 4 and HDD rather than 3B+ and SSD. The fourth model has USB 3.0 and gigabit Ethernet unlike previous models. Buy a small SD card only for the OS, either 8 GB or 16 GB one.
2 Reply Quote Share
tonychadMember
Posts: 7 · Reputation: 145
#20Sep 19, 2020, 02:58 PM
Fair enough; difference seems to be of around 20€ using a 1TB HDD and a 2GB pi 4B and 30 if raspberry of 4G. I'll give it some thought while I wait for the retailer to restock (looks like mid-July  ) and if I happen to come accross any more doubts; I'll try to get them solved! Thanks for the help! Edit: Just realized that supply cable was not included; price has gone up a bit to around 80€ on Raspberry 4 4Gb without the HDD, against 40€ of Raspberry 3
6 Reply Quote Share

Related topics