Bitcoin Forum
April 25, 2024, 01:45:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 6 7 8 9 »  All
  Print  
Author Topic: Electrum Lightning Network walkthrough  (Read 4783 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. (4 posts by 1+ user deleted.)
wchancao
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
July 20, 2020, 11:05:24 PM
 #21

I searched this node on 1ml.com and it only have my channel open, that's why my payments didn't found a path...  Grin Grin Grin

So, now i want to close this channel, but whats the difference between "Close channel" and "Force-close channel"?
1714052757
Hero Member
*
Offline Offline

Posts: 1714052757

View Profile Personal Message (Offline)

Ignore
1714052757
Reply with quote  #2

1714052757
Report to moderator
1714052757
Hero Member
*
Offline Offline

Posts: 1714052757

View Profile Personal Message (Offline)

Ignore
1714052757
Reply with quote  #2

1714052757
Report to moderator
1714052757
Hero Member
*
Offline Offline

Posts: 1714052757

View Profile Personal Message (Offline)

Ignore
1714052757
Reply with quote  #2

1714052757
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714052757
Hero Member
*
Offline Offline

Posts: 1714052757

View Profile Personal Message (Offline)

Ignore
1714052757
Reply with quote  #2

1714052757
Report to moderator
1714052757
Hero Member
*
Offline Offline

Posts: 1714052757

View Profile Personal Message (Offline)

Ignore
1714052757
Reply with quote  #2

1714052757
Report to moderator
1714052757
Hero Member
*
Offline Offline

Posts: 1714052757

View Profile Personal Message (Offline)

Ignore
1714052757
Reply with quote  #2

1714052757
Report to moderator
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 20, 2020, 11:12:42 PM
 #22

So, now i want to close this channel, but whats the difference between "Close channel" and "Force-close channel"?

You should use "Force-close" only when the other party hasn't been online for some time. As a counter-cheat measure, the closing transaction will be delayed by a week so that the other party has enough time to verify if an old state of the channel was not published. If you use "Close channel" then a cooperative channel closure occurs and the closing transaction is broadcast instantly.
wchancao
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
July 20, 2020, 11:43:06 PM
 #23

I was reading your guide again, and got two doubts, first one:


- Lightning funds cannot be restored from seed. You need to perform backups ('File -> Save backup'). You have to make a new backup every time you open a new channel. Backups will forcefully close channels,


That means that if I backup a new channel, all other channels will be force-closed?

And the second one: if the funding transaction gets confirmed after 24 hours, channel will not be created but funds will be locked/lost? I mean, how does the mempool knows that this transaction is for opening a channel, and that after 24 hours is not going to be valid/useful? Can a transaction auto-remove itself from the mempool after a period of time? I don't know if this is a crazy question...  Grin
Chikito
Legendary
*
Offline Offline

Activity: 2366
Merit: 2052



View Profile WWW
July 21, 2020, 12:12:04 AM
 #24

I'll switch to sats and let you know if it was that silly detail...  Cheesy
Solved?

I searched this node on 1ml.com and it only have my channel open, that's why my payments didn't found a path...  Grin Grin Grin
try to suggest electrum channel at a different time.

next time, try to insert picture and log in your post. it could make it easier for member analysing your problem


.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
wchancao
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
July 21, 2020, 12:16:24 AM
 #25

I'll switch to sats and let you know if it was that silly detail...  Cheesy
Solved?

I searched this node on 1ml.com and it only have my channel open, that's why my payments didn't found a path...  Grin Grin Grin
try to suggest electrum channel at a different time.

next time, try to insert picture and log in your post. it could make it easier for member analysing your problem



Got it! Thanks!
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 21, 2020, 12:36:15 AM
 #26

That means that if I backup a new channel, all other channels will be force-closed?

There are two types of channel backups in Electrum. The first one ('File -> Save backup') backs up only information required to reestablish the connection with the other party and request a forced channel closure. This kind of backup is called a Static Channel Backup. Data-loss protection discourages the other party from providing the old state of the channel. The second method is backing up each channel individually. Apparently, such backups contain the latest commitment state of the channel so a force-close is not required.

And the second one: if the funding transaction gets confirmed after 24 hours, channel will not be created but funds will be locked/lost?

The funds definitely are not going to be locked/lost. I will let you know in the morning after I have reviewed the code. If anyone is interested then search for "CHANNEL_OPENING_TIMEOUT" variable.

Can a transaction auto-remove itself from the mempool after a period of time?

No. Most nodes will drop any transaction stuck in the mempool after 2 weeks. However, even if a transaction is dropped, someone could rebroadcast it at any time and it would be still valid as long as the UTXOs used in that transaction haven't been spent.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5531


Self-proclaimed Genius


View Profile
July 21, 2020, 01:30:31 AM
 #27

-snip-
Yes, im thinking its the remote node problem, i'll try opening another channel with one of ACINQ's node... i'll let you know how that goes... Which other nodes do you recommend? Thanks for your time and answers!
Try Node: aranguren.org.
I can't vouch for the privacy/security but it's reliable enough, the good thing is they still haven't force-closed my long-opened channel unlike others.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
wchancao
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
July 21, 2020, 10:53:46 PM
 #28

What happens if a closing channel tx is not confirmed and after 2 weeks the nodes drop the tx? The channel state changes to OPEN again?
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5531


Self-proclaimed Genius


View Profile
July 22, 2020, 06:24:41 AM
 #29

What happens if a closing channel tx is not confirmed and after 2 weeks the nodes drop the tx? The channel state changes to OPEN again?
That's very hard to answer since it never happened to me; perhaps if someone experienced this, he can leave a reply on what happened.

My guesses based from the code: there's no transition from "CLOSING"/"FORCE-CLOSING" to "OPEN" so it's a no.
Channel State Transitions: https://github.com/spesmilo/electrum/blob/master/electrum/lnchannel.py#L98-L126

If it was force-closed by the other party, it will remain open in your client since there's no confirmed closing transaction.
Channel States (read the comments): https://github.com/spesmilo/electrum/blob/master/electrum/lnchannel.py#L83-L85

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 26, 2020, 09:01:06 AM
 #30

What happens if a closing channel tx is not confirmed and after 2 weeks the nodes drop the tx? The channel state changes to OPEN again?

That should never happen. As I said a few posts above, even if a transaction is dropped, it could be broadcast again. Since channels' on-chain balance changes only on their opening and closure, the dropped closing transaction would be still valid. In a case of cooperative closure, both nodes should keep broadcasting the closing transaction or sign a new transaction with a higher fee. If the channel continued to operate normally, someone would eventually lose money once the closing transaction has been confirmed.
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 27, 2020, 05:57:56 PM
Last edit: July 27, 2020, 10:53:29 PM by moejoejay
 #31

Electrum: 4.02


i create an Payment Channel but the transfer was canceled from the opposite ( just the process during a phone call not the bitcoin transaction in any way ) , so i tried to close the channel after 30 min. of creating in the state of none confirmed.

and now the channel ist still in Status "Shutdown". so how long will it take to get the funds back ?


best regards




 


nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5531


Self-proclaimed Genius


View Profile
July 28, 2020, 05:20:45 AM
Merited by Rath_ (2)
 #32

and now the channel ist still in Status "Shutdown". so how long will it take to get the funds back ?
There should be an unconfirmed 'close channel' transaction in your history, you'll get the funds back after it confirms.

But is there an 'open channel' transaction in your history and, was your on-chain balance reduced?
Because the way you described it: there's no opening transaction occurred.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 28, 2020, 08:44:20 AM
Last edit: July 28, 2020, 09:01:43 AM by moejoejay
 #33

In the History there is no Closed channel only the "open channel" highlighted in red.

I tried to explore the channel on https://1ml.com/ over the channel id but i havent found anything.

The Node ID is: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

After i created the channel the channel-transaction was proceseed but without an confirm ( the fee for the channel was not so high for an immediately  confirmation for it).

Edit: This is the transaction (Funding-Transaktion) to establish the  payment channel: https://blockstream.info/tx/dad4361ab2edaca663b76047f345e54576d600640b65e0e93531c738269486b0

best regards

 



moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 28, 2020, 10:03:07 AM
 #34

@arorts:

did u get ur funds back ?

i think my problem is really similar but  i havent tried the force close option.. not yet

best regards  
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 28, 2020, 10:10:27 AM
 #35

In the History there is no Closed channel only the "open channel" highlighted in red.

Can you post a screenshot of it? I am not sure what the red highlight means. "Force-close" should work for you, but you will have to wait at least 1 week before the closing transaction is confirmed. Can you see "Close" too?

I tried to explore the channel on https://1ml.com/ over the channel id but i havent found anything.

Electrum creates private channels which are not discoverable by such explorers.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5531


Self-proclaimed Genius


View Profile
July 28, 2020, 01:29:16 PM
Merited by Rath_ (1)
 #36

In the History there is no Closed channel only the "open channel" highlighted in red.
Can you post a screenshot of it? I am not sure what the red highlight means. -snip-
It's probably the label of the transactions in the history, it's red if the funds is outgoing.
"Open channel" of course is colored red.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 28, 2020, 06:23:57 PM
Last edit: July 29, 2020, 10:49:34 AM by moejoejay
 #37

i'm going to take an force channel shutdown

neverthless thanks for guidance from yours

next time i'm trying testnet first.

edit:

i've started the force closing process and i think it works.

best regards


 
wchancao
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
July 29, 2020, 11:40:46 AM
 #38

Hello, if someone wants to open a channel with me, what info does he need from me (node id, pub key?) and where do i get that info in electrum?
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 29, 2020, 02:15:16 PM
Last edit: July 29, 2020, 03:24:58 PM by moejoejay
 #39

i tried a 2nd time on testnet and i tried to establish an payment with an opened channel but i doesnt't work

Steps:

Create 2 Electrum LN Wallets
Sent test coins to wallet1

Wallet1: create an payment channel with enough funds to spent.
Wallet2: create an invoice.

Wallet1: Send the invoice for Wallet2 over lightning.

Result:  Error Message: Path not found.

Then i found an other way for testing

Using this site: https://starblocks.acinq.co/  this is an virtual starbucks coffe shop  ( thnx to @nc50lc )

And this transaction works everytime i've tried so far

so, whats wrong with my own testing structure with the 2 electrum wallets ?  

best regards


Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 29, 2020, 04:54:09 PM
 #40

Hello, if someone wants to open a channel with me, what info does he need from me (node id, pub key?) and where do i get that info in electrum?

You can get your node's id by typing "nodeid()" in the Console. You can enable it in "View -> Show Console". Check out this reddit post for more instructions on getting an inbound channel from lnbig. I am not sure about how you can make it work for other nodes. Ask the other node to open a channel with you using your node's id after you connect to their node from the console.

so, whats wrong with my own testing structure with the 2 electrum wallets ?

Are both of these wallets connected to the same node? Are they open at the same time? Did you spend some of the coins from the second wallet in order to make space for incoming funds?
Pages: « 1 [2] 3 4 5 6 7 8 9 »  All
  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!