Pages:
Author

Topic: Electrum Lightning Network walkthrough - page 6. (Read 4930 times)

legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
September 03, 2020, 08:04:43 AM
#63
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 up to two weeks (2016 blocks). Most channels can be force-closed with a 144 block (~1 day) delay. In both cases, you won't be able to specify the closing transaction fee. Other implementations have such a feature.

Are these block numbers also arbitrarily chosen by Electrum or are they part of the LN protocol? It doesn't make sense to me why parties need to wait for 144 or 2016 blocks to get back their funds. These are real mainnet blocks, and the funds are in a multisig wallet, so by my intuition the funds should arrive in the first block that contains the closing transaction.

Also, do these numbers only apply to force-closed channels? So in that case 144 blocks is the usual delay and 2016 is the maximum, right?
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
August 20, 2020, 11:00:02 PM
#62
Hello! I'm trying to figure out where are lightning related web API methods in ElectrumX
Shouldn't it be Electrum since it acts as the lightning node, not the server?

If that's the case, this might be the one you're looking for: https://electrum.readthedocs.io/en/latest/merchant.html#lightning-payments.
newbie
Activity: 1
Merit: 0
August 20, 2020, 09:53:12 AM
#61
Hello! I'm trying to figure out where are lightning related web API methods in ElectrumX
Can't find it here
https://electrumx.readthedocs.io/en/latest/protocol-methods.html
Where should I search for them?
jr. member
Activity: 43
Merit: 2
August 20, 2020, 03: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
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
August 19, 2020, 11:03:10 PM
#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.
legendary
Activity: 1876
Merit: 3132
August 19, 2020, 02: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?
jr. member
Activity: 43
Merit: 2
August 19, 2020, 11:06:47 AM
#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



legendary
Activity: 1876
Merit: 3132
August 12, 2020, 05:32:09 PM
#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.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
August 09, 2020, 05: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+.
sr. member
Activity: 408
Merit: 250
August 06, 2020, 10:50:40 PM
#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.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
August 06, 2020, 10:13:27 PM
#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.
sr. member
Activity: 408
Merit: 250
August 06, 2020, 10:08:56 PM
#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.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
August 06, 2020, 09:43:41 PM
#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.
sr. member
Activity: 408
Merit: 250
August 06, 2020, 09:36:53 PM
#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.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
July 31, 2020, 10:17:10 PM
#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.
member
Activity: 138
Merit: 20
July 31, 2020, 12:06:51 PM
#48
@arorts:

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

best regards    
member
Activity: 138
Merit: 20
July 31, 2020, 04: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 
member
Activity: 138
Merit: 20
July 30, 2020, 09:53:20 AM
#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  
member
Activity: 138
Merit: 20
July 30, 2020, 04: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 
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
July 29, 2020, 11:33:18 PM
#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.
Pages:
Jump to: