Bitcoin Forum
December 12, 2024, 12:39:22 PM *
News: Latest Bitcoin Core release: 28.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 4940 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.)
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 29, 2020, 07:32:56 PM
 #41

Quote
Are both of these wallets connected to the same node?

i thought i need only one wallet with an payment channel  cause the 2cnd wallet is connected as an peer over the lightning nodes and so also with the channel  ?.
am i wrong ?

Quote
space for incoming funds?

where i am able to check that i have enough space for incoming funds ? 

best regards

 
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
July 29, 2020, 08:20:59 PM
 #42

i thought i need only one wallet with an payment channel  cause the 2cnd wallet is connected as an peer over the lightning nodes and so also with the channel  ?.

The second wallet also needs to have an open channel with some node. Both of your wallets need to be online and the receiving wallet needs to have some inbound capacity (check the answer below). You seem to be a little confused about what the Lightning Network is. This video might help you.

where i am able to check that i have enough space for incoming funds ?  

I have described it in the fourth point of the walkthrough. If you don't have any inbound capacity then you have to spend some coins over the Lightning Network.
arorts
Sr. Member
****
Offline Offline

Activity: 408
Merit: 250


View Profile
July 29, 2020, 09:20:00 PM
 #43

Channels time out if the funding transaction is not confirmed within 24 hours so you can leave it be. I am not sure how a force-close would behave in this situation. Theoretically, it shouldn't have any impact on your wallet since you didn't sign the funding transaction.

At the moment, the channel status remains unchanged as "reestablishing" so I tried to force close (it warned me it'd take up to 600 blocks to get funds back) but it ultimately failed as it threw this error:

https://imgur.com/a/1HghOwk

It seems as if unsigned Txs have a longer time lock than signed Txs so I guess I shouldn't have to wait longer than 600 blocks to report back my findings.


Wow!. It's been over a month and still I see locked coin in a LN channel from a transaction I created but didn't ultimately sign.

How come the channel status keeps saying "reestablishing" after so long without automatically unlocking it??

I applied freeze sending. I then tried to force-close it but it failed: "bad-txns-inputs-missingorspent"

Any pointers?  Embarrassed
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
July 30, 2020, 04:33:18 AM
 #44

I applied freeze sending. I then tried to force-close it but it failed: "bad-txns-inputs-missingorspent"

Any pointers?  Embarrassed
If the locktime (height or time) is still not reached, the error message alongside with the server error should be "non-final".

That looks like a missing input error which was caused by trying to double-spend a already spent output or not-existed at all;
Can you check your wallet for possible closing transaction that wasn't labeled?
Paste the "open channel" transaction's TXID (in a block explorer) and check the non-change address output if it's already spent.
Also check if it was sent to one of your own wallet's addresses.

If there's no "open channel" transaction, perhaps there's no established channel to begin with.

How come the channel status keeps saying "reestablishing" after so long without automatically unlocking it??
If it didn't see a confirmed closing transaction, it won't transition to "Closed" but rather stay "Open"
and "Reestablishing" is a state based from the other peer of the open channel, means the channel is open but trying to re-connect to the other LN node.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 30, 2020, 09:00:19 AM
 #45

@bitcryptex:

Quote
The second wallet also needs to have an open channel with some node

Thats not mentioned in any way in ur walkthrough. Or I'm to blind to see

 
Quote
This video might help you.

thnx for it

 
Quote
If you don't have any inbound capacity then you have to spend some coins over the Lightning Network.

u right here i've found some additional options to gain inbound capacity: 

https://medium.com/lightningto-me/practical-solutions-to-inbound-capacity-problem-in-lightning-network-60224aa13393

best regards 
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 30, 2020, 02:53:20 PM
Last edit: July 31, 2020, 09:58:03 AM by moejoejay
 #46

Update:

My Bitcoin Realnet Channel which ive closed is fully closed yesterday , so approx 1 Day for Force-Shutdown.

 
I made one Transaction in Testnet successfully, but it seems a little bit of gambling. Mostly the comes the message "Payment Failed after 10 Attempts"

I got this, with Payment Channels from aranguren.org on both Wallets.

Update:
So either the LN-Network Routing is so buggy or it's an error caused by Electrum

dont know

best regards  
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 31, 2020, 09:57:19 AM
 #47

ok i have have to correct sth. 

it seems that my understanding about balance and inbound capacity is not as good as is thought.
good explanation here: https://blog.muun.com/the-inbound-capacity-problem-in-the-lightning-network/

in electrum i can see the availiable amount for sending an recievung from all channels capacity  on the top of the interface

and now almost all transfers in the testnet are working

thanks so far for this tut which brings me further

best regards 
moejoejay
Member
**
Offline Offline

Activity: 138
Merit: 20


View Profile
July 31, 2020, 05:06:51 PM
 #48

@arorts:

did ur channels closing ?  my ones reopended  after a period of time with the status "redeemed".

best regards    
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
August 01, 2020, 03:17:10 AM
 #49

did ur channels closing ?  my ones reopended  after a period of time with the status "redeemed".
Sorry to barge in but "redeemed" means that the fund is now spendable not a re-opened channel.
When you force-close a channel, it will create an "our_ctx_to_local" transaction that spends the closing transaction,
it can't be broadcast until a number of blocks (shown in the transaction history) has passed and will automatically broadcast if Electrum is open.

I applied freeze sending. I then tried to force-close it but it failed: "bad-txns-inputs-missingorspent"

Any pointers?  Embarrassed
If there's no "open channel" transaction, perhaps there's no established channel to begin with.
Update to this: I've experienced this just now when I tried to open a channel with another instance of Electrum while another is opening a channel.
The error message is "Assertion error" then a "Disconnected" channel was created with reflected Lightning balance but the on-chain balance wasn't deducted.
There's no "Open channel" transaction either.

When I tried to Close the channel, it just returned with an error (as expected) and the status changed to "shutdown".
When I tried to force-close the "Shutdown" channel, it returns with the same error as yours since there's no valid input.
I tried to reproduce it trice and the "bugged LN funds" reached 0.06 tBTC while my original onchain funds is only 0.02 tBTC and it wasn't spent.

So your LN funds must be a bug to begin with if there's no "Open channel" in your history.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
arorts
Sr. Member
****
Offline Offline

Activity: 408
Merit: 250


View Profile
August 07, 2020, 02:36:53 AM
 #50

I applied freeze sending. I then tried to force-close it but it failed: "bad-txns-inputs-missingorspent"

Any pointers?  Embarrassed
If the locktime (height or time) is still not reached, the error message alongside with the server error should be "non-final".

That looks like a missing input error which was caused by trying to double-spend a already spent output or not-existed at all;
Can you check your wallet for possible closing transaction that wasn't labeled?
Paste the "open channel" transaction's TXID (in a block explorer) and check the non-change address output if it's already spent.
Also check if it was sent to one of your own wallet's addresses.

If there's no "open channel" transaction, perhaps there's no established channel to begin with.

How come the channel status keeps saying "reestablishing" after so long without automatically unlocking it??
If it didn't see a confirmed closing transaction, it won't transition to "Closed" but rather stay "Open"
and "Reestablishing" is a state based from the other peer of the open channel, means the channel is open but trying to re-connect to the other LN node.

There's an "Open channel" entry in History. However, the transaction ID doesn't show up in the blockchain after trying to explore it. (  I abandoned the attempt to open channel with the merchant and I did not sign the transaction so that's perhaps the reason of missing input).

How could I retrieve my locked funds? It's been forever in locked state.
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
August 07, 2020, 02:43:41 AM
 #51

There's an "Open channel" entry in History. However, the transaction ID doesn't show up in the blockchain after trying to explore it. (  I abandoned the attempt to open channel with the merchant and I did not sign the transaction).

How could I retrieve my locked funds? It's been forever in locked state.
If it's not showing in the blockchain, then perhaps it's saved as a "local transaction"
since the server where you're connected to won't see it in its database nor mempool, it will change into "local" from unconfirmed/others.

The funds should be restored by removing the local transaction from the history (right-click->remove) or read the next sentence.
For the channel (or funds), I still haven't found a way to remove those "bugged channels" that I've created in testnet
but if there's no other active channels in your wallet, you can just create another wallet by restoring your wallet's seed phrase.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
arorts
Sr. Member
****
Offline Offline

Activity: 408
Merit: 250


View Profile
August 07, 2020, 03:08:56 AM
 #52

There's an "Open channel" entry in History. However, the transaction ID doesn't show up in the blockchain after trying to explore it. (  I abandoned the attempt to open channel with the merchant and I did not sign the transaction).

How could I retrieve my locked funds? It's been forever in locked state.
If it's not showing in the blockchain, then perhaps it's saved as a "local transaction"
since the server where you're connected to won't see it in its database nor mempool, it will change into "local" from unconfirmed/others.

The funds should be restored by removing the local transaction from the history (right-click->remove) or read the next sentence.
For the channel (or funds), I still haven't found a way to remove those "bugged channels" that I've created in testnet
but if there's no other active channels in your wallet, you can just create another wallet by restoring your wallet's seed phrase.

Seems like "history" is just a descriptive log.  I just removed the entry from History and that didn't make any difference as funds are still locked.
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
August 07, 2020, 03:13:27 AM
 #53

Seems like "history" is just a descriptive log.  I just removed the entry from History but that didn't seem to make any difference and funds are still locked.
Like I've said above (Post #50), the lightning funds below must be a "bug" and there's no on-chain funds deducted.
And upon deleting the local transaction in the history, your non-spendable UTXO(s) should be available again.

I have tried to tinker the wallet file (testnet), I've found out that you can manually remove those bugged channels by removing the "channel backup" entry in the wallet file.
But that's quite dangerous if you don't know what you're doing so, restoring the seed should be enough if there no active channels in your wallet.

Here's the the important part (quoting myself):
I tried to reproduce it trice and the "bugged LN funds" reached 0.06 tBTC while my original onchain funds is only 0.02 tBTC and it wasn't spent.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
arorts
Sr. Member
****
Offline Offline

Activity: 408
Merit: 250


View Profile
August 07, 2020, 03:50:40 AM
 #54

Seems like "history" is just a descriptive log.  I just removed the entry from History but that didn't seem to make any difference and funds are still locked.
Like I've said above (Post #50), the lightning funds below must be a "bug" and there's no on-chain funds deducted.
And upon deleting the local transaction in the history, your non-spendable UTXO(s) should be available again.

I have tried to tinker the wallet file (testnet), I've found out that you can manually remove those bugged channels by removing the "channel backup" entry in the wallet file.
But that's quite dangerous if you don't know what you're doing so, restoring the seed should be enough if there no active channels in your wallet.

Here's the the important part (quoting myself):
I tried to reproduce it trice and the "bugged LN funds" reached 0.06 tBTC while my original onchain funds is only 0.02 tBTC and it wasn't spent.

Cool. I restored my wallet and it's now all back to normal. Thank you.
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
August 09, 2020, 10:30:55 AM
 #55

Closing a channel

Closing a channel is really simple. Go to the 'Channels' tab, right-click on the channel you want to close and select 'Close channel'. You should use 'Force-close channel' only if the other party is offline. In such a case, you will get your funds back after one week. In both cases, you won't be able to specify the closing transaction fee. Other implementations have such a feature.
@BitCryptex I think it will only need an average of 1 day to retrieve the funds in case of force-closure.
I've tried to force close mine and according to this:


It will only require 144blocks = 1day (for 10min/block) to broadcast the saved "our_ctx_to_local" transaction.
And it did automatically broadcast after a day+.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
August 12, 2020, 10:32:09 PM
Last edit: August 12, 2020, 10:54:22 PM by BitCryptex
 #56

@BitCryptex I think it will only need an average of 1 day to retrieve the funds in case of force-closure.

Thank you. Electrum apparently matches other node's CSV delay as long as it is less than 2016 blocks. One week is the default value which I am not sure in what case is used. Most channels can be force-closed with a 144 block (~1 day) delay.
DigitalMonster
Jr. Member
*
Offline Offline

Activity: 43
Merit: 2


View Profile
August 19, 2020, 04:06:47 PM
 #57


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.

It also doesn't work to open a channel between your two test wallets, writes this error



Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
August 19, 2020, 07:01:14 PM
 #58

It also doesn't work to open a channel between your two test wallets, writes this error

Could you change your language to English in the Electrum settings and post the screenshot again?
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
August 20, 2020, 04:03:10 AM
 #59

It also doesn't work to open a channel between your two test wallets, writes this error
http://savephoto.ru/f/82zy4rkw51sk19
It looks like the same error as this:
electrum.lnutil.ConnStringFormatError: Don't know any addresses for node: ******
I got that when I tried to open a channel between two Electrum wallets.

That's probably because Electrum's channels are private.

█▀▀▀











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











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

Activity: 43
Merit: 2


View Profile
August 20, 2020, 08:10:29 AM
 #60

It also doesn't work to open a channel between your two test wallets, writes this error
http://savephoto.ru/f/82zy4rkw51sk19
It looks like the same error as this:
electrum.lnutil.ConnStringFormatError: Don't know any addresses for node: ******
I got that when I tried to open a channel between two Electrum wallets.

That's probably because Electrum's channels are private.
Yes i tried to open a channel between two Electrum wallets. How I can open channels between wallets ?

while there is no own mine node, there is no sense to open in LN and pay huge fees there, now I send payments when there is no rush in the network for 1 satosh byte, and when there is a rush I use bitcoin cache for this. I want to start saving on LN by offering my clients to open private channels to my wallet
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!