Let’s create a routing LND node, part 5 - Some successes

Series: Let’s create a routing LND node

Supporting this series

If you want to support this series, you can:

  • Use tippin.me to send me a tip.
  • Use Tootmoney to ask for a Lightning invoice. On Mastodon, just send a toot like ‘@OpinionatedGeek #TootMoney #send 10000’ to have it reply with an invoice QR code.
  • Send bitcoin to this address: bc1qsaampnjm5ykcpd40pstcewt75xrtfy5cxpnpdf

A successful loop out

Just before I headed out for the day yesterday I tried one more loop out.

$ loop out --channel 631655136611991552 --amt 500000

Max swap fees for 500000 Loop Out: 40057

CONTINUE SWAP? (y/n), expand fee detail (x): y

Swap initiated

ID: e168733a5e1eeef82ff0b5bfc82bef4f8b566014655ca19bb2f131ce4f5aba56

HTLC address: bc1qhvqhzhqr449qu0qe9sw9vlauyh3w75q3dzup89zue60uc9dz2tgs8j4pej

It succeeded!

2019-05-04T11:08:05Z LOOP_OUT SUCCESS 0.005 BTC - bc1qump0rxpmmxdgu5m86cclvts9mum5e987saxw832hy82wpyakrrzs0wxwm8

I guess any payment that goes through Lightning can be subject to transient problems.

Anyway, getting 500,000sats liquidity on my channel with ln1.satoshilabs.com cost me about a max of $2.29.

First payment routing

I routed a payment!

I wasn’t expecting this to happen quite so soon, given the lack of balancing, but I routed a payment!

$ lncli fwdinghistory

{

"forwarding_events": [

{

"timestamp": "1556970764",

"chan_id_in": "631605658598703105",

"chan_id_out": "631590265456623616",

"amt_in": "96416",

"amt_out": "96415",

"fee": "1",

"fee_msat": "1096"

}

],

"last_offset_index": 1

}

So it came in on channel ID 631605658598703105 (node name: ‘03f175627ecd2b736fdd’) and went out on channel 631590265456623616 (node name: ‘rompert.com🔵‘) and it earned me just over 1 satoshi - or $0.0000572695 at today’s prices. Not much but it’s a start!

Mystery channel

Speaking of my channel with node ‘03f175627ecd2b736fdd’, when I try to move funds to the channel I didn't open, I still get the error:

$ lntoolkit move-balance --from 631655136611991552 --to 631605658598703105 --amount 500000

2019/05/05 11:32:52 🚨 Exiting with error: finding 'To' edge: could not find ChannelEdge with channel ID '631605658598703105'

After much too long, I realised that it’s a private channel (erm, sorry for disclosing it if that’s a problem for whoever opened it here but the cat was out of the bag yesterday and I did say I was going to be transparent...)

So it looks like this is a bug in lntoolkit, that it won’t work with private channels right now. I guess I’d assumed that the channel graph would contain all the edges my node knows about, not just all the public edges. I guess there’s a good reason for the current behaviour though, so I’ll need to find a way for lntoolkit to work around it - it shouldn’t place an unnecessary restriction on the --to or --from channels being public.

More loops

Trying today I had more success with loop. I figured as a starting point I’d try to loop out about 50% of the funds in my filled channels and see how many succeeded. Most did.

$ loop out --channel 631590265456623616 --amt 500000

Max swap fees for 500000 Loop Out: 39322

CONTINUE SWAP? (y/n), expand fee detail (x): y

Swap initiated

ID: 347936a5efb471480bbe68299c35dd36f2e771a799a8ff0b195f99c7a7d3605e

HTLC address: bc1q20zwdanaskwdzfmmvhxvf06deskwksrzauja8ar8wznzfrxpxf4sv8n2zt

2019-05-05T10:55:18Z LOOP_OUT SUCCESS 0.005 BTC - bc1q20zwdanaskwdzfmmvhxvf06deskwksrzauja8ar8wznzfrxpxf4sv8n2zt

$ loop out --channel 631590265456689152 --amt 500000

Max swap fees for 500000 Loop Out: 39322

CONTINUE SWAP? (y/n), expand fee detail (x): x

Max on-chain fee: 19845

Max off-chain swap routing fee: 10010

Max off-chain prepay routing fee: 382

Max swap fee: 9085

Max no show penalty: 18618

CONTINUE SWAP? (y/n): y

Swap initiated

ID: 0e55ea5f2e6b3074b92f7fe088793630701d92b9a5027621f3caca62ce2142e7

HTLC address: bc1q6x8sh92wmv06r5gncpkd2jhxlvtjv9rl6rup5kgrxr3z4zm6udtsyuamg8

2019-05-05T11:21:38Z LOOP_OUT SUCCESS 0.005 BTC - bc1q6x8sh92wmv06r5gncpkd2jhxlvtjv9rl6rup5kgrxr3z4zm6udtsyuamg8

$ loop out --channel 631563877105729536 --amt 500000

Max swap fees for 500000 Loop Out: 39322

CONTINUE SWAP? (y/n), expand fee detail (x): y

Swap initiated

ID: c9827ffdf522043d7868e9a19f40e90eaf1b8b5036d64df8de3db1b038951bd8

HTLC address: bc1qm2ch45yyqxkme3qwgcyuqep3gnqq902lcjz2tged7ylunt23l5eqjv67hc

2019-05-05T11:50:04Z LOOP_OUT SUCCESS 0.005 BTC - bc1qm2ch45yyqxkme3qwgcyuqep3gnqq902lcjz2tged7ylunt23l5eqjv67hc

$ loop out --channel 631655136611991552 --amt 500000

Max swap fees for 500000 Loop Out: 39322

CONTINUE SWAP? (y/n), expand fee detail (x): y

Swap initiated

ID: 3eee2a2ff40d5c7570da9a72579cdfa41ea71194539a8d2c2045402833f594af

HTLC address: bc1qkgct4je9n8ec40mdjehvpaw06nvgw4p6ysgdkmp22qwma4pxrhls0tw2e8

2019-05-05T12:05:17Z LOOP_OUT FAILED 0.005 BTC - bc1qkgct4je9n8ec40mdjehvpaw06nvgw4p6ysgdkmp22qwma4pxrhls0tw2e8

The reason it failed:

2019-05-05 11:56:18.469 [INF] CLIENT: 3eee2a Failed swap payment: payment attempt not completed before timeout of 1m0s

I do wonder the root cause of the error ‘payment attempt not completed before timeout of 1m0s’.

$ loop out --channel 631562777641943040 --amt 500000

Max swap fees for 500000 Loop Out: 36532

CONTINUE SWAP? (y/n), expand fee detail (x): y

Swap initiated

ID: 63b80eec19df293b8b2fca9cc89dad52367c399a98bd3d7bff5e7da548cb02eb

HTLC address: bc1qhyu2egk9gsp9n242shspxmh2p4hcpclygjf4z8lpu252s3ke0zzsrcqqzx

2019-05-05T12:27:48Z LOOP_OUT SUCCESS 0.005 BTC - bc1qhyu2egk9gsp9n242shspxmh2p4hcpclygjf4z8lpu252s3ke0zzsrcqqzx

OK, now let’s try upping the ante a bit and looping out a million sats:

$ loop out --channel 631589165899972608 --amt 1000000

Max swap fees for 1000000 Loop Out: 46530

CONTINUE SWAP? (y/n), expand fee detail (x): y

Swap initiated

ID: 34bc876531a01a248e26200eb2e2d490da46ea09ac69b37ef3b38e1b2992aa4d

HTLC address: bc1q8th8xg0222f4rghxrnqw73t79ly7yc86fu5hda0p5jupnjj588ksxqpk8u

Ooh - it worked!

2019-05-05T12:45:18Z LOOP_OUT SUCCESS 0.01 BTC - bc1q8th8xg0222f4rghxrnqw73t79ly7yc86fu5hda0p5jupnjj588ksxqpk8u

Now let’s try the very first one I tried yesterday again and see if it succeeds this time:

$ loop out --channel 631589165900038144 --amt 1000000

Max swap fees for 1000000 Loop Out: 46533

CONTINUE SWAP? (y/n), expand fee detail (x): y

Swap initiated

ID: 4aa62e585a57a98b0a04d990148642421b4ab165a7fef207a1be5537295216ab

HTLC address: bc1q350jzdewhxm5alugz3s390pysx7c8sly4dpunfv3phtpataatneqlqp8es

Run `loop monitor` to monitor progress.

2019-05-05T14:08:26Z LOOP_OUT SUCCESS 0.01 BTC - bc1q350jzdewhxm5alugz3s390pysx7c8sly4dpunfv3phtpataatneqlqp8es

Well, there you go. Most channels are now balanced, but there aren’t very many channels yet. And looping out is comparatively expensive (although I’m not sure I’ve fully understood the true costs yet). I don’t plan on doing much looping, but I think it was important to get most channels balanced from the beginning. I hope soon I’ll be able to balance channels people open with me using channels I open myself - if you want me to try this with your node, now’s the time to open a channel!

Here’s the current report - just 2 unbalanced channels now:

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 49,791,532 satoshi, Wallet: 42,422,359 satoshi (42,422,359 satoshi/0 satoshi)

Fees: 1 this month, 1 this week, 0 today

Channels: 9 active, 0 inactive, 0 pending, containing: 7,369,173 satoshi

Version: 0.6.0-beta commit=v0.6-beta-dirty

URI: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735


Pending:

None.


Unbalanced - High:

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 13:34 UTC on Saturday, 4 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

Fees: 1,000+1/40 / 1+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 990,339 / 0 [capacity: 1,000,000]


Unbalanced - Low:

✅ 🚶 03f175627ecd2b736fdd: 631605658598703105 (Last update: 14:20 UTC on Friday, 3 May 2019)

Pubkey: 03f175627ecd2b736fdd29f40414c02169716f884b4b45762483142ed81834141c

Fees: 1,000+1/40 / 1,000+1/40

Balances: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 96,416 / 1,038,187 [capacity: 1,144,265]


All Channels:

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 13:34 UTC on Saturday, 4 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

Fees: 1,000+1/40 / 1+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 990,339 / 0 [capacity: 1,000,000]

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 10:50 UTC on Sunday, 5 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

Fees: 1,000+1/40 / 4,000+40/144

Balances: [🥝🥝🥝🥝🥝🥝🥝🥕🥕🥕] 2,998,267 / 992,071 [capacity: 4,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 12:26 UTC on Saturday, 4 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

Fees: 1,000+1/40 / 0+100/40

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 998,277 / 992,061 [capacity: 2,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 05:30 UTC on Sunday, 5 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

Fees: 1,000+1/40 / 1,000+1/40

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 498,280 / 492,058 [capacity: 1,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 21:30 UTC on Saturday, 4 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

Fees: 1,000+1/40 / 1,000+1/40

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 498,279 / 492,059 [capacity: 1,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 09:03 UTC on Sunday, 5 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

Fees: 1,000+1/40 / 1,000+1/40

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 498,278 / 492,060 [capacity: 1,000,000]

✅ 👪 ln1.satoshilabs.com: 631652937637363712 (Last update: 00:00 UTC on Sunday, 5 May 2019)

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

Fees: 1,000+1/40 / 0+1,000/144

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 497,781 / 492,555 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 13:47 UTC on Sunday, 5 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

Fees: 1,000+1/40 / 0+1/144

Balances: [🥝🥝🥕🥕🥕🥕🥕🥕🥕🥕] 293,256 / 697,082 [capacity: 1,000,000]

✅ 🚶 03f175627ecd2b736fdd: 631605658598703105 (Last update: 14:20 UTC on Friday, 3 May 2019)

Pubkey: 03f175627ecd2b736fdd29f40414c02169716f884b4b45762483142ed81834141c

Fees: 1,000+1/40 / 1,000+1/40

Balances: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 96,416 / 1,038,187 [capacity: 1,144,265]


Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659