Bitcoin Forum
June 28, 2024, 10:26:47 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21] 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 ... 78 »
  Print  
Author Topic: The Lightning Network FAQ  (Read 32362 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic. (37 posts by 1+ user deleted.)
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
August 28, 2020, 09:56:25 AM
 #401

No, the signature is valid for an input but signs what the sighash mode tells it to sign. What i mean is that if you have a 2-input transaction with one NONE-signed input and one ALL-signed input, someone can just malleate the transaction by removing the ALL-signed input and creating an output paying them.
d5000
Legendary
*
Offline Offline

Activity: 3962
Merit: 6647


Decentralization Maximalist


View Profile
August 28, 2020, 11:15:06 PM
Last edit: August 28, 2020, 11:26:07 PM by d5000
 #402

Ah, ok, I think I understand now. So Sighash flags are only valid for the inputs and outputs you sign, and any person who has access to the unconfirmed transaction can try to "steal" inputs which are only signed with the SIGHASH_NONE flag and get it confirmed earlier as your transaction, even if someone has signed it with SIGHASH_ALL.

In this case it seems SIGHASH_NONE in its current iteration is pretty pointless or flawed, as it is basically always a "donation to the miner".

What would be needed instead is a way where one party could give out a signed output to another person to include it in a transaction, with the condition to sign it in a way it can't be stolen (e.g. with SIGHASH_ALL), and if I understand your posts the right way, this is not possible currently (at least not easily).

(If this is correct it's not necessary to answer me, as I think this sub-thread has already become a bit long and it is not totally LN-specific Wink I'll look if I find more info about that by myself. Thank you for your explanations!)

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
btcduster
Jr. Member
*
Offline Offline

Activity: 46
Merit: 66

#WeAreAllHodlonaut


View Profile WWW
September 02, 2020, 08:36:33 AM
 #403

I found this wonderful thread after checking the size of the fees that are paid for transactions.
This may be the solution for small transactions, but I have a question.
If I decide to sell something with LN payment, can I use an address that is outside the LN wallet?
In other words, do I pay fees to transfer bitcoins from LN network to,let's  say, my Electrum wallet? If it is an off-chain transaction, how to I go back on-chain?

Learning about Bitcoin.
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3132



View Profile
September 02, 2020, 08:53:45 AM
Merited by d5000 (1), JayJuanGee (1)
 #404

If I decide to sell something with LN payment, can I use an address that is outside the LN wallet?

No, Lightning Network does not use addresses for payments. Instead, you need to create an invoice. Some implementations already support invoiceless payments, but those are not available in most LN wallets and I am not sure if they are cross-compatible between implementations since this feature is still not a part of the official specifications. Keep in mind that you can't start receiving payments right after you open a channel. I have described it in detail in the FAQ.

In other words, do I pay fees to transfer bitcoins from LN network to,let's  say, my Electrum wallet? If it is an off-chain transaction, how to I go back on-chain?

In order to move your coins off-chain, you need to open a channel with some node. That requires you to send an on-chain transaction to a 2-of-2 multisig address controlled by you and the other node. The transaction will be created automatically by your wallet. The channel will become active after the transaction reaches a few confirmations. In order to move the coins back on-chain, you need to close the channel. If the other node is online, the closure should happen instantly and your on-chain address should receive your remaining LN balance minus the closing transaction fee. If the other node is offline, you will have to wait some time before you can broadcast your closing transaction. It's a cheating countermeasure. As you can see, you will pay only for two on-chain transactions and you will be able to make an indefinite number of off-chain transactions.

By the way, if you are interested in using Electrum's implementation of the Lightning Network, check out this thread.
LoyceV
Legendary
*
Offline Offline

Activity: 3360
Merit: 16927


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
September 02, 2020, 09:06:38 AM
Merited by Rath_ (1)
 #405

In order to move the coins back on-chain, you need to close the channel.
@btcduster: For relatively small amounts, I used to prefer an exchange that accepts LN-payments instead of dealing with channels. But my favourite (CoinPlaza.it) has largely increased the fees for doing so (probably because of on-chain fees). There are similar exchanges around so you might find a better deal again.

However, if you're looking to sell just something, and to instantly convert your LN Bitcoin to on-chain Bitcoin, you're better off just asking for a Bitcoin payment. LN only has benefits if you make multiple transactions to enjoy the low fees.

btcduster
Jr. Member
*
Offline Offline

Activity: 46
Merit: 66

#WeAreAllHodlonaut


View Profile WWW
September 02, 2020, 09:36:19 AM
 #406

It's a little bit more complicated than I thought at first. I will have to read more.
I found it interesting because I want to buy bitcoin to use every day for various small things, as I asked here . There are various places around me that accept cryptocurrencies, which is great.
I think this is the future of finance and I decided to start using it now.
Seems that the LN thing is way out of my league, yet.

Learning about Bitcoin.
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
September 02, 2020, 04:15:37 PM
Merited by LoyceV (7), JayJuanGee (1)
 #407

In order to move the coins back on-chain, you need to close the channel.
<>

However, if you're looking to sell just something, and to instantly convert your LN Bitcoin to on-chain Bitcoin, you're better off just asking for a Bitcoin payment. LN only has benefits if you make multiple transactions to enjoy the low fees.
In order to realize cost benefits of using LN, you must make at least three LN payments, assuming consistent fees, at least 66.67% cost savings per/tx and a non-zero cost of making a LN transaction. If you don't plan on making at least 3 txns, you are probably better off using on-chain txns.

LN channels are really designed to be kept open near infinitely. The cost savings for using LN will increase exponentially as you keep channels open longer, specifically, how many txns you send on a channel (the exponent is very small).
LoyceV
Legendary
*
Offline Offline

Activity: 3360
Merit: 16927


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
September 02, 2020, 04:20:22 PM
 #408

In order to realize cost benefits of using LN, you must make at least three LN payments, assuming consistent fees, at least 66.67% cost savings per/tx and a non-zero cost of making a LN transaction. If you don't plan on making at least 3 txns, you are probably better off using on-chain txns.
I can think of a different scenario: you can open a LN-channel when fees are low, and make a low-fee transaction when you need it at a later moment. Especially when paying for a time-sensitive service this could save you money.
It can fail though: I've had a channel that didn't open because my low-fee transaction took to long to confirm, and when it was closed it did CPFP which lead to a much higher fee.

PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
September 02, 2020, 04:39:49 PM
 #409

In order to realize cost benefits of using LN, you must make at least three LN payments, assuming consistent fees, at least 66.67% cost savings per/tx and a non-zero cost of making a LN transaction. If you don't plan on making at least 3 txns, you are probably better off using on-chain txns.
I can think of a different scenario: you can open a LN-channel when fees are low, and make a low-fee transaction when you need it at a later moment. Especially when paying for a time-sensitive service this could save you money.
It can fail though: I've had a channel that didn't open because my low-fee transaction took to long to confirm, and when it was closed it did CPFP which lead to a much higher fee.
I would not try to time fee rates when deciding the costs/benefits to opening a LN channel. This would be like saying you have a guaranteed way to make money that is you will 'buy low and sell high'. BTC fee rates may rise and fall over time that follow patterns, but these patterns can end or change at any time.
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3132



View Profile
September 02, 2020, 05:02:03 PM
 #410

I would not try to time fee rates when deciding the costs/benefits to opening a LN channel. This would be like saying you have a guaranteed way to make money that is you will 'buy low and sell high'. BTC fee rates may rise and fall over time that follow patterns, but these patterns can end or change at any time.

Do you consider consolidating UTXOs at 1 sat/byte as the same then? If you can save even more money and enjoy instant payments at the same time just by opening your channel at the right moment then I don't see any problem. It appears to me to be as clever as consolidating inputs.
LoyceV
Legendary
*
Offline Offline

Activity: 3360
Merit: 16927


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
September 02, 2020, 05:10:02 PM
 #411

I would not try to time fee rates when deciding the costs/benefits to opening a LN channel.
You don't even have to time it, you can just wait for fees to drop, and then make a transaction. I know this doesn't guarantee anything for the future, but my counter argument would be fees can rise right after broadcasting any Bitcoin transaction.

PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
September 02, 2020, 07:56:58 PM
 #412

I would not try to time fee rates when deciding the costs/benefits to opening a LN channel. This would be like saying you have a guaranteed way to make money that is you will 'buy low and sell high'. BTC fee rates may rise and fall over time that follow patterns, but these patterns can end or change at any time.

Do you consider consolidating UTXOs at 1 sat/byte as the same then? If you can save even more money and enjoy instant payments at the same time just by opening your channel at the right moment then I don't see any problem. It appears to me to be as clever as consolidating inputs.
I would not try to time fee rates when deciding the costs/benefits to opening a LN channel.
You don't even have to time it, you can just wait for fees to drop, and then make a transaction. I know this doesn't guarantee anything for the future, but my counter argument would be fees can rise right after broadcasting any Bitcoin transaction.
When you are sending a payment via LN, you will not need to deal with any type of change output, therefore you will not need to pay anything to consolidate change outputs, ever. When you spend coin on-chain, you will receive a change output, and eventually you will need to pay to consolidate two or more change outputs. If you have enough other coin, you can send a tx to yourself with a low fee, and hope the txn will eventually confirm (it may not). Or you can pay an increased fee (in terms of blockspace) for a txn that has two inputs and two outputs for something you would normally buy, and in this case you generally need to pay a 'market' fee. In both cases, you are incurring costs in addition to what you would 'normally' incur when dealing with on-chain txns.
btcduster
Jr. Member
*
Offline Offline

Activity: 46
Merit: 66

#WeAreAllHodlonaut


View Profile WWW
September 03, 2020, 09:32:20 AM
Merited by ABCbits (1)
 #413

Again I am with a question.
When I open a channel, I only use the coins that are in the channel to move them back and forth. If I want to take out some of the coins that have gathered in the channel, I have to close it and open a new one, right?
Can anyone else fund my channel? For example, Bob and Alice have a channel that is 0.001BTC, can Jack transfer 0.0001 coins to Bob and Alice's channel outside the LN and thus increase the channel volume to 0.0011?
The idea is if someone has to send me BTC he can directly fund my channel.


Learning about Bitcoin.
LoyceV
Legendary
*
Offline Offline

Activity: 3360
Merit: 16927


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
September 03, 2020, 09:42:33 AM
 #414

Can anyone else fund my channel? For example, Bob and Alice have a channel that is 0.001BTC, can Jack transfer 0.0001 coins to Bob and Alice's channel outside the LN and thus increase the channel volume to 0.0011?
As far as I know, this isn't possible.
Quote
The idea is if someone has to send me BTC he can directly fund my channel.
A way around this is to use a custodial wallet. This this morning I asked someone to pay to a Bech32-address that goes straight into my BlueWallet LN balance, and by creating a new LN wallet each time, I can use different addresses for this.
Custodial isn't perfect, but for small amounts I don't mind.

darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
September 03, 2020, 11:58:31 AM
Merited by ABCbits (1)
 #415

Again I am with a question.
When I open a channel, I only use the coins that are in the channel to move them back and forth. If I want to take out some of the coins that have gathered in the channel, I have to close it and open a new one, right?
Can anyone else fund my channel? For example, Bob and Alice have a channel that is 0.001BTC, can Jack transfer 0.0001 coins to Bob and Alice's channel outside the LN and thus increase the channel volume to 0.0011?
The idea is if someone has to send me BTC he can directly fund my channel.
No, this is called splice-in (or out - same but decrease channel capacity). See above, it's theoretically possible but not yet spec'ed.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
September 03, 2020, 10:51:42 PM
Last edit: September 04, 2020, 06:32:48 PM by jackg
 #416

Can anyone else fund my channel? For example, Bob and Alice have a channel that is 0.001BTC, can Jack transfer 0.0001 coins to Bob and Alice's channel outside the LN and thus increase the channel volume to 0.0011?
As far as I know, this isn't possible.
Quote
The idea is if someone has to send me BTC he can directly fund my channel.
A way around this is to use a custodial wallet. This this morning I asked someone to pay to a Bech32-address that goes straight into my BlueWallet LN balance, and by creating a new LN wallet each time, I can use different addresses for this.
Custodial isn't perfect, but for small amounts I don't mind.

I'm trying it with 15p because theoretically it could work and may do so I want to try it... My thought is that for a while therell only be one person funding a channel so it might just be credited but it's unlikely - I'm still just curious though.

I'll post my results if it works but even if it does it might just rely on individual configurations.



Edit: not entirely sure what happened to t, I woke up with about 200 notifications overnight so I don't remember what it said but it said something like "suspicious activity noticed" as a notification from elcair - I think it might have gone through on the other side and my side just refused to sign for it as a security measure.
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3132



View Profile
September 19, 2020, 10:03:15 AM
Merited by ABCbits (1), TryNinja (1)
 #417

All major implementations now support "wumbo". It allows node operators to create and accept channels larger than 0.16777215 BTC and payments larger than 0.04294967 BTC. While the vast majority of users won't "go wumbo", operators of large nodes might benefit from it by having to rebalance their channels less often.

Instructions on how to enable "wumbo": LND, c-lightning, Eclair
j2002ba2
Full Member
***
Offline Offline

Activity: 206
Merit: 447


View Profile
September 19, 2020, 02:15:54 PM
 #418

All major implementations now support "wumbo". It allows node operators to create and accept channels larger than 0.16777215 BTC and payments larger than 0.04294967 BTC. While the vast majority of users won't "go wumbo", operators of large nodes might benefit from it by having to rebalance their channels less often.

Instructions on how to enable "wumbo": LND, c-lightning, Eclair

If I got it correctly payments are still limited to 0.0429 4967 295 BTC (2^32-1 msat).

From BOLT #2, update_add_htlc

Quote
A receiving node:
    • for channels with chain_hash identifying the Bitcoin blockchain, if the four most significant bytes of amount_msat are not 0:
          ○ MUST fail the channel.
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3132



View Profile
September 19, 2020, 02:27:19 PM
Last edit: September 19, 2020, 02:42:40 PM by Rath_
 #419

If I got it correctly payments are still limited to 0.0429 4967 295 BTC (2^32-1 msat).

It might be an LND exclusive feature. See the following quote.

To coincide with this feature, the existing payment limits have been lifted in the payment related RPC calls. The max payment is now bounded by what the reciever can receive, and what the sender can route over using MPP.

Apparently, payments larger than the limit are split into smaller chunks. I am not sure how c-lightning and Eclair would behave in such a situation.
DaveF
Legendary
*
Offline Offline

Activity: 3528
Merit: 6373


Crypto Swap Exchange


View Profile WWW
September 21, 2020, 01:50:27 AM
 #420

If I got it correctly payments are still limited to 0.0429 4967 295 BTC (2^32-1 msat).

It might be an LND exclusive feature. See the following quote.

To coincide with this feature, the existing payment limits have been lifted in the payment related RPC calls. The max payment is now bounded by what the reciever can receive, and what the sender can route over using MPP.

Apparently, payments larger than the limit are split into smaller chunks. I am not sure how c-lightning and Eclair would behave in such a situation.

With the standard, I know to ask on github.
Has anyone had an issue after installing 0.11 of random 100% cpu utilization?
My node just stops and goes to 100% for minutes on end. Then everything goes back to normal.
No funds in it at the moment so I'll probably roll back to 0.10

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21] 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 ... 78 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!