Pages:
Author

Topic: The Lightning Network FAQ - page 36. (Read 33287 times)

full member
Activity: 154
Merit: 177
July 13, 2021, 01:47:31 AM
I'm not even sure if triangles are actually good for the network. It's like we are isolating all other peers in the network out of our tiny triangle. I think it's better to try to open channels to anyone that is not connected to any of our peers, exactly to avoid triangles and loops between just a couple of users.
I think this is like if we stitch together 2 arms of an octopus. If we do that, then we have 2 less arms to grab another octopus 2 arms.

you are probably right, i think i got carried away with the new "hip" thing to do on lightning...  Roll Eyes

@Rath: did you ever write in the forum about the topic lnd vs c-lightning and why you made the switch from one to the other? might be interesting for others (it was for me) - we need that lightning network subforum. can i do anything to make that happen?
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 12, 2021, 05:10:47 PM
nice one - do you run by any chance behind tor and could try to connect to my node?
Code:
lightning-cli connect 025b5150c66f3ea41367829f6e4639c772fe4c7939b71933802233493e6e972a8e
Yesterday, I asked darkv0rt3x to try connecting to your node and it worked.

awesome thank you guys - do you know, is he only behind tor?

Another dual-funded channel here! Smiley
As you can all see, it's not that difficult. Who will be the third bitcointalk member to open a dual-funded channel with me? Cool

If any of you were thinking about setting up a Lightning node, now might be the right time. Transaction fees have been extremely low for the past few days.

i was just thinking we could also do triangles (or some more obscene geometric formations) in the future - or are they absolete with dual-funded channels?

I'm not even sure if triangles are actually good for the network. It's like we are isolating all other peers in the network out of our tiny triangle. I think it's better to try to open channels to anyone that is not connected to any of our peers, exactly to avoid triangles and loops between just a couple of users.
I think this is like if we stitch together 2 arms of an octopus. If we do that, then we have 2 less arms to grab another octopus 2 arms.
legendary
Activity: 1876
Merit: 3132
July 12, 2021, 05:00:14 PM
How would a direct channel be like? I take the example of using the same node (Bob) to simplify. Isn't that a direct channel?

Your example looks like this: Alice 0.1 BTC <---> Bob 0 BTC, Bob 0 BTC <---> Charlie 0.1 BTC

Alice has a direct channel with Bob and so does Charlie. Alice and Charlie are connected indirectly through Bob. Oh, and you have to specify how many coins Bob has on his side of the channel with Charlie. If he has less than 0.02 BTC then he can't route Alice's payment.

A new output? Doesn't it update the balance of the initial commitment transaction?

A commitment transaction can have up to four different types of outputs: local balance, remote balance, offered HTLCs and received HTLCs. The last two cannot be added to or subtracted from either side's balance because otherwise it would not be possible to enforce the condition which I mentioned in my previous post.

What's more, each party has a different commitment transaction reflecting the same state of the channel because one party offers an HTLC and the other receives it. Also, the asymmetry enables penalties if an old state of the channel is broadcast.

HTLC outputs in commitment transactions actually include an absolute timelock (a specific blockheight) as well as a relative timelock. I won't explain it right now. It would probably confuse you even more.

For allowing Alice to make the commitment transaction? Could you explain why Bob would need that?

Bob forwards Alice's payment (HTLC) to Charlie. Bob needs to make sure that he will get his money back if Charlie does not reveal the payment pre-image. Alice also signs a new commitment transaction with Bob for the same reason.

I may haven't understood the entire post, but what I did got is that the “locktime” of the closing transaction takes place once it's mined. I'd really want to have an explanation of the reason in which two on-chain transactions are required instead of one.

It's because of the relative timelock. You can't reliably tell when a transaction enters the mempool. If you used an absolute timelock, you would have to update the commitment transaction every time a new block is mined. Instead, a relative timelock is included in the output of the commitment transaction which reflects your balance in the channel. It can be spent either using your private key after the timelock has expired or immediately using yours and other party's revocation key for that particular transaction. You need the second transaction to move those coins to your wallet.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 12, 2021, 02:54:18 PM
Alice does not have a direct channel to Charlie, so she can't sign a commitment transaction with him. She can't directly send Charlie any coins through a commitment transaction signed with Bob.
How would a direct channel be like? I take the example of using the same node (Bob) to simplify. Isn't that a direct channel?

Alice signs a new commitment transaction with Bob which includes a new output.
A new output? Doesn't it update the balance of the initial commitment transaction?

Bob also needs to sign a similar commitment transaction with Charlie.
For allowing Alice to make the commitment transaction? Could you explain why Bob would need that?

No, they can't. I explained uncooperative channel close in detail in this post. Please, read it and let me know if it helped clear your doubts. It should answer all of your questions. I can try to explain it in a different way if it doesn't help.
I may haven't understood the entire post, but what I did got is that the “locktime” of the closing transaction takes place once it's mined. I'd really want to have an explanation of the reason in which two on-chain transactions are required instead of one.
legendary
Activity: 1876
Merit: 3132
July 12, 2021, 01:00:41 PM
Now, Alice can sign a commitment transaction saying that she gives 0.02 BTC to Charlie, but she also adds that the output can be spent after 144 blocks and they add this limit so that if one broadcasted an old channel state, the other person could send a penalty transaction.

Alice does not have a direct channel to Charlie, so she can't sign a commitment transaction with him. She can't directly send Charlie any coins through a commitment transaction signed with Bob.

Alice signs a new commitment transaction with Bob which includes a new output. That output has a specific condition: it can be claimed within X blocks only using the payment pre-image. After X blocks, it can be spent only by Alice. Bob also needs to sign a similar commitment transaction with Charlie.

Aren't they setting the block limit given a block height? For example [current_block_height + 144] just like in locktime. If yes, can't they cheat each other once 144 blocks have passed since the commitment transaction?

No, they can't. I explained uncooperative channel close in detail in this post. Please, read it and let me know if it helped clear your doubts. It should answer all of your questions. I can try to explain it in a different way if it doesn't help.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 12, 2021, 12:25:00 PM
Help me understand, I probably messed some things up in my mind (again).

Alright, let's assume that Alice and Charlie deposit 0.1 BTC on Bob. Before they broadcast anything, they already have Bob's signature so that if Bob disappears/loses his key, they can get their money back. Charlie generates a random number and gives its hash to Alice. Alice says to Bob that in order to finalize (sign from her side) the transaction, she has to receive the pre-image. Thus, Bob essentially gets the pre-image from Charlie and gives it to Alice.

Now, Alice can sign a commitment transaction saying that she gives 0.02 BTC to Charlie, but she also adds that the output can be spent after 144 blocks and they add this limit so that if one broadcasted an old channel state, the other person could send a penalty transaction. Once they both agree for the channel's closure, they can also agree not to wait so many blocks.

Am I right 'til here? If yes:
- Aren't they setting the block limit given a block height? For example [current_block_height + 144] just like in locktime. If yes, can't they cheat each other once 144 blocks have passed since the commitment transaction?
- Is it the same for Alice whether Bob or Charlie are offline? If the lightning node is offline, then they can't transact and if Charlie is offline, she also can't move her funds. I exclude the uncooperative way.
- How would the penalty transaction “rescue” you? Isn't it a commitment one? Shouldn't you also wait for 144 blocks?
- Aren't non-yet-spendable transactions valid? For example, if Alice broadcasted an old channel state wouldn't see get her transaction confirmed? Wouldn't that make the penalty non-valid? Even if she can't spend her funds in the next blocks.
legendary
Activity: 3430
Merit: 3080
July 12, 2021, 09:33:39 AM
I have never bought a Raspberry Pi and I want you to tell me if it'll be a very tiring procedure.

You should be able to install everything on your own without any problems. There's plenty of good tutorials and the documentation for both LND and c-lightning is quite good.

I'd suggest not using these pre-configured LN node linux images for the same reason as I'd give for not using these Android/iOS lightning wallets: what's in the black box, fellas?


this is money. your money.

if you trust someone else to give you clean software, you're literally begging to get yourself mugged by an internet mugger


I find it more than a little suspicious how much wallet and node software is being pushed so hard at people with the level of computing skill that ends when they push the On button of their Playstation/XBox

you're gonna get robbed with that kind of thinking, and you will thoroughly deserve it
legendary
Activity: 1932
Merit: 1273
July 12, 2021, 08:32:05 AM
I remember a few years ago I tried to run pruned LN node with c-lightning and spruned, but it didn't go well.

As far as I can recall, I have funded the address from lightningd, but haven't opened a channel. Upon inspecting the old file, I'm able to retrieve the hsm_secret file.
According to the doc, I should be able to get my BTC back right? since it still on the onchain(?).

Also, I notice that the funds on the lightningd address, have been moved. I guess it is just how the way c-lightning works right?
legendary
Activity: 1876
Merit: 3132
July 12, 2021, 07:40:40 AM
I think I'm just going to buy a Raspberry Pi 4 and install mynodebtc to it. Has anyone done this? I already have a 1 TB external disk and I believe that it's a cheap way to run both a full and a lightning node.

I had a 4 GB Raspberry Pi 4 and a full Bitcoin node + LND worked perfectly fine. I installed both of them on my own, though. ElectrumX had been taking way too much time to build its database, so I eventually built a small home server and sold the Pi. Someone keeps mentioning that a used NUC might be a better idea.

Oh and most, if not all, Lightning-in-a-box projects for Raspberry Pi come only with LND.

I have never bought a Raspberry Pi and I want you to tell me if it'll be a very tiring procedure.

You should be able to install everything on your own without any problems. There's plenty of good tutorials and the documentation for both LND and c-lightning is quite good. Also, Raspberry Pi 4 gets really hot for some reason. I had a metal case and a heatsink with a small fan on the CPU and it was still running too hot.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 12, 2021, 06:57:27 AM
I think I'm just going to buy a Raspberry Pi 4 and install mynodebtc to it. Has anyone done this? I already have a 1 TB external disk and I believe that it's a cheap way to run both a full and a lightning node.

I have never bought a Raspberry Pi and I want you to tell me if it'll be a very tiring procedure.
legendary
Activity: 2898
Merit: 1823
July 12, 2021, 05:58:30 AM
StopAndDecrypt wrote a very informative guide on how to install, and run a Bitcoin node, and a Lightning node over the Tor Network, https://stopanddecrypt.medium.com/running-bitcoin-lightning-nodes-over-the-tor-network-2021-edition-489180297d5

That could of help to you, BlackHatCoiner, and it might be good to include in the OP.
legendary
Activity: 1876
Merit: 3132
July 11, 2021, 01:06:44 PM
In the OP it says that LND supports neutrino, but I have no idea what is it

Neutrino is a Bitcoin light-client. Its GitHub page states that it still should not be used on the mainnet.

Is there any tutorial that explains how I'll setup my LN node without running a Bitcoin node?

You need a Bitcoin node. Your Lightning Network node needs to constantly monitor the mempool and the blockchain. Otherwise, it would not be able to tell when it's safe to use a specific channel or if any of your peers is trying to cheat. It also needs to know what transaction fees look like at the moment so that a commitment transaction could be updated with a reasonable fee.

You should be able to use a pruned node with c-lightning without any extra setup. Keep in mind the following.

You can use a pruned node if you choose either c-lighting or LND. However, whichever you choose, you need to be careful about the discrepancy in the reported blockheight by your Bitcoin and Lightning nodes. If your Lightning node crashes for some reason and your Bitcoin node prunes a block which has not been processed yet by the other node then your Lightning node will get stuck. See the following links for more information (#1, #2).
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 11, 2021, 12:41:43 PM
I have a VPS left and I'd like to run a LN node to help the network and myself with this brilliant technology. I've read that eclair requires a full node and c-lightning a pruned. In the OP it says that LND supports neutrino, but I have no idea what is it. I opened the github page and read that it helps you create JavaScript applications with zero initial configuration.

Is there any tutorial that explains how I'll setup my LN node without running a Bitcoin node?
full member
Activity: 154
Merit: 177
July 09, 2021, 04:33:09 AM
do you know, is he only behind tor?
Yes. If you are not sure then you can always take a look at 1ml.com

https://1ml.com/node/0273da0a525390c36857841e208f1d289275c76ebfa7ecfde697c6cbf4f235b4f5
https://1ml.com/node/03fef777d58a529df02a3fb267690e0c9033767b555cc1c63844bb2d3498789f91

As you can see in the table on the left side, our nodes have only an onion address listed under "IP Addresses".

yes, of course, silly me didn't think before posting

i was just thinking we could also do triangles (or some more obscene geometric formations) in the future - or are they absolete with dual-funded channels?
Unless more people join us, I don't think there is any point in this. You can simply route a payment through me; it's only one additional hop.

you are right for the moment we are not many and i also don't see the value in it right now. but in the future (when we are many) we don't want you to become the one single point of failure  Cheesy (i am kidding - but there is some truth in there i think)

Quote
i was just thinking we could also do triangles (or some more obscene geometric formations) in the future - or are they absolete with dual-funded channels?
Technically, you can include a lot of inputs and outputs in a single transaction. As long as transaction size will be below 100 kB, it should be possible to open and close many channels with many participants in a single transaction. The main problem is in lightning clients understanding what is going on, it may be impossible to create such transaction with some standard lightning client, but may be possible to create and sign it with for example Bitcoin Core and then get it accepted by some lightning node. It is definitely possible in case of opening a channel (you can open many channels by using a single opening transaction), closing it is harder, because you have to put that transaction inside the lightning client somehow and convince other lightning nodes to do the same.

yes rath also mentioned opening multiple channels in one transaction, that is awesome and i have to look into it at some point. but the fees are so low at the moment (that is why now is a good time to start setting up your lighting node), i don't need it

and i try to stay with what the clients support and don't want to get into something else for the moment, i was talking about swaps you can for example see on lightningnetwork.plus - we could even use that site (possible to use with fake email addresse, even mentioned on the site somewhere)

just an idea if we are more people - rath is right, at the moment this is not necessary and doesn't really fullfill any purpose, but i am thinking about the future
copper member
Activity: 901
Merit: 2244
July 09, 2021, 04:25:12 AM
Quote
i was just thinking we could also do triangles (or some more obscene geometric formations) in the future - or are they absolete with dual-funded channels?
Technically, you can include a lot of inputs and outputs in a single transaction. As long as transaction size will be below 100 kB, it should be possible to open and close many channels with many participants in a single transaction. The main problem is in lightning clients understanding what is going on, it may be impossible to create such transaction with some standard lightning client, but may be possible to create and sign it with for example Bitcoin Core and then get it accepted by some lightning node. It is definitely possible in case of opening a channel (you can open many channels by using a single opening transaction), closing it is harder, because you have to put that transaction inside the lightning client somehow and convince other lightning nodes to do the same.
legendary
Activity: 1876
Merit: 3132
July 09, 2021, 04:12:26 AM
do you know, is he only behind tor?

Yes. If you are not sure then you can always take a look at 1ml.com

https://1ml.com/node/0273da0a525390c36857841e208f1d289275c76ebfa7ecfde697c6cbf4f235b4f5
https://1ml.com/node/03fef777d58a529df02a3fb267690e0c9033767b555cc1c63844bb2d3498789f91

As you can see in the table on the left side, our nodes have only an onion address listed under "IP Addresses".

i was just thinking we could also do triangles (or some more obscene geometric formations) in the future - or are they absolete with dual-funded channels?

Unless more people join us, I don't think there is any point in this. You can simply route a payment through me; it's only one additional hop.
full member
Activity: 154
Merit: 177
July 09, 2021, 03:47:04 AM
nice one - do you run by any chance behind tor and could try to connect to my node?
Code:
lightning-cli connect 025b5150c66f3ea41367829f6e4639c772fe4c7939b71933802233493e6e972a8e
Yesterday, I asked darkv0rt3x to try connecting to your node and it worked.

awesome thank you guys - do you know, is he only behind tor?

Another dual-funded channel here! Smiley
As you can all see, it's not that difficult. Who will be the third bitcointalk member to open a dual-funded channel with me? Cool

If any of you were thinking about setting up a Lightning node, now might be the right time. Transaction fees have been extremely low for the past few days.

i was just thinking we could also do triangles (or some more obscene geometric formations) in the future - or are they absolete with dual-funded channels?
legendary
Activity: 1876
Merit: 3132
July 09, 2021, 02:56:18 AM
nice one - do you run by any chance behind tor and could try to connect to my node?
Code:
lightning-cli connect 025b5150c66f3ea41367829f6e4639c772fe4c7939b71933802233493e6e972a8e

Yesterday, I asked darkv0rt3x to try connecting to your node and it worked.

Another dual-funded channel here! Smiley

As you can all see, it's not that difficult. Who will be the third bitcointalk member to open a dual-funded channel with me? Cool

If any of you were thinking about setting up a Lightning node, now might be the right time. Transaction fees have been extremely low for the past few days.
full member
Activity: 154
Merit: 177
July 09, 2021, 01:23:59 AM
Yeah, I was also talking about that with _Rath. I think I have used fundchannel in the past without using connect before!
Another dual-funded channel here! Smiley

nice one - do you run by any chance behind tor and could try to connect to my node?
Code:
lightning-cli connect 025b5150c66f3ea41367829f6e4639c772fe4c7939b71933802233493e6e972a8e

that would be really helpful

ps: another reason for our own lightning network subforum - i need a support thread  Roll Eyes
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 08, 2021, 05:06:23 PM
3. entering two commands (now that i think about it, maybe the first command wouldn't be necessary if my node would be "older"/ better connected)
Just for clarify, the first command was lightning-cli connect and the other one lightning-cli fundchannel. You cannot fund a channel unless you manually connect to the person you want to open a channel with.

i read about "auto-connection in the manpage. i guess you could get away with only the lightning-cli fundchannel command:

Quote from: manpage lightning-fundchannel(7)
DESCRIPTION
       The fundchannel RPC command opens a payment channel with a peer by
       committing a funding transaction to the blockchain as defined in BOLT
       #2.  If not already connected, fundchannel will automatically attempt
       to connect if C-lightning knows a way to contact the node (either from
       normal gossip, or from a previous connect call).
  This auto-connection
       can fail if C-lightning does not know how to contact the target node;
       see lightning-connect(7).  Once the transaction is confirmed, normal
       channel operations may begin. Readiness is indicated by listpeers
       reporting a state of CHANNELD_NORMAL for the channel.

Yeah, I was also talking about that with _Rath. I think I have used fundchannel in the past without using connect before!
Another dual-funded channel here! Smiley
Pages:
Jump to: