lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.68k stars 2.08k forks source link

[bug]: Channel not propagating in gossip and unable to update policies #7973

Open niteshbalusu11 opened 1 year ago

niteshbalusu11 commented 1 year ago

Background

I opened a new channel yesterday, 24hrs later it doesn't seem to appear on anyone's graph. Also when updating the channel policy I get errors:

lncli updatechanpolicy --chan_point 8cd854ef834e303ab310c3518ea3b72622c1907cb690c32c3a22e870066bd50c:1 --fee_rate_ppm 851 --base_fee_msat 1000 --time_lock_delta 40
[lncli] rpc error: code = Unknown desc = channel from self node has no policy

Lnd log:

2023-09-11 14:57:46.457 [ERR] RPCS: [/lnrpc.Lightning/UpdateChannelPolicy]: channel from self node has no policy

When I tried using bos instead of lncli

2023-09-11 14:47:54.840 [ERR] RPCS: [/lnrpc.Lightning/FeeReport]: no policy for outgoing channel 887408138263265281
{
            "active":  true,
            "remote_pubkey":  "0364913d18a19c671bb36dd04d6ad5be0fe8f2894314c36a9db3f03c2d414907e1",
            "channel_point":  "8cd854ef834e303ab310c3518ea3b72622c1907cb690c32c3a22e870066bd50c:1",
            "chan_id":  "887408138263265281",
            "capacity":  "5000000",
            "local_balance":  "4994504",
            "remote_balance":  "0",
            "commit_fee":  "5166",
            "commit_weight":  "772",
            "fee_per_kw":  "4303",
            "unsettled_balance":  "0",
            "total_satoshis_sent":  "0",
            "total_satoshis_received":  "0",
            "num_updates":  "0",
            "pending_htlcs":  [],
            "csv_delay":  600,
            "private":  false,
            "initiator":  true,
            "chan_status_flags":  "ChanStatusDefault",
            "local_chan_reserve_sat":  "50000",
            "remote_chan_reserve_sat":  "50000",
            "static_remote_key":  false,
            "commitment_type":  "ANCHORS",
            "lifetime":  "55103",
            "uptime":  "54862",
            "close_address":  "",
            "push_amount_sat":  "0",
            "thaw_height":  0,
            "local_constraints":  {
                "csv_delay":  600,
                "chan_reserve_sat":  "50000",
                "dust_limit_sat":  "354",
                "max_pending_amt_msat":  "4950000000",
                "min_htlc_msat":  "1",
                "max_accepted_htlcs":  483
            },
            "remote_constraints":  {
                "csv_delay":  600,
                "chan_reserve_sat":  "50000",
                "dust_limit_sat":  "354",
                "max_pending_amt_msat":  "4950000000",
                "min_htlc_msat":  "1",
                "max_accepted_htlcs":  483
            },
            "alias_scids":  [],
            "zero_conf":  false,
            "zero_conf_confirmed_scid":  "0",
            "peer_alias":  "LQwD-Canada",
            "peer_scid_alias":  "0",
            "memo":  "bos open"
        },

Your environment

ViktorTigerstrom commented 1 year ago

Hi @niteshbalusu11!

Thanks for the issue report! I'd like to gather some extra initial information regarding the issue, to determine if this is related to other similar reported issues (like https://github.com/lightningnetwork/lnd/issues/7247), or not.

  1. Are you able to update the channel policy for other channels on the node, or do you error when attempting update the policy for other channels as well?

  2. Given the information above, I take it that you can see the channel when using the listchannels command, correct?

  3. If possible to attempt, are you able make transactions over the channel?

niteshbalusu11 commented 1 year ago

Ok restarting lnd fixed the issue but idk why it wasn't working before. However before i restarted, i wasn't able to make payments though any channel. It just seemed to be hanging. I think I am back to an issue that I opened before and it was eventually fixed #7928

When I tried restarting just now LND said gracefully shutting down but never stops responding to rpc calls from other apps and keeps talking to bitcoin-core.

  1. I just realized i can't update policies on any channel, but it never happened before 0.17.
  2. Yes
  3. No
Roasbeef commented 1 year ago

I just realized i can't update policies on any channel, but it never happened before 0.17.

What error do you see when you try this (for all the other channels)? Can you obtain a goroutine dump when this happens?

Roasbeef commented 1 year ago

Also which Go version are you running?

Roasbeef commented 1 year ago

Do you have logs of when the channel was first opened? Grepping with the chanpoint should help to uncover relevant log lines.

niteshbalusu11 commented 1 year ago

Also which Go version are you running?

I'm running inside docker, so it's the Go version of LND's image.

niteshbalusu11 commented 1 year ago

Do you have logs of when the channel was first opened? Grepping with the chanpoint should help to uncover relevant log lines.

Lost those logs. :( Too long now I guess.

Roasbeef commented 1 year ago

@Roasbeef are you still seeing the issue? Can you send us logs of when you try to do an update (for an arbitrary channel) and that fails?

niteshbalusu11 commented 1 year ago

@Roasbeef are you still seeing the issue? Can you send us logs of when you try to do an update (for an arbitrary channel) and that fails?

I think I have to let LND run for a few days to be able to reproduce. Instant restarts are fine for now and it is responding to rpc calls.

Can we leave the issue open?

Roasbeef commented 1 year ago

@niteshbalusu11 have you encountered it over the past few days?

niteshbalusu11 commented 1 year ago

@niteshbalusu11 have you encountered it over the past few days?

Not so far.

niteshbalusu11 commented 1 year ago

@Roasbeef can you take a look at this comment.

https://github.com/lightningnetwork/lnd/issues/7928#issuecomment-1726337283