Skip to content

Stuck htlc after payment #4208

@grunch

Description

@grunch

Background

I had two nodes on testnet, a neutrino node (0.10.0-beta.rc2 commit=v0.10.0-beta.rc2-4-g9c4f9416d53b523b00ee34e5cb1dcd834c33e1e0) and a lnd full node (0.9.0-beta commit=v0.9.0-beta-469-gd04bc200e75ff47e41e6298d610221d44cb94058)

I opened a channel from neutrino to lnd for 4000000 sats, after confirmations the channels was working properly, then I created an invoice on lnd and it was paid by the neutrino node, after the payment the channel between both nodes changed to "active": false, showing the htlc in pending_htlcs.

This is the channel info

        {
            "active": false,
            "remote_pubkey": "022cfd97528beb47c1684c81b97137915f9f20b64187a3bee80532d4d09976774c",
            "channel_point": "7bd908fbb2237ca4964b9cbe78b39bc85b5ee2864a182434605a1d798eedf8c6:1",
            "chan_id": "1891407389894377473",
            "capacity": "4000000",
            "local_balance": "2999774",
            "remote_balance": "0",
            "commit_fee": "226",
            "commit_weight": "772",
            "fee_per_kw": "253",
            "unsettled_balance": "1000000",
            "total_satoshis_sent": "0",
            "total_satoshis_received": "0",
            "num_updates": "1",
            "pending_htlcs": [
                {
                    "incoming": false,
                    "amount": "1000000",
                    "hash_lock": "c92938ac68134ac1784299f5e3e9e229a3373aeb2d9b08de5d55271fee492c6b",
                    "expiration_height": 1720530
                }
            ],
            "csv_delay": 480,
            "private": false,
            "initiator": true,
            "chan_status_flags": "ChanStatusDefault",
            "local_chan_reserve_sat": "40000",
            "remote_chan_reserve_sat": "40000",
            "static_remote_key": true,
            "commitment_type": "STATIC_REMOTE_KEY",
            "lifetime": "80354",
            "uptime": "80354",
            "close_address": "",
            "push_amount_sat": "0",
            "thaw_height": 0
        },

This are the logs at the moment of failuer

2020-04-19 20:01:54.784 [INF] DISC: GossipSyncer(038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9): applying gossipFilter(start=0001-01-01 00:00:00 +0000 UTC, end=0001-01-01 00:00:00 +0000 UTC)
2020-04-19 20:01:54.785 [INF] DISC: GossipSyncer(02ec788f53255a5998a06eb0f89372737b93dc22926c5cd7e471e1930999c9830a): applying gossipFilter(start=2020-04-19 20:01:54.78575313 +0000 UTC m=+174478.374459307, end=2156-05-27 02:30:09.78575313 +0000 UTC m=+4295141773.374459307)
2020-04-19 20:02:54.784 [INF] DISC: Broadcasting 1 new announcements in 1 sub batches
2020-04-19 20:04:10.721 [INF] CRTR: Processed channels=0 updates=24 nodes=0 in last 2m58.390322798s
2020-04-19 20:04:24.784 [INF] DISC: Broadcasting 23 new announcements in 3 sub batches
2020-04-19 20:05:06.853 [ERR] HSWC: ChannelLink(1720225:52:1): failing link: ChannelPoint(7bd908fbb2237ca4964b9cbe78b39bc85b5ee2864a182434605a1d798eedf8c6:1): received error from peer: chan_id=c6f8ed8e791d5a603424184a86e25e5bc89bb378be9c4b96a47c23b2fb08d97a, err=internal error with error: remote error
2020-04-19 20:05:06.855 [ERR] HSWC: ChannelLink(1720225:52:1): link failed, exiting htlcManager
2020-04-19 20:05:06.856 [INF] HSWC: ChannelLink(1720225:52:1): exited
2020-04-19 20:05:06.857 [INF] HSWC: Removing channel link with ChannelID(c6f8ed8e791d5a603424184a86e25e5bc89bb378be9c4b96a47c23b2fb08d97a)
2020-04-19 20:05:06.858 [INF] HSWC: ChannelLink(1720225:52:1): stopping
2020-04-19 20:05:06.859 [INF] SRVR: Adding preimage=fe874da69e7b3f0737a380a2f0b5d498af69d9e4b03769853bb177946b9fe972 to witness cache
2020-04-19 20:05:10.721 [INF] CRTR: Processed channels=0 updates=0 nodes=1 in last 59.997862486s
2020-04-19 20:05:13.006 [INF] BTCN: Processed 1 block in the last 12m49.78s (height 1720488, 2020-04-19 20:04:44 +0000 UTC)
2020-04-19 20:05:13.011 [INF] BTCN: Attempting to fetch set of un-checkpointed filters at height=1720488, hash=00000000000001271109250d32383cca75dcea3c78956190421732b4e60af1dd
2020-04-19 20:05:23.016 [INF] BTCN: Verified 1 filter header in the last 12m49.78s (height 1720488, 2020-04-19 20:04:44 +0000 UTC)
2020-04-19 20:05:23.104 [INF] NTFN: New block: height=1720488, sha=00000000000001271109250d32383cca75dcea3c78956190421732b4e60af1dd
2020-04-19 20:05:23.105 [INF] UTXN: Attempting to graduate height=1720488: num_kids=0, num_babies=0
2020-04-19 20:05:54.784 [INF] DISC: Broadcasting 4 new announcements in 1 sub batches
2020-04-19 20:06:10.721 [INF] CRTR: Processed channels=0 updates=3 nodes=0 in last 59.998157874s

Your environment

  • neutrino 0.10.0-beta.rc2 commit=v0.10.0-beta.rc2-4-g9c4f9416d53b523b00ee34e5cb1dcd834c33e1e0
  • lnd full node 0.9.0-beta commit=v0.9.0-beta-469-gd04bc200e75ff47e41e6298d610221d44cb94058
  • neutrino OS Linux testnet-neutrino-node 4.15.0-66-generic ChainNotifier should consult historical data to check if ntfn can immediately be dispatched  #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • lnd full node OS Linux brokerage-docker 4.15.0-91-generic Some minor fixes #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Bitcoin Core RPC client version v0.18.0

Steps to reproduce

Just have those two lnd versions running and make a payment from one to another in testnet

Expected behaviour

To have the payment done without a htlc_pending and a active: false channel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions