24 Comments

Thank you, DarthCoin - this is great information! I just built a myNode on Pi, but haven't yet turned on the Lightning function. My Electrum wallet on a different computer is connected to an Electrum server on the Pi.

Is it possible for a malicious node/person to damage or hack your lightning node?

I think I will also set up a public and private node. I don't care about money either, just advancing bitcoin adoption, which is super-important right now.

Thanks again Sir!

Expand full comment

No, nobody can "hack" your LN node. That happen only in "hacker movies" :)

Expand full comment

use the https://github.com/BhaagBoseDK/charge-lnd to automate the htlc job

Expand full comment

Sorry, no. I do not recommend using that script at all! The script it contain a feature that is disabling channels that are "not profitable" and in you end up with force closed channels. I test it, I remove it. Will never use it again. Disabling channels is really dumb and against the whole point of LN.

Expand full comment

Bro its all about how do you configure the scrip. It won't do that if you don't use it configured for close channels at all. It's easy and safe.

Expand full comment

Hey bro how are you doing? when you say 'I set a maximum number of HTLCs in lnd.conf file to 10' you are talking about channel-commit-batch-size=10 or default-remote-max-htlcs=10 ? cheers

Expand full comment

thanks a lot! if possible fix the link in the tutorial.

Expand full comment

but is already there. Only that you didn't click it. It start at line 307 and continue till line 314

Expand full comment

so you use both configurations?

Expand full comment

Thanks for your help I am doing 100-300 forwards per day for 2 week already. Thanks bro!

Expand full comment

Wow! Love to hear that!

Expand full comment

It lowered a little bit las week but still doing good like 45-130 per day since 24/04. Thanks again, I couldnt do that without your help. Soon I will open a new 10m channel, if you are looking for inbound balance please let me know.

Expand full comment

Thanks for the channel offer, but I am good now with liquidity. I try to keep a balance between total inbound and outbound liquidity (I mention it in my guide). So a big 10M channel inbound will force me in some way to open another channels to balance that one.

But if you are willing to open a 10M channel, you should test the new Amboss channel marketplace https://amboss.space/magma where you can practically sell that channel.

Expand full comment

Darth how could I increase a channel size? Should I close old one and open a new?

Expand full comment

Yes, is a good practice to do that.

Is good to wait a bit until almost all the balance is on your side and then close it cooperatively. Check also in RTL or TH that you do not have pending HTLC with that channel. Wait for them to settle.

Then close it and wait for the UTXO you get to have also 6 confirmations. Do not open a new channel with unconfirmed UTXOs!

Open up a bigger one (I recommend at least 2.5M sats or even better 3-4-5M sats/ch).

Closing an old channel with many commit changes also help to reduce your channel.db size.

Check here a lnd.conf example that I use, where are specified some options to clear up your channel.db from not necessary data (like old unconfirmed invoices, cancelled etc)

https://telegra.ph/LND-conf-customization-04-16

Expand full comment

Great guide.

I've seen some very strange behaviour with the Muun wallet which some of my users transfer sats to via my node.

If you open an invoice on Muun, copy it and then close the app on an iPhone (not sure what Android does I don't have one to test with) I can see transactions stall for up to 24 hours! When I initially send the payment with the REST API the invoice just times out. Never returns an error.

Subsequent attempts to pay the same invoice return "payment is in transition" in the error field.

I can't find any way to cancel this type of payment.

This will continue for 24 hours and then fail OR if the user opens the Muun app again it will immediately succeed!

I have only observed this behaviour with Muun. I now have a direct channel to Magneto which is Muun's node, their phone apps seem to be linked by temporary private channels to this node.

What I see is that LND's API

Expand full comment

Avoid Muun. It's a trap. Explained here in one of my other guides, about LN wallets https://darthcoin.substack.com/p/lightning-wallets-comparison

Expand full comment

I would love to learn about node maintenance pratices like sheduled restarts etc. Did you do or known any guide about that topic Darth?

Expand full comment

Good idea for my next guide!

Expand full comment

Hey teacher =)! How are you doing? I saw today a channel called darthnode, is it yours? Feel free to awnser or not. My question is something else, i was watching c-otto politics and he does disable his side of channel when his outgoing liquidity is lower than 50.000. I suppose he does that to reduce HTLCs fails. Should i use a similar approach or its bullshit?

Expand full comment

Hi Darthcoin,

I'm interested in you HTLC setting strategy and have been implementing it on my own node. I am yet to see the data as it has only been a few days. What are your thoughts on let say you open a triangle swap on LN+ with two peers for say 500K sats each, and one sets their local balance maxHTLC to 250K sats, does this effectively mean that this channel will only be able to route 250K sats at a time? Does this mean a peer could only route 2txs of 250K to shift the local balance to the other side? I was wondering if one could set this maxHTLC to say 50K sats so that the channel would route 5x the amount of txs before the channel shifts to the other side and possible require a rebalance.

Am I correct in thinking that this works for both dirrections on the route, both inbound and out?

Expand full comment

Yes, maxHTLC will set the maximum amount of sats to be routed in a tx through a channel.

Think about your channels as water pipes. Each pipe have its own diameter (channel size) and your maxHTLC as valves, with which you regulate the water flow through the pipes.

Expand full comment

This makes a lot more sense setting up a channel flow in this fashion. If one starts with a balanced channel then sets the maxHTLC to a fraction of the capacity then one could expect multiple smaller routed amounts than one large amount. This way you could effectively charge lower tx fees per tx and not have the channel swing rapidly from inbound to outbound and vice versa.

Thanks for you insight.

Expand full comment