hsjoberg / blixt-wallet

Bitcoin Lightning Wallet with focus on usability and user experience
https://blixtwallet.github.io
MIT License
383 stars 68 forks source link

[Testing / Research] MPP, path finding, payment reliability test #1065

Open Darth-Coin opened 1 year ago

Darth-Coin commented 1 year ago

Description

This is just a research post to follow up all the testing in regards of failed payments with different apps and routes

I open up this discussion to find out what is going on with LN payments made with Blixt and over LN in general. Some payments work, some don't. I put a lot of work into this, testing and trying to understand why it fails and not always. Please add your testing scenarios here and please add all details you can (hardware, software, steps done etc) all these are very important to have the right diagnostic. Seems that is not 100% only Blixt fault but also LND code affect these failed payments. So we are trying to find out and how to fix it.

My tests until now

Environment:

1st Test - testing various levels of amounts

1. Sending / receiving with Blixt:

2. Sending / receiving with OBW/SBW:

3. Sending / receiving with Phoenix:

4. Sending / receiving with Bluewallet:

Electrum, LNTXBOT, LNBits, WoS, CoinOS were used as intermediary destinations (also using LNURL, LN address to test various ways to send payments). I couldn't test with Zeus / CLN node, due to the fact that my testing CLN node was fucked and now I am in re-sync. But I used Zeus for these tests with a lndhub account from LNTXBOT and LNbits. All payments had at least 3 hops and no more than 20 sats in fees/tx, sometimes ridiculous small amounts (I was surprised).

Conclusion

Something is going on with payments sent from Blixt. The weird thing is that is not always and with not all amounts. I will try to repeat this test process in few days again.

Please do your tests if you can or just report here, if you do a normal payment and want to report more insight if you have a failed tx.

niteshbalusu11 commented 1 year ago

In general I have observed path finding issues with not just blixt but any neutrino based node that has only one or very few channels such as my 2nd node connected to Zeus wallet that I use for payments. These nodes have a smaller view of the graph because their source for gossip data is much smaller compared to a regular routing node.

I think mobile wallets in general have to rely on external sources for gossip or path finding for two reasons, speed and reliability. I can think of two solutions where we could improve reliability and speed.

  1. Get gossip from else where such as a big routing node:

Pros:

Cons:

  1. Out source path finding to a routing node:

Pros:

Cons:

IMO I don't think a mobile wallet can do everything by itself and some of its functions have to be outsourced to an external server that does heavy lifting jobs, hard part is how do we balance out speed & reliability with privacy. It's like using Tor vs Clearnet, each has its own upside.

Darth-Coin commented 1 year ago

2nd Test - Sending from Blixt to various destinations

1. Payment A - from Blixt to OBW

2. Payment B - from Blixt to Phoenix

3. Payment C - from Blixt to LNbits.com

4. Payment D - from Blixt to WoS

Darth-Coin commented 1 year ago

3rd Test - refill back the channel in Blixt

1. Payment A - to receive in Blixt

2. Payment B - to receive in Blixt

3. Payment C - from Blixt to WoS

4. Payment D - from SBW to Blixt

5. Payment E - from WoS / Phoenix to Blixt

Darth-Coin commented 1 year ago

4th Test - adding a dunder channel and refill at maximum

1. Payment A - from SBW to Blixt

2. Payment B - from LNbits to Blixt

3. Payment C - from Phoenix to Blixt

4. Payment D - from LNTXBOT to Blixt

Nice to see that Blixt is showing in real time how the partial amounts are coming and HTLCs pending, during the payment intent. LNTXBOT was trying to send the payment in multiple shards.

image

5. Payment E - from another Blixt to Blixt

6. Payment F - from LNbits.com to Blixt

7. Payment G - from LNbits.com to Blixt

image

image

What is interesting is that it shows the commit fee going high with 5 HTLCs, meanwhile the available "can receive" go down to 2248 sats. That means will never be possible to refill a channel at maximum. So that "can receive" is not true!

8. Payment H - several pushes from different sources towards Blixt to fill up totally

Mentions:

Eternumkr commented 1 year ago

Test Blixt wallet path finding capabilities number 1.

Environment.

Phones used; Redmi Note 9 with Blixt Wallet (V0.6.0-No-strict-graph) Samsung Note 10+ 5G with Blixt Wallet (V0.6.0-No-strict-graph) Bluestacks emulator(Pixel 6) with Blixt Wallet (V0.6.0-No-strict-graph) & Blixt Wallet (V0.6.1) Realme C11 2021 with Blixt Wallet (V0.6.1)

Blixt versions used;

Blixt Wallet (V0.6.0-No-strict-graph) Blixt Wallet (V0.6.1)

-MPP was set to 16 parts max (whatever setting that is in Blixt on or off) -Single channel in each Blixt wallet

Payment A.

Blixt Wallet (V0.6.0-No-strict-graph) to Blixt wallet Blixt Wallet (V0.6.0-No-strict-graph) Near instant Channels to the same Parent node Tested up to 2M sats with 100% successes

Payment B.

Blixt Wallet (V0.6.0-No-strict-graph) to Blixt wallet Blixt Wallet (V0.6.0-No-strict-graph) Near instant <2 hop to destination Tested up to 2M sats with 100% success China phone or not payments still work

Payment C.

Blixt Wallet (V0.6.0-No-strict-graph) to Breez (latest release) Near instant Same parent node Tested up to 1M sats with 100% success

Payment D.

Blixt Wallet (V0.6.0-No-strict-graph) to WoS (latest release) Within 25-30 seconds <4 hops Tested up to 100k sats with 100%. china phones again are slower. lol

Payment E.

Blixt Wallet (V0.6.0-No-strict-graph) to OBW (V0.1.6) Near instant <2 Hops Tested up to 200k sats with 100%

Payment F.

Blixt Wallet (V0.6.0-No-strict-graph) to Lnbits Near instant <2 hops Tested up to 150k sats with 100%

Payment G.

Blixt Wallet (V0.6.0-No-strict-graph) to Blixt Wallet (V0.6.1) within 5 seconds <5 hops. Tested up to 100k sats with 100%

Payment H.

Blixt Wallet (V0.6.0-No-strict-graph) to Lnbits.com within 15-25 seconds <4 hops tested up to 150k sats

Notes;

Blixt Wallet (V0.6.1) had 2 time outs while performing the reverse payment from the paying Blixt wallet while all larger amounts above 40k sats failed. also another note is a payment to WoS from Blixt V0.6.1 of 150k sats was also successful. OBW also couldnt pay 100k sats to Blixt Wallet (V0.6.0-No-strict-graph) while connected to same parent node. I did not look further into this and continued with my testing. also china phones are slow... thats about it. lol

Darth-Coin commented 1 year ago

5th Test - Forcing MPP through 2 channels - Blixt to Blixt

Proceedings:

Payment A - test with MPP ON

Payment B - test with MPP off

Payment C - test with MPP ON

Payment D - test with MPP ON

Payment E - test with MPP ON

image

Payment F - test with MPP ON to empty the channels

Asi0Flammeus commented 1 year ago

Feedback from a Robosater

LN Channels

Use case

Most of my tx are with Robosats and Boltz nodes. As a rule of thumb, I tend to open channel with a capacity with an order of magnitude higher than my medium size tx. And also I prefer to have at least 2 high capacity channel, as one can be idle it would not bother me. Works like a charm with this config.

Darth-Coin commented 1 year ago

6th Test - Circular payments OBW - Blixt A - Blixt B

Payment A - OBW -> Blixt A (small amount)

Payment B - OBW -> Blixt A (medium amount)

Payment C - OBW ->Blixt A (bigger amount)

Payment D - OBW -> Blixt A (left overs)

Restarted both apps, to take a new graph sync

Payment E - OBW -> Blixt A (pushing to the limits)

Restarted both apps, to take a new graph sync

Payment F - OBW -> Blixt A (forcing to fill up ch.B)

image

Bashy commented 1 year ago

I personally have many issues when sending from Phoenix (from amount like 12000~15000 sats) to Blixt/OBW/LNBits(my instance, it's working with a Cliché node) even after raising the fee limits, where from OBW or my hosted LNBits/Cliché(HC), and also from custodian services, I often don't have any issue to send from.