1

I have open 3 channels with a c-lightning node (with rompert.com and satoshis.place and HP).

When I look for the funding_txid field on the blockchain the transactions are all confirms for more than 30 blocks. However the status of all the channel opening stay the following :

"status":
[
    "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",        
    "CHANNELD_AWAITING_LOCKIN:Funding needs more confirmations."
],

Current blockchain state (is up to date):

bitcoin-cli getblockchaininfo
{
  "chain": "main",
  "warning": "spruned 0.0.1a7, emulating bitcoind v0.16",
  "blocks": 530651,
  "headers": 530651,
  "bestblockhash": "0000000000000000000e16820e6f6511299c511a8f5bb085abd4af5a54603651",
  "difficulty": null,
  "chainwork": null,
  "mediantime": 1530842433,
  "verificationprogress": 81.5,
  "pruned": false
}

cli/lightning-cli listpeers :

{
  "peers": [
    {
      "id": "024655b768ef40951b20053a5c4b951606d4d86085d51238f2c67c7dec29c792ca",
      "connected": true,
      "netaddr": [
        "88.98.213.235:9735"
      ],
      "alias": "www.satoshis.place",
      "color": "42f474",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "1416ec7bf9df734045c31363ff02a0f8c68d2c2ecab5623becde2a24d6ec7a63",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 100000000,
          "msatoshi_to_us_min": 100000000,
          "msatoshi_to_us_max": 100000000,
          "msatoshi_total": 100000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 1000,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 99000000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    },
    {
      "id": "02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b",
      "connected": true,
      "netaddr": [
        "167.99.50.31:9735"
      ],
      "alias": "rompert.com🔵",
      "color": "0000ff",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "3d204f5169cd985b1855050a052f1631d42718ebc85776c46eec2f84501c7e25",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 10000000,
          "msatoshi_to_us_min": 10000000,
          "msatoshi_to_us_max": 10000000,
          "msatoshi_total": 10000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 546,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 9454000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    },
    {
      "id": "02a45def9ae014fdd2603dd7033d157faa3a55a72b06a63ae22ef46d9fafdc6e8d",
      "connected": true,
      "netaddr": [
        "85.216.75.225:9735"
      ],
      "alias": "HP",
      "color": "f88f22",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "a8357363f646cbff5fd4e44e0bebee84d03a2557abb738dd5bd0b2661314c29b",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 20000000,
          "msatoshi_to_us_min": 20000000,
          "msatoshi_to_us_max": 20000000,
          "msatoshi_total": 20000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 546,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 19454000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    }
  ]
}

(Please note that I have remove funding_txtid above for privacy reason)

I have restarted bitcoind (spruned), lightningd and even restarted Ubuntu. Nothing seem to fix the issue. The node and the channel are not visible from https://1ml.com.

In the mean time I realized that 1 transaction was not broadcasted on the blockchain but was in lightning database (.lightning/lightningd.sqlite3). So I query it and rebroadcast it manually with the bitcoin-cli sendrawtransaction command.

Event after all those steps the status of the channel does not change to CHANNELD_NORMAL.

What should I do in order to re-sync c-lightning channels and fix those issues ?

Thank you!

1
  • It seem that there is a transaction unbroadcast for a channel funding. However I did not find any way to rebroadcast it with lightning-cli or spruned. Maybe that spruned was down or unsync when lightning-cli broadcast it. Is there a way to refresh/rebroadcast/resync c-lightning channel statut? (tried lightning-cli dev-rescan-outputs and it does not work : the unbroadcast transaction is still there)
    – Hugo Doyon
    Commented Jul 5, 2018 at 18:08

1 Answer 1

1

I think this is because your lightningd is still synchronizing with the blockchain. You can test this by looking either at the output of lightningd which should print things like

Adding block 529728: 00000000000000000024f3a1b7fa91de16ba324d8842bd7e83fb2a1d84719265

or you can compare the blocks count in bitcoin-cli getblockchaininfo and the blockheight in lightning-cli getinfo. If this is indeed different you will have to wait for lightningd to catch up with the appropriate blockheights and see the confirmation on the blockchain.

6
  • They are both on the block 530588. It freeze for more than 12hr. Is there any other options or command that I can run?
    – Hugo Doyon
    Commented Jul 5, 2018 at 14:37
  • Ok, can you share the full output of listpeers (for that specific peer)?
    – cdecker
    Commented Jul 5, 2018 at 18:26
  • Ok, can you restart lightningd with the option --rescan=-530500, that will re-process the blockchain from before the funding transaction was confirmed. If possible please redirect the output to a file (lightningd/lightningd --rescan=-530500 --log-level=debug --network=bitcoin | tee logfile will do that).
    – cdecker
    Commented Jul 7, 2018 at 12:53
  • Just don't forget to remove the --rescan option once you're done, otherwise you'll always re-sync from that height.
    – cdecker
    Commented Jul 7, 2018 at 13:11
  • 1
    Finally I did rollback from spruned mode. Now running a full node with c-lightning until spruned lib get fixed. I think spruned will be awesome when it work and when it's stable
    – Hugo Doyon
    Commented Jul 19, 2018 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.