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

Connecting to Loop

Since I want to have channels with a few ‘destination’ nodes, I thought about opening a hefty channel with Lightning Lab’s Loop node. I think Loop use is likely to increase in time, and it’ll typically be higher payment sizes than the median. Sure, a bunch of others will likely be connected to it, but it might still be useful.

Finding that node was tricky though. Here’s one of the paths a Loop Out took:

"path": [

"02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b",

"02247d9db0dfafea745ef8c9e161eb322f73ac3f8858d8730b6fd97254747ce76b",

"021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d",

"03fb2a0ca79c005f493f1faa83071d3a937cf220d4051dc48b8fe3a087879cf14a"

]

03fb2a0ca79c005f493f1faa83071d3a937cf220d4051dc48b8fe3a087879cf14a just doesn’t seem to exist on my graph, or 1ml.com’s. Interesting.

021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d exists, with the alias ‘021c97a90a411ff2b10d’ and 33 channels. 5 of the channels are 0.16BTC - pushing the maximum channel size, and the smallest is 4million sats.

The other two nodes in the path are less interesting - 02247d9db0dfafea745ef8c9e161eb322f73ac3f8858d8730b6fd97254747ce76b is an LNBig node that was used for routing, and 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b is the rompert.com node whose channel I was looping out.

So it looks like Loop uses a fronting server 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d, along with a private connection to a hidden server. I guess that hidden server is special or has special stuff hooked into it somehow.

I don’t think I’m exposing any big secrets here. Alex Bosworth tweeted about it in March apparently:

You can use the CLI to select the specific channel you want to send out of. The end destination is the Loop service. If you want to help provide liquidity the node is 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d@18.224.56.146:9735 but more nodes may be added

Let’s try opening a big channel with 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d@18.224.56.146:9735

You know what? Let’s try opening the biggest. (I plan on looping some of this out.) So, what’s the biggest I can open?

$ lncli getnetworkinfo

{

"graph_diameter": 0,

"avg_out_degree": 18.098991320666197,

"max_out_degree": 1361,

"num_nodes": 4263,

"num_channels": 38578,

"total_network_capacity": "109731573840",

"avg_channel_size": 2844408.0522577637,

"min_channel_size": "1100",

"max_channel_size": "16777216",

"median_channel_size_sat": "816675"

}

There we go - maximum channel size is: 16777216 sats.

$ lncli openchannel --node_key 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d --connect 18.224.56.146:9735 --local_amt 16777216

[lncli] rpc error: code = Unknown desc = funding amount is too large, the max channel size is: 0.16777215 BTC

Oops. Apparently channels must be less than the maximum, not less than or equal to the maximum. Oh well.

$ lncli openchannel --node_key 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d --connect 18.224.56.146:9735 --local_amt 16777215

{

"funding_txid": "8698e55a535347ba23b994c9c21dd3a3be03a744d93a3b052f94af8bb3eabed6"

}

There we go - a maximally-sized channel to provide some liquidity to Loop. I’m curious if this will get used at all. 1 million sats is the maximum Loop Out handles right now, but I don’t have many other channels that can transfer 1 million sats so for this to work I’ll need some more big channels. But small steps. I’m not in a rush.

Loop costs

I thought I’d try and figure out the costs involved in Loop Out. It may be beyond me.

Here’s a Loop Out from my channel with the swap server:

$ loop out --channel 632366520641650689 --amt 1000000

Max swap fees for 1000000 Loop Out: 61893

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

Max on-chain fee: 29184

Max off-chain swap routing fee: 20010

Max off-chain prepay routing fee: 509

Max swap fee: 12190

Max no show penalty: 24982

CONTINUE SWAP? (y/n): y

Swap initiated

ID: c3e04cdf6ae9835abab1d05152682a2961bb90937393303dc3d878728bc51e4b

HTLC address: bc1qg3h44cylg47jpl3hlf24k5nq7d4mnrxjxxpl3g7n02wflpp65shqfmm0ht

Run `loop monitor` to monitor progress.

2019-05-09T08:18:17Z LOOP_OUT INITIATED 0.01 BTC - bc1qg3h44cylg47jpl3hlf24k5nq7d4mnrxjxxpl3g7n02wflpp65shqfmm0ht

2019-05-09T08:26:26Z LOOP_OUT PREIMAGE_REVEALED 0.01 BTC - bc1qg3h44cylg47jpl3hlf24k5nq7d4mnrxjxxpl3g7n02wflpp65shqfmm0ht

2019-05-09T08:31:28Z LOOP_OUT SUCCESS 0.01 BTC - bc1qg3h44cylg47jpl3hlf24k5nq7d4mnrxjxxpl3g7n02wflpp65shqfmm0ht

And it succeeded. How much did it cost?

Well, I tried looking at the ‘Max swap fees’ output from the loop command. Looking at the source code, here are the comments on the breakdown:

  • Max off-chain swap routing fee is the maximum off-chain fee that may be paid for payment to the server. This limit is applied during path finding.
  • Max off-chain prepay routing fee is the maximum off-chain fee that may be paid for payment to the server. This limit is applied during path finding.
  • Max swap fee is the maximum we are willing to pay the server for the swap.
  • Max no show penalty is the maximum amount of the swap fee that may be charged as a prepayment.
  • Max on-chain fee is the maximum in on-chain fees that we are willing to spend.

All figures are output in satoshi, according to answers from the LND Slack chat.

It’s still not entirely clear which fees are paid when. Some of the above fees are paid if the loop is successful, some if it fails badly, and I think the most common failure results in no costs.

In any case, the maximum fee for the swap - the figure given in the initial output - is built from the detail output by:

Max fees := Max on-chain fee + Max swap fee + Max off-chain swap routing feeMax off-chain prepay routing fee

But it’s still a ‘maximum’ threshold figure - if the costs rise above these the transaction is cancelled. This doesn’t give a good picture of the likely costs.

I’m even more confused by the ‘Max off-chain swap routing fee’. In my run above, it’s 20010 sats! That’s a very, very big routing fee for a Lightning payment. When I asked in Slack I was told ‘it’s a hard limit, you won’t pay anywhere near that, but we need a hard limit so we know when to bail out’.

So how much did it actually cost? Well, unless there’s something else going on, I figure I can look at how much was sent out, and how much came back, and the cost will be the difference in those two figures.

So, what went out? Two payments:

{

"payment_hash": "9735b382d3f62e1db32bf57eae33b766bfaf6dd941e9c92e753904e86a2b1173",

"value": "20819",

"creation_date": "1557389899", // 2019-05-09T08:18:19+00:00

"path": [

"021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d",

"03fb2a0ca79c005f493f1faa83071d3a937cf220d4051dc48b8fe3a087879cf14a"

],

"fee": "1",

"payment_preimage": "0c85c83148e5b67e90615bfc9b9bee639ff3ca613d0cd82c843d21bc0c195074",

"value_sat": "20819",

"value_msat": "20819000"

},

{

"payment_hash": "c3e04cdf6ae9835abab1d05152682a2961bb90937393303dc3d878728bc51e4b",

"value": "989340",

"creation_date": "1557390687", // 2019-05-09T08:31:27+00:00

"path": [

"021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d",

"03fb2a0ca79c005f493f1faa83071d3a937cf220d4051dc48b8fe3a087879cf14a"

],

"fee": "1",

"payment_preimage": "b34864d376ae63086413e5579d28933857277f0a4c756f75c3dc45b86c9be332",

"value_sat": "989340",

"value_msat": "989340000"

}

How much went out?

20819 + 1 (fee)
+ 989340 + 1 (fee)
= 1010161 sats

What came back? One on-chain transaction:

{

"tx_hash": "811f46f096d6525a574a8a8996e48d6bd3b32eaf1ff7c50ba0a3ad0d9ce6783c",

"amount": "990218",

"num_confirmations": 1,

"block_hash": "0000000000000000001d63c493e223a45d1d9f622972539b3ae31d7c1d15dd0c",

"block_height": 575252,

"time_stamp": "1557390679", // 2019-05-09T08:31:19+00:00

"total_fees": "0",

"dest_addresses": [

"bc1qfdszj6ldrenwpd4f4s0a2326snaevwjryedk9j"

]

}

How much came back?

990218 sats

The total cost to me for this loop is the difference between those two figures:

1010161 - 990218 = 19943 sats

19943 sats is a lot less than the 61893 sats quoted as the ‘Max swap fees’ before agreeing to the run, but at $1.22 in today’s terms it’s still hefty.

I do wish I had a better handle on exactly which of the max fees are paid under what circumstances, and how loop arrives at the figures. A ‘Max off-chain swap routing fee’ of 20010 sats is an awful lot higher than the 2 sats actually paid in routing fees. So much so that it has me doubting I know what’s actually going on there.

More channels and rebalancing

I want to open a few channels with smaller nodes as well - they can be the ones most in need of liquidity. I don't know how beneficial this will be for routing, but that's why I'm experimenting in public. If it doesn't work, I can close channels as easily as open them.

I offered to open channels for folks on the LND Developer slack and 'kornpow' and ‘tongokongo’ both replied with connection details, so:

$ lncli openchannel --node_key 03077d02d11d2ade200c7fc5ba4fc66c1c599424fb945e88b3896fee6eedc07147 --connect 64.99.228.35:9735 --local_amt 1000000

{

"funding_txid": "d192294d6e0768d24559290477666a6d7c7aad04582297dc29a33d03598f487c"

}

$ lncli openchannel --node_key 03d40870a931fe2e978f01b26117b64d15d68119f2840c30f1b69b59955b1e7846 --connect 157.230.224.221:9735 --local_amt 1000000

{

"funding_txid": "4fe51a94716e33944db932c1173b51f9ab82cd867d6340ec69de68b3931e8ac6"

}

One of the plans I had with my channel with the Swap server was to loop out some of the funds there and allow me to rebalance multiple channels into that new space. Instead of looping out from each channel individually, I could do fewer loops and just pay Lightning routing fees to rebalance channels.

It’s not really working out.

Probes are failing before it even gets to the swap server:

Probe results for path of 300000 sats from: 632189499363622912 to: 632366520641650689

⚡ OpinionatedGeek ⚡ (22 channels)

✅ Hop 1 (300001 sats): SUCCESS

Channel ID: 632189499363622912, Capacity: 1000000

Src: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6 -

Dst: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

ln.taborsky.cz (38 channels)

❌ Hop 2 (300001 sats): FAILURE - Temporary Channel Failure

Channel ID: 594369597760339968, Capacity: 2000000

Src: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5 -

Dst: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

LightningTo.Me (681 channels)

❌ Hop 3 (300000 sats): FAILURE - Temporary Channel Failure

Channel ID: 624561087597182976, Capacity: 4000000

Src: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d -

Dst: 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d

⚡ 021c97a90a411ff2b10d (35 channels)

❌ Hop 4 (300000 sats): FAILURE - Temporary Channel Failure

Channel ID: 632366520641650689, Capacity: 16777215

Src: 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d -

Dst: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6

⚡ OpinionatedGeek ⚡ (22 channels)

I knew some nodes would have difficulties routing but there are a surprising number of failures like the above.

Probing is handy though! I think the output (above) could use a little work - Hop 3 and Hop 4 didn’t really fail, the payment didn’t reach them because it failed at Hop 2. I think I need to make that clearer. In fact I should maybe probe from the source to the destination instead of back from the destination to the source - that would be faster and I could show Hop 3 and Hop 4 above as ‘untried’ instead of ‘Temporary Channel Failure’.

I’d also like a way to automate this probing, to give an indication of how well a channel can route. Then I could run another (nightly?) report showing which channels were useless and should be culled.

Here’s the latest report:

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 48,680,356 satoshi, Wallet: 16,499,900 satoshi (16,499,900 satoshi/0 satoshi)

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

Channels: 21 active, 1 inactive, 0 pending, containing: 32,180,456 satoshi

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

URI: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735

Pending:

None.

Unbalanced - High:

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 02:35 UTC on Thursday, 9 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,721 / 0 [capacity: 1,000,000]

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 14:44 UTC on Tuesday, 7 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

Fees: 0+10/40 / 1+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 ln.taborsky.cz: 632189499363622912 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 hirish-ln: 632189499363557376 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,717 / 0 [capacity: 1,000,000]

✅ 👪 SLL: 632187300239048704 (Last update: 15:49 UTC on Tuesday, 7 May 2019)

Pubkey: 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 11:29 UTC on Thursday, 9 May 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 blackgold: 632112533487681536 (Last update: 22:29 UTC on Monday, 6 May 2019)

Pubkey: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d

Fees: 0+10/40 / 250+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 VIX18: 632187300238983168 (Last update: 04:21 UTC on Thursday, 9 May 2019)

Pubkey: 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 984,913 / 0 [capacity: 1,000,000]

✅ 👪 kornpow: 632376416256983040 (Last update: 17:17 UTC on Wednesday, 8 May 2019)

Pubkey: 03077d02d11d2ade200c7fc5ba4fc66c1c599424fb945e88b3896fee6eedc07147

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 984,907 / 0 [capacity: 1,000,000]

✅ 👪 ECRYPTO[LND]: 632502860122357761 (Last update: 11:05 UTC on Thursday, 9 May 2019)

Pubkey: 03d40870a931fe2e978f01b26117b64d15d68119f2840c30f1b69b59955b1e7846

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 984,889 / 0 [capacity: 1,000,000]

⭕ 👪 LightningTo.Me: 632050960802447360 (Last update: 22:32 UTC on Tuesday, 7 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 882,321 / 0 [capacity: 1,000,000]

✅ 👪 021c97a90a411ff2b10d: 632366520641650689 (Last update: 14:31 UTC on Wednesday, 8 May 2019)

Pubkey: 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥕🥕] 13,732,256 / 3,029,865 [capacity: 16,777,215]

Unbalanced - Low:

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

Pubkey: 03f175627ecd2b736fdd29f40414c02169716f884b4b45762483142ed81834141c

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

Balances: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 96,416 / 1,033,565 [capacity: 1,144,265]

All Channels:

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 02:35 UTC on Thursday, 9 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,721 / 0 [capacity: 1,000,000]

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 14:44 UTC on Tuesday, 7 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

Fees: 0+10/40 / 1+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 ln.taborsky.cz: 632189499363622912 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 hirish-ln: 632189499363557376 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,717 / 0 [capacity: 1,000,000]

✅ 👪 SLL: 632187300239048704 (Last update: 15:49 UTC on Tuesday, 7 May 2019)

Pubkey: 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 11:29 UTC on Thursday, 9 May 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 blackgold: 632112533487681536 (Last update: 22:29 UTC on Monday, 6 May 2019)

Pubkey: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d

Fees: 0+10/40 / 250+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 VIX18: 632187300238983168 (Last update: 04:21 UTC on Thursday, 9 May 2019)

Pubkey: 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 984,913 / 0 [capacity: 1,000,000]

✅ 👪 kornpow: 632376416256983040 (Last update: 17:17 UTC on Wednesday, 8 May 2019)

Pubkey: 03077d02d11d2ade200c7fc5ba4fc66c1c599424fb945e88b3896fee6eedc07147

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 984,907 / 0 [capacity: 1,000,000]

✅ 👪 ECRYPTO[LND]: 632502860122357761 (Last update: 11:05 UTC on Thursday, 9 May 2019)

Pubkey: 03d40870a931fe2e978f01b26117b64d15d68119f2840c30f1b69b59955b1e7846

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 984,889 / 0 [capacity: 1,000,000]

⭕ 👪 LightningTo.Me: 632050960802447360 (Last update: 22:32 UTC on Tuesday, 7 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 882,321 / 0 [capacity: 1,000,000]

✅ 👪 021c97a90a411ff2b10d: 632366520641650689 (Last update: 14:31 UTC on Wednesday, 8 May 2019)

Pubkey: 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥕🥕] 13,732,256 / 3,029,865 [capacity: 16,777,215]

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 23:16 UTC on Wednesday, 8 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

Fees: 0+10/40 / 4,000+40/144

Balances: [🥝🥝🥝🥝🥝🥝🥝🥕🥕🥕] 2,993,649 / 992,071 [capacity: 4,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 11:15 UTC on Tuesday, 7 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

Fees: 0+10/40 / 0+1/40

Balances: [🥝🥝🥝🥝🥝🥝🥕🥕🥕🥕] 685,717 / 300,001 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 05:39 UTC on Thursday, 9 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

Fees: 0+10/40 / 0+1/144

Balances: [🥝🥝🥝🥝🥝🥕🥕🥕🥕🥕] 588,638 / 397,082 [capacity: 1,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 19:58 UTC on Wednesday, 8 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🥝🥝🥝🥝🥝🥕🥕🥕🥕🥕] 503,664 / 482,056 [capacity: 1,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 21:59 UTC on Wednesday, 8 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

Fees: 0+10/40 / 0+100/40

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 993,659 / 992,061 [capacity: 2,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 05:39 UTC on Thursday, 9 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 493,660 / 492,060 [capacity: 1,000,000]

✅ 👪 ln1.satoshilabs.com: 631652937637363712 (Last update: 11:30 UTC on Thursday, 9 May 2019)

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 493,166 / 492,555 [capacity: 1,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 13:11 UTC on Tuesday, 7 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 483,658 / 502,058 [capacity: 1,000,000]

✅ 👪 ln.BitSoapBox.com: 632113632926957568 (Last update: 05:03 UTC on Thursday, 9 May 2019)

Pubkey: 021607cfce19a4c5e7e6e738663dfafbbbac262e4ff76c2c9b30dbeefc35c00643

Fees: 0+10/40 / 220+21/144

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 378,922 / 0 [capacity: 1,000,000]

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

Pubkey: 03f175627ecd2b736fdd29f40414c02169716f884b4b45762483142ed81834141c

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

Balances: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 96,416 / 1,033,565 [capacity: 1,144,265]

Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

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

Fees

Now I want to spend some time looking at the fees I charge for routing. Up to now I haven’t changed any fees from the default.

I want my node to be ‘good value’ but I don’t want to undercharge.

BitMEX have a great article on routing fees.

Unfortunately they’re traders and talk about basis points so I’ll have to try to translate from what they say to the actual values lncli expects.

To help me translate, they say:

Base Fee
This is expressed in thousandths of a Satoshi.

For example a base fee of 1,000 is 1 satoshi per transaction.

and:

Fee Rate
This is expressed in millionths of a Satoshi transferred.

For example a fee rate of 1,000 is, 1,000/1,000,000, which is 0.1% of the value
transferred through the channel. Equivalent to 10bps.

As for optimal values they say:

The base fee was 0 across the period

and:

The daily fee income appears to quickly accelerate as one increases the fee rate from 0 till around 0.1 bps. Once the fee is increased above this rate, average daily fee income appears to gradually decline. Therefore, based on this experiment, it appears as if the revenue maximising fee rate is around 0.1 bps...

To translate that, if 10bps is 1,000 then a fee rate of 0.1bps is 10, i.e. 10/1,000,000. lncli expects this in sats, not millionths-of-sats, so 10/1,000,000 is 0.00001.

A base fee of 0 seems a bit scary to me, given that channels open with a base fee of 1000 by default. I can see why it would simplify the research for BitMEX but is it a good practical idea? I honestly don’t know. (I note that the channel I opened with them has a base fee of 1 though, rather than 0.)

So I’ll give it a go. Let’s try setting a base fee of 0, a fee rate of 10 and no change to CLTV delta, for all my channels:

$ lncli updatechanpolicy --base_fee_msat 0 --fee_rate 0.00001 --time_lock_delta 40

Just to verify things, here’s how my channel with BitMEX looks now:

$ lncli getchaninfo 631655136611991552

{

"channel_id": "631655136611991552",

"chan_point": "c8fbb6e78f26bd5f63419c172384b79a1209478dd30184b68711c6d1f916b1be:0",

"last_update": 1557311519,

"node1_pub": "023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6",

"node2_pub": "0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f",

"capacity": "1000000",

"node1_policy": {

"time_lock_delta": 40,

"min_htlc": "1000",

"fee_base_msat": "0",

"fee_rate_milli_msat": "10",

"disabled": false,

"max_htlc_msat": "990000000"

},

"node2_policy": {

"time_lock_delta": 40,

"min_htlc": "1000",

"fee_base_msat": "1",

"fee_rate_milli_msat": "10",

"disabled": false,

"max_htlc_msat": "990000000"

}

}

So the settings look as I intended. Whether or not they’re useful remains to be seen.

I intend to have a ‘default’ set of fees for channels, with other fees used to encourage or discourage behaviour. For instance, if I have a large unbalanced channel to a ‘destination’ node, I may lower the fees (or even make it free) in order to encourage its use until it’s more balanced.

Rebalancing

One of the payments I routed unbalanced one of my channels, and that gives me the opportunity to rebalance it from one of my over-full channels.

Here’s the before state - rompert is getting a little low, and Saggitarius is still full from when I opened it:

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 04:20 UTC on Tuesday, 7 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🥝🥝🥕🥕🥕🥕🥕🥕🥕🥕] 291,688 / 697,082 [capacity: 1,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 11:15 UTC on Tuesday, 7 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

Too many carrots in rompert, too many kiwis in Sagittarius! (I do love those glyphs!)

Now let’s run this command to move 300,000 from the Sagittarius channel to the rompert channel:

$ lntoolkit move-balance --from 632050960773152769 --to 631590265456623616 --amount 300000

And here’s the result:

2019/05/07 14:58:46 📄 Payment path[0]:

Current block height: 575003

Move: 300000000 msat

From channel: 632050960773152769 - Balances: 988771 / 0

To channel: 631590265456623616 - Balances: 291688 / 697082

Cost: 1900 msat

Route:

⚡ OpinionatedGeek ⚡ (19 channels)

Channel ID: 632050960773152769 Capacity: 1000000 Cost: 1300 msat

Src: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6 -

Dst: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

⚡ Sagittarius A (670 channels)

Channel ID: 603416379436040193 Capacity: 800000 Cost: 300 msat

Src: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019 -

Dst: 02b0172bb38617fa3afdb69664468b492d5a21062a4fa8b47284b0cc320e6e7420

⚡ starkness (85 channels)

Channel ID: 606258616975163392 Capacity: 800000 Cost: 300 msat

Src: 02b0172bb38617fa3afdb69664468b492d5a21062a4fa8b47284b0cc320e6e7420 -

Dst: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

⚡ rompert.com🔵 (1099 channels)

Channel ID: 631590265456623616 Capacity: 1000000 Cost: 0 msat

Src: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b -

Dst: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6

⚡ OpinionatedGeek ⚡ (19 channels)

2019/05/07 14:58:52 📄 Payment successful.

2019/05/07 14:58:52 📄 Successfully moved 300000 from '632050960773152769' to '631590265456623616'

2019/05/07 14:58:52 📄 Balance moved successfully! 😄

2019/05/07 14:58:52 📄 No tip to send. That's OK, I still love you! 🥰

After that rebalancing, here is the state of those two channels:

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 13:57 UTC on Tuesday, 7 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🥝🥝🥝🥝🥝🥕🥕🥕🥕🥕] 591,688 / 397,082 [capacity: 1,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 11:15 UTC on Tuesday, 7 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

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

Balances: [🥝🥝🥝🥝🥝🥝🥕🥕🥕🥕] 688,769 / 300,001 [capacity: 1,000,000]

The balance of kiwis to carrots looks a lot healthier now!

Mystery node

Now let’s go back to that mystery node that opened a private channel with me.

I’ve updated lntoolkit to cope with private channels as a source or destination now, although I worry it’s a bit of a hack. Programming question: if I have an actual Channel object, how can I best get a ChannelEdge object. This is what I have but it seems quite hackish:

&lnrpc.ChannelEdge{

Capacity: channel.Capacity,

ChanPoint: channel.ChannelPoint,

ChannelId: channel.ChanId,

LastUpdate: 0,

Node1Pub: cef.MyPubKey,

Node1Policy: &lnrpc.RoutingPolicy{

Disabled: false,

FeeBaseMsat: 0,

FeeRateMilliMsat: 0,

MinHtlc: 0,

TimeLockDelta: 0,

},

Node2Pub: channel.RemotePubkey,

Node2Policy: &lnrpc.RoutingPolicy{

Disabled: false,

FeeBaseMsat: channel.CommitFee,

FeeRateMilliMsat: channel.FeePerKw,

MinHtlc: 1,

TimeLockDelta: channel.CsvDelay,

},

}

Anyone have any better ideas?

Anyway, I thought I’d try running auto-balance on that mystery channel to try to fill it a bit. auto-balance should try to fill the --to channel to 50% from all the currently full channels:

$ lntoolkit auto-balance --to 631605658598703105 --amount 500000cd src/lntoolkit && /Applications/Xcode.app/Contents/Developer/usr/bin/make install

2019/05/07 18:34:59 📄 Have 5 possible 'from' channels and 1 possible 'to' channels:

From:

631655136611991552: 988773 / 0

632050960802447360: 988771 / 0

632050960761552897: 988771 / 0

632050960770990080: 988771 / 0

632113632926957568: 988760 / 0

To:

631605658598703105: 96416 / 1036619

2019/05/07 18:35:01 🚨 Error with move attempt from 631655136611991552 to 631605658598703105: no more routes to try

2019/05/07 18:35:01 🚨 Error with move attempt from 632050960802447360 to 631605658598703105: no more routes to try

2019/05/07 18:35:01 🚨 Error with move attempt from 632050960761552897 to 631605658598703105: no more routes to try

2019/05/07 18:35:01 🚨 Error with move attempt from 632050960770990080 to 631605658598703105: no more routes to try

2019/05/07 18:35:01 🚨 Error with move attempt from 632113632926957568 to 631605658598703105: no more routes to try

2019/05/07 18:35:01 📄 Auto balance complete - 0 successful move(s), 5 unsuccessful move(s).

2019/05/07 18:35:01 📄 No tip to send. That's OK, I still love you! 🥰

So, it didn’t work. It seems none of my full channels can route anything to it.

Is it worth keeping it around if it can’t route? That’s a good question. One of the things I’m trying to do here is put together my own rules of thumb for what to do in these situations (or learn from others!) In absence of anything else, I’ll leave it open a while longer - it has already routed some funds from them, so it’s not the most useless channel I have.

Finally, here’s the current report:

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 49,537,395 satoshi, Wallet: 32,346,645 satoshi (32,346,645 satoshi/0 satoshi)

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

Channels: 19 active, 0 inactive, 0 pending, containing: 17,190,750 satoshi

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

URI: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735

Pending:

None.

Unbalanced - High:

✅ 👪 VIX18: 632187300238983168 (Last update: 09:11 BST on Saturday, 4 May 2019)

Pubkey: 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 987,063 / 0 [capacity: 1,000,000]

✅ 👪 ln.BitSoapBox.com: 632113632926957568 (Last update: 01:10 BST on Wednesday, 8 May 2019)

Pubkey: 021607cfce19a4c5e7e6e738663dfafbbbac262e4ff76c2c9b30dbeefc35c00643

Fees: 0+10/40 / 220+20/144

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,722 / 0 [capacity: 1,000,000]

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 01:11 BST on Wednesday, 8 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,721 / 0 [capacity: 1,000,000]

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 15:44 BST on Tuesday, 7 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

Fees: 0+10/40 / 1+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 ln.taborsky.cz: 632189499363622912 (Last update: 12:43 BST on Tuesday, 7 May 2019)

Pubkey: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 LightningTo.Me: 632050960802447360 (Last update: 23:32 BST on Tuesday, 7 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,717 / 0 [capacity: 1,000,000]

✅ 👪 hirish-ln: 632189499363557376 (Last update: 12:43 BST on Tuesday, 7 May 2019)

Pubkey: 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,717 / 0 [capacity: 1,000,000]

✅ 👪 SLL: 632187300239048704 (Last update: 16:49 BST on Tuesday, 7 May 2019)

Pubkey: 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 10:11 BST on Monday, 29 April 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 blackgold: 632112533487681536 (Last update: 23:29 BST on Monday, 6 May 2019)

Pubkey: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d

Fees: 0+10/40 / 250+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

Unbalanced - Low:

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

Pubkey: 03f175627ecd2b736fdd29f40414c02169716f884b4b45762483142ed81834141c

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

Balances: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 96,416 / 1,033,565 [capacity: 1,144,265]

All Channels:

✅ 👪 VIX18: 632187300238983168 (Last update: 09:11 BST on Saturday, 4 May 2019)

Pubkey: 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 987,063 / 0 [capacity: 1,000,000]

✅ 👪 ln.BitSoapBox.com: 632113632926957568 (Last update: 01:10 BST on Wednesday, 8 May 2019)

Pubkey: 021607cfce19a4c5e7e6e738663dfafbbbac262e4ff76c2c9b30dbeefc35c00643

Fees: 0+10/40 / 220+20/144

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,722 / 0 [capacity: 1,000,000]

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 01:11 BST on Wednesday, 8 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,721 / 0 [capacity: 1,000,000]

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 15:44 BST on Tuesday, 7 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

Fees: 0+10/40 / 1+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 ln.taborsky.cz: 632189499363622912 (Last update: 12:43 BST on Tuesday, 7 May 2019)

Pubkey: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,719 / 0 [capacity: 1,000,000]

✅ 👪 LightningTo.Me: 632050960802447360 (Last update: 23:32 BST on Tuesday, 7 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,717 / 0 [capacity: 1,000,000]

✅ 👪 hirish-ln: 632189499363557376 (Last update: 12:43 BST on Tuesday, 7 May 2019)

Pubkey: 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,717 / 0 [capacity: 1,000,000]

✅ 👪 SLL: 632187300239048704 (Last update: 16:49 BST on Tuesday, 7 May 2019)

Pubkey: 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 10:11 BST on Monday, 29 April 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 blackgold: 632112533487681536 (Last update: 23:29 BST on Monday, 6 May 2019)

Pubkey: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d

Fees: 0+10/40 / 250+10/40

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 985,715 / 0 [capacity: 1,000,000]

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 06:39 BST on Wednesday, 8 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

Fees: 0+10/40 / 4,000+40/144

Balances: [🥝🥝🥝🥝🥝🥝🥝🥕🥕🥕] 2,993,649 / 992,071 [capacity: 4,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 12:15 BST on Tuesday, 7 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

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

Balances: [🥝🥝🥝🥝🥝🥝🥕🥕🥕🥕] 685,717 / 300,001 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 11:25 BST on Wednesday, 8 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

Fees: 0+10/40 / 0+1/144

Balances: [🥝🥝🥝🥝🥝🥕🥕🥕🥕🥕] 588,638 / 397,082 [capacity: 1,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 10:14 BST on Wednesday, 8 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🥝🥝🥝🥝🥝🥕🥕🥕🥕🥕] 503,664 / 482,056 [capacity: 1,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 12:15 BST on Tuesday, 7 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

Fees: 0+10/40 / 0+100/40

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 993,659 / 992,061 [capacity: 2,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 06:24 BST on Wednesday, 8 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 493,660 / 492,060 [capacity: 1,000,000]

✅ 👪 ln1.satoshilabs.com: 631652937637363712 (Last update: 01:00 BST on Wednesday, 8 May 2019)

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 493,166 / 492,555 [capacity: 1,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 14:11 BST on Tuesday, 7 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 483,658 / 502,058 [capacity: 1,000,000]

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

Pubkey: 03f175627ecd2b736fdd29f40414c02169716f884b4b45762483142ed81834141c

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

Balances: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 96,416 / 1,033,565 [capacity: 1,144,265]


Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

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

Opening the channels I couldn’t yesterday

I finished opening the channels I found yesterday, with the following commands and results:

$ lncli openchannel --node_key 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a --connect 84.72.189.230:9735 --local_amt 1000000

{

"funding_txid": "dd2668808081af3a6a5f718634c0306b727c983bf7a3123d42df1089fe8043ed"

}

$ lncli openchannel --node_key 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f --connect 2.238.144.76:9735 --local_amt 1000000

{

"funding_txid": "25c6938baf5ac10cab7ad8c7319dc40cf33204622d530a95bd4cf433d036d4fc"

}

$ lncli openchannel --node_key 0396632392e7902dfbc83c46831f921842a93d8cbc68232eb90b4d723230bcec59 --connect 121.200.19.225:9735 --local_amt 1000000

[lncli] rpc error: code = Unknown desc = dial tcp 121.200.19.225:9735: connect: connection timed out

$ lncli openchannel --node_key 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5 --connect 37.205.8.78:9735 --local_amt 1000000

{

"funding_txid": "9e66cdd9295cad9e275d988c8e2ddc1a8455cbd3251844004385d1d58c23fbd7"

}

NSCasa just failed to connect. Oh well. I got a different node from 1ml’s visualiser:

hirish-ln: 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f

$ lncli openchannel --node_key 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f --connect 5.135.34.152:9735 --local_amt 1000000

{

"funding_txid": "acfdb5872f921884e0e3321baf67fe4c0223e59be0e0eee3a0e9aa1ec5d6e97f"

}

A few more payments routed

I routed a few more payments since yesterday. I think. Fees show something but fwdinghistory doesn’t:

lncli fwdinghistory

{

"forwarding_events": [

],

"last_offset_index": 0

}

I’m curious what’s going on here.

Probing routes

I did a bit more work on ‘probing’ - sending a pseudo-invoice to a destination to see if it gets there successfully (if it does, it fails with a particular error that we can look for). This allows us to see if every node on the path can route the payment without us actually having to make the payment.

What’s more, if it fails you can do it using progressively shorter paths to find out exactly which node is failing to route the payment.

I think this is pretty cool!

I’ve been working on a probe-routes command for lntoolkit, and it’s at the sortof-working stage. Here’s the result of probing a path from my node to yalls.org:

$ lntoolkit probe-routes --max-fees 100000 --amount 100000 --max-routes 1 --from 632050960802447360 --to 631722206824824832 --to-pub-key 03e50492eab4107a773141bb419e107bda3de3d55652e6e1a41225f06a0bbf2d56 --quiet

Probe results for path of 100000 sats from: 632050960802447360 to: 631722206824824832

⚡ OpinionatedGeek ⚡ (15 channels)

✅ Hop 1 (100000 sats): SUCCESS

Channel ID: 632050960802447360, Capacity: 1000000

Src: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6 -

Dst: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

LightningTo.Me (708 channels)

✅ Hop 2 (100000 sats): SUCCESS

Channel ID: 631722206824824832, Capacity: 6000000

Src: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d -

Dst: 03e50492eab4107a773141bb419e107bda3de3d55652e6e1a41225f06a0bbf2d56

yalls.org (348 channels)

Probe successful! 😅

So I can successfully route a payment of 100000sats to Yalls if I need to.

Here’s how it looks when it fails. Let’s try another route, this time to LivingRoomofSatoshi.com:

$ lntoolkit probe-routes --max-fees 100000 --amount 100000 --max-routes 1 --from 632050960802447360 --to 623781533841948673 --to-pub-key 026b105ac13212c48714c6be9b11577a9ce10f10e1c88a45ce217e6331209faf8b --quiet

Probe results for path of 100000 sats from: 632050960802447360 to: 623781533841948673

⚡ OpinionatedGeek ⚡ (19 channels)

✅ Hop 1 (100000 sats): SUCCESS

Channel ID: 632050960802447360, Capacity: 1000000

Src: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6 -

Dst: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

LightningTo.Me (708 channels)

❌ Hop 2 (100000 sats): FAILURE - Unknown Error - FinalIncorrectCltvExpiry

Channel ID: 627773860551655424, Capacity: 16000000

Src: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d -

Dst: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

⚡ ACINQ (803 channels)

❌ Hop 3 (100000 sats): FAILURE - Fee Insufficient

Channel ID: 631131769039159296, Capacity: 1000000

Src: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f -

Dst: 025a14b8ed40583d67aec92da19453e0b2d1fbbf75f96f85d3dd0ff61a51ee0490

⚡ CARNIKAVA (26 channels)

❌ Hop 4 (100000 sats): FAILURE - Fee Insufficient

Channel ID: 629939898501169153, Capacity: 5000000

Src: 025a14b8ed40583d67aec92da19453e0b2d1fbbf75f96f85d3dd0ff61a51ee0490 -

Dst: 02e9046555a9665145b0dbd7f135744598418df7d61d3660659641886ef1274844

⚡ SilentBob (62 channels)

❌ Hop 5 (100000 sats): FAILURE - Fee Insufficient

Channel ID: 623781533841948673, Capacity: 4200000

Src: 02e9046555a9665145b0dbd7f135744598418df7d61d3660659641886ef1274844 -

Dst: 026b105ac13212c48714c6be9b11577a9ce10f10e1c88a45ce217e6331209faf8b

LivingRoomofSatoshi.com (27 channels)

Probe failed at hop 2 with Unknown Error - FinalIncorrectCltvExpiry

You can see the first failure in the path was ‘FinalIncorrectCltvExpiry’ - this may be due to a change in CLTV on that node that hasn’t propagated to my node yet, or it’s a bug in lntoolkit. In any case, you can see which node is causing the problem and can choose to take that information into account when opening or closing channels.

The pathfinding code I wrote for lntoolkit works with channels, rather than nodes - that’s usually what I want for moving balances around. It doesn’t work so well here - I’d rather not have to specify the channels in the probe-routes command. I’d have to update my pathfinding code for that, but, y’know, not today.

I have put the latest code into the LNToolkit docker image (testnet only) if you want to try it out.

And finally, here’s the latest report:

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 49,590,737 satoshi, Wallet: 32,346,645 satoshi (32,346,645 satoshi/0 satoshi)

Fees: 4 this month, 4 this week, 3 today

Channels: 18 active, 1 inactive, 0 pending, containing: 17,244,092 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: 21:31 UTC on Monday, 6 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,773 / 0 [capacity: 1,000,000]

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 13:43 UTC on Monday, 6 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 LightningTo.Me: 632050960802447360 (Last update: 07:22 UTC on Tuesday, 7 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 11:15 UTC on Tuesday, 7 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 09:11 UTC on Monday, 29 April 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 ln.BitSoapBox.com: 632113632926957568 (Last update: 22:49 UTC on Monday, 6 May 2019)

Pubkey: 021607cfce19a4c5e7e6e738663dfafbbbac262e4ff76c2c9b30dbeefc35c00643

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,760 / 0 [capacity: 1,000,000]

✅ 👪 blackgold: 632112533487681536 (Last update: 22:29 UTC on Monday, 6 May 2019)

Pubkey: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,756 / 0 [capacity: 1,000,000]

✅ 👪 hirish-ln: 632189499363557376 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 0 [capacity: 1,000,000]

✅ 👪 SLL: 632187300239048704 (Last update: 11:39 UTC on Tuesday, 7 May 2019)

Pubkey: 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 0 [capacity: 1,000,000]

✅ 👪 ln.taborsky.cz: 632189499363622912 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 0 [capacity: 1,000,000]

✅ 👪 VIX18: 632187300238983168 (Last update: 08:11 UTC on Saturday, 4 May 2019)

Pubkey: 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 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,036,619 [capacity: 1,144,265]

All Channels:

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 21:31 UTC on Monday, 6 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,773 / 0 [capacity: 1,000,000]

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 13:43 UTC on Monday, 6 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 LightningTo.Me: 632050960802447360 (Last update: 07:22 UTC on Tuesday, 7 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 11:15 UTC on Tuesday, 7 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 09:11 UTC on Monday, 29 April 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 ln.BitSoapBox.com: 632113632926957568 (Last update: 22:49 UTC on Monday, 6 May 2019)

Pubkey: 021607cfce19a4c5e7e6e738663dfafbbbac262e4ff76c2c9b30dbeefc35c00643

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,760 / 0 [capacity: 1,000,000]

✅ 👪 blackgold: 632112533487681536 (Last update: 22:29 UTC on Monday, 6 May 2019)

Pubkey: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,756 / 0 [capacity: 1,000,000]

✅ 👪 hirish-ln: 632189499363557376 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 036d81bb87af589f949dec53af1b3121c84048d0913eb56945cbbb62c5cb4fcb6f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 0 [capacity: 1,000,000]

✅ 👪 SLL: 632187300239048704 (Last update: 11:39 UTC on Tuesday, 7 May 2019)

Pubkey: 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 0 [capacity: 1,000,000]

✅ 👪 ln.taborsky.cz: 632189499363622912 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 0 [capacity: 1,000,000]

✅ 👪 VIX18: 632187300238983168 (Last update: 08:11 UTC on Saturday, 4 May 2019)

Pubkey: 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,714 / 0 [capacity: 1,000,000]

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 10:03 UTC on Tuesday, 7 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥕🥕🥕] 2,996,699 / 992,071 [capacity: 4,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 04:26 UTC on Tuesday, 7 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🥝🥝🥝🥝🥝🥕🥕🥕🥕🥕] 506,714 / 482,056 [capacity: 1,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 11:15 UTC on Tuesday, 7 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 996,709 / 992,061 [capacity: 2,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 11:43 UTC on Tuesday, 7 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 496,710 / 492,060 [capacity: 1,000,000]

⭕ 👪 ln1.satoshilabs.com: 631652937637363712 (Last update: 02:57 UTC on Tuesday, 7 May 2019)

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 496,215 / 492,555 [capacity: 1,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 11:15 UTC on Tuesday, 7 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 486,712 / 502,058 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 04:20 UTC on Tuesday, 7 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🥝🥝🥕🥕🥕🥕🥕🥕🥕🥕] 291,688 / 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,036,619 [capacity: 1,144,265]


Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

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

More channels

Let’s open some more channels.

I’m still trying to achieve a balance between reach and necessity, but I’m not sure how best to achieve that balance.

I’d like to have some more connections to nodes that will expand my reach - make more nodes available in just a couple of hops. Moneni’s NodeMatch still looks like a good tool to help here.

I’d also like to hook into under-served clusters of nodes. They’re the ones that actually need liquidity and are the ones I most want to help. But I don’t know how to find such groups. I don’t want to just pick random nodes that have few connections - that way seems like it would just end with under-used channels.

So I’m going to open 10 channels at 1million sats each - 5 from Moneni’s NodeMatch list, and 5 underserved clusters.

NodeMatch for my node is dominated by LNBIG nodes. I’ve removed them all from this list because:

  • I think opening a channel with more than one of them would make all the others in the list disappear. (LNBIG’s nodes are all interconnected.)
  • I’m kinda hoping LNBIG will open a channel with me at some point, since they usually open a channel with everyone.

So with LNBIG removed, here are the top 5 NodeMatches:

Rank 1. Sagittarius A (Would add 397 more nodes with two hops , 1508 more nodes with three hops , 2251 more nodes with four hops)
Rank 9. ACINQ (Would add 269 more nodes with two hops , 1218 more nodes with three hops , 2303 more nodes with four hops)
Rank 10. 1ML.com node ALPHA (Would add 254 more nodes with two hops , 1137 more nodes with three hops , 2301 more nodes with four hops)
Rank 17. LightningTo.Me (Would add 231 more nodes with two hops , 1290 more nodes with three hops , 2268 more nodes with four hops)
Rank 21. ln.BitSoapBox.com (Would add 219 more nodes with two hops , 1339 more nodes with three hops , 2213 more nodes with four hops)

$ lncli openchannel --node_key 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019 --connect 37.59.50.48:9735 --local_amt 1000000

{

"funding_txid": "6eae3850952fc1c6e9939c86e122c9644c31e177dc12254ce56f4e5216f82aff"

}

$ lncli openchannel --node_key 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f --connect 34.239.230.56:9735 --local_amt 1000000

{

"funding_txid": "6a084acfdbcf69b0bf6f48e41352c75598a3f9a21d94871c7e6cebb5c572b824"

}

$ lncli openchannel --node_key 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266 --connect 23.237.77.11:9735 --local_amt 1000000

{

"funding_txid": "e72bf885048324a0c181e19df00b026894c6148bdb7115f5a76b01d86c0cb838"

}

$ lncli openchannel --node_key 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d --connect 138.68.14.104:9735 --local_amt 1000000

{

"funding_txid": "489d2ef2b904ec0b0687517ad52451f868987f13b2073b5cc1b807c3f0d61c95"

}

$ lncli openchannel --node_key 021607cfce19a4c5e7e6e738663dfafbbbac262e4ff76c2c9b30dbeefc35c00643 --connect 138.201.60.38:9735 --local_amt 1000000

{

"funding_txid": "e9b82ef41479d2d7b4782681f824062bfbe605161dac735e6afcbe9794db0325"

}


I’d love to have an automated way of finding good clusters of nodes to connect with, but the best way I’ve found so far is to load up a Lightning Network visualiser and try to spot them by eye. If you know of a better way, please do let me know!

I loaded 1ml.com’s visualiser and tried to spot nodes away from the centre that had more than 20 channels but fewer than 50. Plenty to choose from, but here’s my selection:

blackgold: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d
VIX8: 03f8ab9b7496be92ce370e0224661d5d2de80bca8f505d66f1226d0e6002007d2a
SLL: 039401f72bc0d40efb58b01de15527a2a5ae1943d7c29067b725a1467a93c7e66f
NSCasa: 0396632392e7902dfbc83c46831f921842a93d8cbc68232eb90b4d723230bcec59
ln.taborsky.cz: 0265fae305778b7cb157365f70cf3a2047d2cad5c1ccc5f550c6d8a033084a8ea5

$ lncli openchannel --node_key 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d --connect 88.198.91.250:9735 --local_amt 1000000

{

"funding_txid": "be6b41a4011edda57dea3e737a06c98cee73a9aa717b2658578bdfeb92037f97"

}

...and that’s where things stalled. Now things have been sitting for hours with an unconfirmed balance:

$ watch -n 30 lncli walletbalance

Every 30.0s: lncli walletbalance

{

"total_balance": "36379183",

"confirmed_balance": "980156",

"unconfirmed_balance": "35399027"

}

So most of my wallet balance is now tied up as inputs to transactions that haven’t been added to any blocks in the chain yet. Oh well. I guess I’ll pause there for the day.

Autopilots

Rene Pickhardt has implemented autopilot functionality for c-lightning. It can use the following heuristics:

  1. Random: following the Erdoes Renyi model nodes are drawn from a uniform distribution
  2. Central: nodes are sampled from a distribution proportional to the betweeness centrality of nodes
  3. Decrease Diameter: nodes are sampled from distribution of the nodes which favors badly connected nodes
  4. Richness: nodes with high liquidity are taken and it is sampled from a uniform distribution of those

I like the idea of those heuristics!

LND has autopilot functionality but it’s not yet recommended for mainnet. As far as I can tell, it uses ‘BOS scores’ as an opaque scoring mechanism for nodes, where higher numbers are better. I’ve no idea what the BOS score of my node is though (it doesn’t appear on either of the sites that say they’ll tell you your BOS score) or what the BOS scores of other nodes are.

I do worry that everything is trying to do too much though. One of the reasons I’m writing lntoolkit is as a reaction to all the monolithic code that’s appearing. An autopilot for LND is a good idea, but does it really need to be built in to LND? Why not just have a separate program that calls into LND? Keep that program simple, keep LND simple.

Maybe it’s just me that likes the predictability of having an autopilot with specific, configured heuristics and boundaries that runs as a cron job and calls LND’s public API. I think predictability is far too unappreciated these days.

Finally, as usual here'’s the current report:

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 49,679,612 satoshi, Wallet: 36,379,183 satoshi (980,156 satoshi/35,399,027 satoshi)

Fees: 4 this month, 4 this week, 3 today

Channels: 13 active, 0 inactive, 2 pending, containing: 13,300,429 satoshi

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

URI: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735

Pending - Open:

⭕ 🚶 ln.BitSoapBox.com: 0 (Last update: 13:42 UTC on Monday, 6 May 2019)

Pubkey: 021607cfce19a4c5e7e6e738663dfafbbbac262e4ff76c2c9b30dbeefc35c00643

Fees: --+--/-- / --+--/--

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 992,052 / 0 [capacity: 1,000,000]

⭕ 🚶 blackgold: 0 (Last update: 14:29 UTC on Tuesday, 30 April 2019)

Pubkey: 02f40890af885da4673f0ee9725ee74bb2c66d6491cc4334056a2701057993e61d

Fees: --+--/-- / --+--/--

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 992,050 / 0 [capacity: 1,000,000]

Pending - Close:

None.

Pending - Force Close:

None.

Pending - Waiting To Close:

None.

Unbalanced - High:

✅ 👪 LightningTo.Me: 632050960802447360 (Last update: 13:42 UTC on Monday, 6 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 991,210 / 0 [capacity: 1,000,000]

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 22:03 UTC on Sunday, 5 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 989,856 / 0 [capacity: 1,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 13:43 UTC on Monday, 6 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 09:11 UTC on Monday, 29 April 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 13:43 UTC on Monday, 6 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 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,036,619 [capacity: 1,144,265]

All Channels:

✅ 👪 LightningTo.Me: 632050960802447360 (Last update: 13:42 UTC on Monday, 6 May 2019)

Pubkey: 03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 991,210 / 0 [capacity: 1,000,000]

✅ 👪 BitMEXResearch: 631655136611991552 (Last update: 22:03 UTC on Sunday, 5 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 989,856 / 0 [capacity: 1,000,000]

✅ 👪 Sagittarius A: 632050960773152769 (Last update: 13:43 UTC on Monday, 6 May 2019)

Pubkey: 03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 ACINQ: 632050960761552897 (Last update: 09:11 UTC on Monday, 29 April 2019)

Pubkey: 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 1ML.com node ALPHA: 632050960770990080 (Last update: 13:43 UTC on Monday, 6 May 2019)

Pubkey: 0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,771 / 0 [capacity: 1,000,000]

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 09:37 UTC on Monday, 6 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥕🥕🥕] 2,996,699 / 992,071 [capacity: 4,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 12:28 UTC on Monday, 6 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🥝🥝🥝🥝🥝🥕🥕🥕🥕🥕] 507,799 / 482,056 [capacity: 1,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 01:28 UTC on Monday, 6 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 996,709 / 992,061 [capacity: 2,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 05:58 UTC on Monday, 6 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 496,710 / 492,060 [capacity: 1,000,000]

✅ 👪 ln1.satoshilabs.com: 631652937637363712 (Last update: 15:32 UTC on Monday, 6 May 2019)

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 496,215 / 492,555 [capacity: 1,000,000]

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

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🥝🥝🥝🥝🥕🥕🥕🥕🥕🥕] 486,712 / 502,058 [capacity: 1,000,000]

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

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🥝🥝🥕🥕🥕🥕🥕🥕🥕🥕] 291,688 / 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,036,619 [capacity: 1,144,265]


Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

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

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

Rebalancing and looping

OK, now we’re getting to the interesting stuff. Now that I have some channels open I need to balance them so there’s liquidity on both sides.

Right now the channels I opened have 100% liquidity on my side and 0% liquidity on the other side. That means I can transfer funds out from my node to the other nodes but I can’t accept anything coming in on those channels. In order to provide a routing service I’d like to have bidirectional routing so I can transfer funds in either direction.

For now I’m aiming for a balance of 50% on both sides. I may be able to make smarter decisions about this for certain nodes in the future (some nodes may be particularly popular as destinations, some particularly popular as sources) but for now 50% seems like a decent starting point.

How do I get a channel to 50% on both sides without just giving 50% of the funds away? There are two common options available to me:

  • Lightning Labs’ Loop
  • Sending funds on a ‘circular route’

Loop

Loop is a component and on-chain service provided by Lightning Labs to allow you to take funds out of your channels. (The ability to add funds to a channel is in-progress but it’s not available right now.) There’s quite a bit of detail to dig into if you like.

The big downside to loop (as I understand it) is the fees. Loop requires some on-chain transactions and also can tie up some of Lightning’s capital in timeouts so it’s not a cheap option.

Here are the current terms:

$ loop terms Loop Out -------- Amount: 250000 - 1000000 Fee: 7810 + 0.0000 % (16006 prepaid) Cltv delta: 50 blocks Loop In ------ rpc error: code = Unknown desc = function not available on mainnet

I plan on using loop, but it's not my first-choice tool. If I can manage things without on-chain transactions that should be cheaper overall.

But for now I have a lot of open channels that are full, so let’s give loop a go.

Let’s start with BitRefill. I have 4million sats on one side and 0 sats on the other.

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 12:50 UTC on Friday, 3 May 2019) Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f Fees: 1,000+1/40 / 4,000+40/144 Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 3,990,856 / 0 [capacity: 4,000,000]

$ loop out --channel 631589165900038144 --amt 1000000 Max swap fees for 1000000 Loop Out: 46858 CONTINUE SWAP? (y/n), expand fee detail (x): y Swap initiated ID: 03de8f654e7dc866e0a7c0fc796a05bdda005a625afd2c2bd453ebf98fec372d HTLC address: bc1qtzl03jzvqfz4f38tvq2rhwejjgtn6svw8yk3kv6t3w7qq07jwsfq3ntmrz Run `loop monitor` to monitor progress.

The cost of using loop for 1,000,000sats was (up to) 46858sats - or about $2.65 at today’s conversion rate. (For reference, opening a channel today cost about $0.50.)

$ loop monitor 2019-05-03T16:20:24Z LOOP_OUT INITIATED 0.01 BTC - bc1qtzl03jzvqfz4f38tvq2rhwejjgtn6svw8yk3kv6t3w7qq07jwsfq3ntmrz 2019-05-03T16:22:21Z LOOP_OUT FAILED 0.01 BTC - bc1qtzl03jzvqfz4f38tvq2rhwejjgtn6svw8yk3kv6t3w7qq07jwsfq3ntmrz

Well that’s not good. Here’s what the logs say:

2019-05-03 16:20:24.269 [INF] LOOPD: Loop out request received 2019-05-03 16:20:24.274 [INF] CLIENT: LoopOut 0.01 BTC to bc1ql5dasgqmhs9grk37f5mnjc6xn4e8xnc0253ash (channel: 0xc00016af90) 2019-05-03 16:20:24.279 [INF] CLIENT: Initiating swap request at height 574454 2019-05-03 16:20:24.933 [INF] CLIENT: 03de8f Htlc address: bc1qtzl03jzvqfz4f38tvq2rhwejjgtn6svw8yk3kv6t3w7qq07jwsfq3ntmrz 2019-05-03 16:20:24.937 [INF] CLIENT: 03de8f state Initiated 2019-05-03 16:20:24.937 [INF] CLIENT: 03de8f Sending swap payment lnbc9931700n1pwvc6jgpp5q00g7e2w0hyxdc98cr78j6s9hhdqqknztt7jc275204lnrlvxuksdq8wdmkzuqcqzryxq97zvuqrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z96xqqqg9cqqyqqqqlgqqqqqqgq9qrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z9aryqq3fqqqqqqqqlgqqqqqqgq9qrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z9t3vqq8dsqqqqqqqlgqqqqqqgqjqrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z9aryqq38qqqyqqqqlgqqqqqqgq9q49c8x2zm2mm3ruy25c0z3zfqghze6ga524vyppqknqlsg3ed9n9j75frlfds8nulkdyjlsm7zqcn5jj436th3mal8xtr5d493r9302gqalz388 2019-05-03 16:20:24.937 [INF] CLIENT: 03de8f Sending prepayment lnbc133390n1pwvc6jgpp57z0p09eh0w06s4kcwdn7j5cdlds3a5ngte35s4nz3newarq9edzsdq2wpex2urp0ycqzryxq97zvuqrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z96xqqqg9cqqyqqqqlgqqqqqqgq9qrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z9aryqq3fqqqqqqqqlgqqqqqqgq9qrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z9t3vqq8dsqqqqqqqlgqqqqqqgqjqrzjqgwf02g2gy0l9vgdc25wxt0z72wjlfyagxlmk54ag9hyvrdsw37s6z9aryqq38qqqyqqqqlgqqqqqqgq9qs98eyl3uvzjk3hjkzzzttr6wxl0s8tgudcmthaftglznyyhgy8wz4hy0p8j5rrx9vg9evuwusuc4tahunc2q2r5f67teqjw5mkp7s3sp59lv06 2019-05-03 16:20:24.938 [INF] CLIENT: 03de8f Register conf ntfn for swap script on chain (hh=574454) 2019-05-03 16:20:24.938 [INF] CLIENT: 03de8f Checking preimage reveal height 574484 exceeded (height 574454) 2019-05-03 16:20:24.938 [INF] CLIENT: 03de8f Waiting for either htlc on-chain confirmation or off-chain payment failure 2019-05-03 16:20:32.826 [INF] LOOPD: Monitor request received 2019-05-03 16:21:27.759 [WRN] LNDCLIENT: Payment 03de8f654e7dc866e0a7c0fc796a05bdda005a625afd2c2bd453ebf98fec372d failed: payment attempt not completed before timeout of 1m0s 2019-05-03 16:21:27.760 [INF] CLIENT: 03de8f Failed swap payment: payment attempt not completed before timeout of 1m0s 2019-05-03 16:21:27.760 [INF] CLIENT: 03de8f Wait for server pulling off-chain payment(s) 2019-05-03 16:22:21.043 [WRN] LNDCLIENT: Payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: payment attempt not completed before timeout of 1m0s 2019-05-03 16:22:21.043 [INF] CLIENT: 03de8f Prepayment failed: payment attempt not completed before timeout of 1m0s 2019-05-03 16:22:21.043 [INF] CLIENT: 03de8f Swap completed: FailOffchainPayments (final cost: server 0 BTC, onchain 0 BTC) 2019-05-03 16:22:21.049 [INF] CLIENT: 03de8f state FailOffchainPayments

Hmm. I don’t know what happened there. It tried to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45, which failed, so let’s see what LND says about that payment:

$ docker logs --tail 2000 lnd_lnd_1 | grep f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 2019-05-03 16:20:29.345 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) { 2019-05-03 16:20:31.121 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) { 2019-05-03 16:20:32.244 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc0028600b0)({ 2019-05-03 16:20:33.405 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc002860000)({ 2019-05-03 16:20:34.676 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc002860000)({ 2019-05-03 16:20:36.273 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc002860000)({ 2019-05-03 16:20:38.151 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) { 2019-05-03 16:20:40.012 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) { 2019-05-03 16:20:42.433 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) { 2019-05-03 16:20:44.786 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) { 2019-05-03 16:20:45.704 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc002860000)({ 2019-05-03 16:20:48.796 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) { 2019-05-03 16:20:51.198 [ERR] CRTR: Attempt to send payment f09e1797377b9fa856d87367e9530dfb611ed2685e634856628cf2ee8c05cb45 failed: FeeInsufficient(htlc_amt==13340013 mSAT, update=(lnwire.ChannelUpdate) {

Looks to me like there were 13 different attempts to send the payment to the swap server and they all failed, with either TemporaryChannelFailure or FeeInsufficient.

TemporaryChannelFailure happens all the time as far as I can tell. It usually means one of the hops on the route was offline or had some other problem, and the payment couldn’t get past it.

FeeInsufficient is maybe a bit more interesting. It shouldn’t happen because the nodes all declare the fees they charge as part of their channel policies, but it seems pretty common for this data to become outdated. If someone updates the fee policy on their channel, that update has to make it out across all the nodes on the network and that can take time. In the meantime nodes that haven’t received the updated policy are calculating the fees they need to pay based on old data, and (as in this case) don’t send enough to cover the required fees.

At least I think that’s what’s going on - do you know different?

Circular routes

So how can I try to maintain channels with a balance of inbound and outbound liquidity if I don’t want to pay the on-chain costs of loop? That’s easy in principle and hard in practice.

The idea is that you pay money out on a channel of yours that has too much liquidity, and have it come back to you through a channel with too little liquidity. You build a ‘circular route’ for the money to flow so that all of it (apart from routing fees) comes back to you.

This is great because all you pay are routing fees and they’re usually much cheaper than on-chain transaction fees.

The problems with this are:

  • You need a channel with too much liquidity.
  • You need a channel that can accept enough of that liquidity.
  • LND doesn’t provide any native support for calculating circular routes. (It does provide sendtoroute which can send the funds on the circular route, but it doesn’t help with figuring out what that circular route is.)

Good news though! Someone opened a channel with me! I’ve no idea who it was, or if it’s an automated thing, but I now have this channel:

✅ 🚶 03f175627ecd2b736fdd: 631605658598703105 (Last update: 14:20 UTC on Friday, 3 May 2019) Pubkey: 03f175627ecd2b736fdd29f40414c02169716f884b4b45762483142ed81834141c Fees: 1,000+1/40 / 1,000+1/40 Balances: [🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸] 0 / 1,135,116 [capacity: 1,144,265]

It seems a pretty new node - it hasn’t made it to 1ml.com yet, and it’s not even in my own channel graph when I try to shift some balances around:

$ lntoolkit move-balance --from 631562777641943040 --to 631605658598703105 --amount 500000 2019/05/03 15:29:36 🚨 Exiting with error: finding 'To' edge: could not find ChannelEdge with channel ID '631605658598703105'

So, not a resounding success today. I failed to ‘loop out’ from multiple channels, and I failed to move balances because the only channel I have that could accept liquidity seems to only partially exist.

It looks like I have quite a few issues to work through now! Any advice?

Also, if you want to open a channel with my node, it is:

023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735

Here’s the latest report on my node:

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 49,878,288 satoshi, Wallet: 37,966,360 satoshi (37,966,360 satoshi/0 satoshi)

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

Channels: 7 active, 2 inactive, 0 pending, containing: 11,911,928 satoshi

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

URI: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735

Pending:

None.

Unbalanced - High:

⭕ 👪 Bitrefill.com: 631589165900038144 (Last update: 21:45 UTC on Friday, 3 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 3,990,856 / 0 [capacity: 4,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 17:44 UTC on Friday, 3 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 1,988,309 / 0 [capacity: 2,000,000]

⭕ 👪 BitMEXResearch: 631655136611991552 (Last update: 08:20 UTC on Saturday, 4 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 991,192 / 0 [capacity: 1,000,000]

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

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,335 / 0 [capacity: 1,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 09:05 UTC on Friday, 3 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 0 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 07:12 UTC on Saturday, 4 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 0 [capacity: 1,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 21:45 UTC on Friday, 3 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 0 [capacity: 1,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 06:44 UTC on Saturday, 4 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 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: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 0 / 1,134,097 [capacity: 1,144,265]

All Channels:

⭕ 👪 Bitrefill.com: 631589165900038144 (Last update: 21:45 UTC on Friday, 3 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 3,990,856 / 0 [capacity: 4,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 17:44 UTC on Friday, 3 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 1,988,309 / 0 [capacity: 2,000,000]

⭕ 👪 BitMEXResearch: 631655136611991552 (Last update: 08:20 UTC on Saturday, 4 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 991,192 / 0 [capacity: 1,000,000]

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

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,335 / 0 [capacity: 1,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 09:05 UTC on Friday, 3 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 0 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 07:12 UTC on Saturday, 4 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 0 [capacity: 1,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 21:45 UTC on Friday, 3 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 0 [capacity: 1,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 06:44 UTC on Saturday, 4 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🥝🥝🥝🥝🥝🥝🥝🥝🥝🥝] 988,309 / 0 [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: [🥕🥕🥕🥕🥕🥕🥕🥕🥕🥕] 0 / 1,134,097 [capacity: 1,144,265]

Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

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

Tidying up

The Time4VPS S1 instance bitcoind server has chugged along happily overnight with LND connected to it. No out-of-memory restarts. That’s good, and seems a nice, cheap way to run a full node. At €5.99 per month it’s the cheapest way I've found to run a hosted bitcoind node. Unless of course you know different!

I've retired my old LND node, my old BTCD node, and my temporary S2 instance.

When closing my old LND node, I changed its name a few days ago to put ‘(retired)’ at the end. I’d hoped that change would propagate out to services that watch the graph to show that the server isn’t in use any more. It doesn’t look like it made it to 1ml though.

Also, I wanted to move everything out of that LND server’s wallet and I wasn’t sure how to do that - how do you calculate the fees so you know how much to actually move? It turns out the LND team have already thought of that and provide the sweepall option to just move everything out of the wallet and subtract the fees automatically:

lncli sendcoins --sweepall destination-address

Handy to know!

Incoming Advice

Time4VPS got in touch to tell me:

Our Linux VPS https://www.time4vps.com/linux-vps/ supports @Docker and swap memory. Just letting you know ;)

That’s good to know, but unfortunately the bitcoin blockchain is so big that I’d be using the ‘Linux 48‘ option with 480GB of space, and that would cost a whopping €129.99 per month! (The current blockchain would fit in the €65.99 per month ‘Linux 32‘ but when I were a lad we were taught to try to keep partitions no more than half full on average. That may be an NTFS legacy though.)

They offered to put me in touch with their support/sales team to find a solution, but I declined. I’m not cheap but I do want to see how cheaply this can be done. So far, €5.99 per month for bitcoind hosting at Time4VPS plus $10 per month for lnd hosting at Vultr seem to be winners.

Actually opening channels

I want to start opening channels with a few nodes that are ‘destinations’ - places people want to send money to - as well as a few nodes that are well-connected ‘hubs’. This won’t lead to much routing on its own, but it’s the kind of connectivity that can serve as a good basis for connecting to the less well-served nodes that actually do need the routing. That will come later, but for now I’ll try opening channels with some destinations and hubs.

What channels to open?

According to the article Shutdown capacity.network after 50 day:

Highest out volume to LivingRoomSatoshi, BitRefill, Coingate, and Lightning-Roulette.

That seems a useful starting point. I realise they’ll be popular with other routing nodes too, but I think it’s useful to dedicate some capacity towards them.

I’m going to avoid LivingRoomSatoshi because my old node used to have a channel with them and I couldn’t do anything with it. I couldn’t rebalance it or loop funds out. I don’t know why, but I don’t want to open a ‘stuck’ channel if I can avoid it.

That means I want to channels with BitRefill, Coingate and Lightning-Roulette. And here are the results:

  • BitRefill - This node requires channels be at least 4,000,000sats. That’s more than I was hoping to devote to a single channel right now, but in the end I decided to go with it anyway. The point of this is to experiment, and if it’s wrong I can just close the channel.

lncli openchannel --node_key 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f --connect 52.50.244.44:9735 --local_amt 4000000 { "funding_txid": "a53c8b0c94ee681a39fb5a5626ad80ab1e2db4f518fcdc8ae4554e03fc9617f9" }

lncli openchannel --node_key 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3 --connect 18.184.237.59:9735 --local_amt 1000000 { "funding_txid": "ba7d1229f8269a1815e350fa576dd8165194dfef1fde542f4876540467076886" }

lncli openchannel --node_key 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403 --connect 35.204.214.101:9735 --local_amt 1000000 { "funding_txid": "9ccdac4a53d8f2328595acbfbe2323f2e0ea396bc4dc3f7ddc0490c3b915c8d0" }


I also wanted to get a smattering of channels from Moneni’s Nodematch. Here are the top 5 from its report for my node:

  1. 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84@40.69.71.114:9736 powernode.io
    Would add 559 more nodes with two hops , 192 more nodes with three hops , 109 more nodes with four hops
  2. 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b@167.99.50.31:9735 rompert.com🔵
    Would add 303 more nodes with two hops , 186 more nodes with three hops , 74 more nodes with four hops
  3. 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c@74.108.13.152:9735 LightningPowerUsers.com
    Would add 295 more nodes with two hops , 244 more nodes with three hops , 102 more nodes with four hops
  4. 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4@51.15.103.198:9735 ln1.satoshilabs.com
    Would add 286 more nodes with two hops , 260 more nodes with three hops , 92 more nodes with four hops
  5. 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f@138.68.157.208:9735 BitMEXResearch
    Would add 278 more nodes with two hops , 276 more nodes with three hops , 118 more nodes with four hops

I opened a 1million sat channel with each of them except for ‘powernodeio’ which had a minimum channel size requirement of 2million sats. Here are the commands and transaction results:

lncli openchannel --node_key 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84 --connect 40.69.71.114:9736 --local_amt 2000000 { "funding_txid": "813086a992e7e1d9a29df82a1900f36a9629aa9259dcea18abae435650a620a7" }

lncli openchannel --node_key 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b --connect 167.99.50.31:9735 --local_amt 1000000 { "funding_txid": "f3c48a381215814fc5860dfcab4b87fd338b6d0399884864ac397b059b3e57a3" }

lncli openchannel --node_key 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c --connect 74.108.13.152:9735 --local_amt 1000000 { "funding_txid": "5c16297c8a7b710640be40d3ba209887a61d7ef8c86332b8e33985fcb20218f9" }

lncli openchannel --node_key 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4 --connect 51.15.103.198:9735 --local_amt 1000000 { "funding_txid": "e6668d6cd1f90918e6bdbdc63f79603a9714f24eac951e212d08b41098b56c01" }

lncli openchannel --node_key 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f --connect 138.68.157.208:9735 --local_amt 1000000 { "funding_txid": "c8fbb6e78f26bd5f63419c172384b79a1209478dd30184b68711c6d1f916b1be" }

So that’s where we are now - some channels have confirmed, and a couple are still pending. As you can see, all the open channels are shown as ‘Unbalanced - High’ because they’re full and I’ve made no attempt to balance them. That’s a job for another day.

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 49,895,224 satoshi, Wallet: 37,966,360 satoshi (0 satoshi/37,966,360 satoshi)

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

Channels: 6 active, 0 inactive, 2 pending, containing: 11,928,864 satoshi

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

URI: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735


Pending - Open:

⭕ 🚶 ln1.satoshilabs.com: 0 (Last update: 02:56 UTC on Friday, 3 May 2019)

Pubkey: 0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4

Fees: --+--/-- / --+--/--

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]

⭕ 🚶 BitMEXResearch: 0 (Last update: 19:26 UTC on Thursday, 2 May 2019)

Pubkey: 0395033b252c6f40e3756984162d68174e2bd8060a129c0d3462a9370471c6d28f

Fees: --+--/-- / --+--/--

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]


Pending - Close:

None.


Pending - Force Close:

None.


Pending - Waiting To Close:

None.


Unbalanced - High:

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 12:50 UTC on Friday, 3 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 3,990,856 / 0 [capacity: 4,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 12:50 UTC on Friday, 3 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 1,990,856 / 0 [capacity: 2,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 09:05 UTC on Friday, 3 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 13:02 UTC on Friday, 3 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 09:10 UTC on Friday, 3 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 13:02 UTC on Friday, 3 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]


Unbalanced - Low:

None.


All Channels:

✅ 👪 Bitrefill.com: 631589165900038144 (Last update: 12:50 UTC on Friday, 3 May 2019)

Pubkey: 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 3,990,856 / 0 [capacity: 4,000,000]

✅ 👪 powernode.io: 631589165899972608 (Last update: 12:50 UTC on Friday, 3 May 2019)

Pubkey: 02809e936f0e82dfce13bcc47c77112db068f569e1db29e7bf98bcdd68b838ee84

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 1,990,856 / 0 [capacity: 2,000,000]

✅ 👪 CoinGate: 631562777641943040 (Last update: 09:05 UTC on Friday, 3 May 2019)

Pubkey: 0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]

✅ 👪 rompert.com🔵: 631590265456623616 (Last update: 13:02 UTC on Friday, 3 May 2019)

Pubkey: 02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]

✅ 👪 lightning-roulette.com: 631563877105729536 (Last update: 09:10 UTC on Friday, 3 May 2019)

Pubkey: 031678745383bd273b4c3dbefc8ffbf4847d85c2f62d3407c0c980430b3257c403

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]

✅ 👪 LightningPowerUsers.com: 631590265456689152 (Last update: 13:02 UTC on Friday, 3 May 2019)

Pubkey: 0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c

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

Balances: [🔷🔷🔷🔷🔷🔷🔷🔷🔷🔷] 991,192 / 0 [capacity: 1,000,000]


Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

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

LND finally finished syncing. That initial sync can take a long time - I’d forgotten just how long...

I’ve done a bit more setup stuff. The S0.5 Time4VPS instance (€3.99 per month) just wouldn’t cut it. It kept running out of memory, restarting bitcoind. I turned off a couple of services that were running by default but it didn’t help much:

chkconfig sendmail off

chkconfig smb off

So I’ve upgraded it to an S1 instance (€5.99 per month). We’ll see how that gets on.

I also took this opportunity to upgrade bitcoind to Bitcoin Core 0.18. For the record, here’s my current bitcoind configuration. If you spot anything wrong with it please do let me know! (I’ve changed all the IP addresses and other sensitive bits.)

# Own public IP address.

externalip=1.2.3.4


# RPC server configuration

server=1

rpcbind=0.0.0.0:8332


# LND server

rpcallowip=5.6.7.8


# Other IP

rpcallowip=9.10.11.12


# Authentication - generated by Core's rpcauth.py script. Can have multiple rpcauth= lines.

# Format is rpcauth=<USERNAME>:<SALT>$<HASH>

rpcauth=nope:nope$nope


# Zero MQ

zmqpubrawblock=tcp://1.2.3.4:28332

zmqpubrawtx=tcp://1.2.3.4:28333


# Options only for mainnet

[main]

bitcoind won’t start the RPC server unless you specify the IP addresses you want to connect from, so there are a couple of rpcallow lines. That then restricts RPC connections to only allow from those specified addresses.

However, there’s no such niceness for the ZeroMQ ports. They’re unauthenticated and open, so if I want to protect them I need to take that into my own hands. In this case I added some iptables rules to limit incoming connections to just the same IP addresses as for RPC. I used the following commands:

iptables -A INPUT -p tcp --dport 28332 -s 5.6.7.8/32 -j ACCEPT

iptables -A INPUT -p tcp --dport 28332 -s 9.10.11.12/32 -j ACCEPT

iptables -A INPUT -p tcp --dport 28332 -j DROP

iptables -A INPUT -p tcp --dport 28333 -s 5.6.7.8/32 -j ACCEPT

iptables -A INPUT -p tcp --dport 28333 -s 9.10.11.12/32 -j ACCEPT

iptables -A INPUT -p tcp --dport 28333 -j DROP

Then I saved those rules to make them permanent across reboots.

Now that LND is ready, I’ve transferred some funds to this new instance. I’m starting with 0.5BTC (I may add more or take some out, but for now I’m using half a bitcoin.)

I sent the coins from my old LND server, and I did it in two transactions. Why? Because if I did it in one transaction, I’d only have one UTXO, which would mean I would only be able to have a single channel-opening transaction on the go at one time. This way I’ll have two UTXOs, so I can tell LND to open a channel and - while I’m waiting for that to confirm - I can open another channel. (There are better, smarter ways to handle this, but this keeps it all nice and simple for me.)

I just ran:

sendcoins p2wkh-address 25000000

endcoins p2wkh-address 25000000

I use lntoolkit (disclosure: I wrote it) to send me regular reports on my server, so here’s the current state of play:

OpinionatedGeek ⚡ - synced: ✅

Total Balance: 50,000,000 satoshi, Wallet: 50,000,000 satoshi (50,000,000 satoshi/0 satoshi)

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

Channels: 0 active, 0 inactive, 0 pending, containing: 0 satoshi

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

URI: 023c5b5667b16cd7fcca5591a8c0f47beb76c9405e16a4f2d6b42c7b9904a7f0e6@95.179.191.59:9735

Pending:

None.

Unbalanced - High:

None.

Unbalanced - Low:

None.

All Channels:

None.

And that’s where we are now - the LND server is up, running and funded.

Next up, opening some channels.

Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

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

Let’s try creating a new LND node for routing.

I have no idea how well this will work, or how it will turn out, or when we'll all get too bored to bother about updating this, but for now let’s try. And I don’t expect to get rich from routing fees but it might be an interesting exercise.

I'm going to create a new LND node and start with zero channels. Then I’ll try to build that up into a node that handles significant routing of payments. I don’t know how to do this, but with help and advice from around the net I’ll give it a go and keep you updated.

I plan on being pretty transparent about this. You’ll see at least some of:

  • The commands I run
  • The results
  • The fees it generates

So, this is the starting point. 0.5BTC in the wallet, 0 channels.

My LND node is running on a Vultr instance that costs $10 per month. I could probably run it on a $5 per month instance but I want to run additional servers on that same hardware. This is running against a bitcoind node on Time4VPS. LND is syncing right now so we’ll get started opening a few channels once it has finished and I’ve transferred in some BTC.

Syncing bitcoind with the chain was problematic. The S0.25 instance (€2.99 per month) was out because it didn’t have enough disk space to hold the mainnet blockchain. Neither the S0.5 (€3.99 per month) nor the S1 (€4.99 per month) instances would sync well - they kept running out of memory and crashing. I don’t know if that’s an initial sync thing or if it’ll require that level of memory constantly. One of the things I plan on trying is syncing LND with the S2 instance I’m running now (at €9.99 per month) and once it’s up and running switch over to an S0.5 to see how it gets on. It’s disappointing that Time4VPS instances don’t support virtual memory or docker though, but they are an awful lot cheaper than AWS instances.

If you want to help support this kind of thing, I’ll put up some donation addresses or something once the server is actually up and running.

<fx>Drums fingers waiting for LND to finish syncing</fx>

While we’re waiting to get to the interesting bit, here’s the Upstart script I use to run bitcoind at startup on my Time4VPS instances:

description "bitcoind" start on runlevel [0123456] stop on runlevel [!$RUNLEVEL] respawn respawn limit 10 60 # 10 times in 60 seconds script mkfifo /tmp/bitcoind-log-fifo ( logger -t bitcoind </tmp/bitcoind-log-fifo & ) exec >/tmp/bitcoind-log-fifo rm /tmp/bitcoind-log-fifo exec /root/bin/bitcoind 2> /dev/null end script


Updated 29th May 2019. I now use the following which seems to start bitcoind more reliably on the Time4VPS CentOS 6.10 instances:

description "bitcoind"

start on stopped rc RUNLEVEL=[345]

stop on runlevel [!345]


respawn

respawn limit 10 60 # 10 times in 60 seconds


script

mkfifo /tmp/bitcoind-log-fifo

( logger -t bitcoind </tmp/bitcoind-log-fifo & )

exec >/tmp/bitcoind-log-fifo

rm /tmp/bitcoind-log-fifo

exec /root/bin/bitcoind 2>&1

end script

If you want to get in touch to offer advice on next steps, the best ways are probably Mastodon or Twitter.

Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659

‘Short But Quite Useful’

Score: 4/5

Ukes are fun. They’re an instrument that’s hard to pick up without smiling. Inherently silly, they blend well with kazoos rather than flutes, shakers rather than drums.

But ukuleles are still musical instruments, and the same music theory applies. This book tries to bring across just enough music theory to make a ukulele player dangerous. There’s chord structure, scales, the circle of fifths, all explained well and from a ukulele perspective.

It’s a short book, but it covers a lot of ground. It doesn’t explain playing in different modes, which is a bit of a shame from my point of view because I’ve never understood it... Then again it’s not something I’ve ever wanted to do on a uke. They’re fun!

Tags: 4 Word Book Reviews
Created by on Logo15659OpinionatedGeek Ltd.Logo15659