Bitcoin

Lightning Network – Open channel transactions without RBF have been discontinued.

We can’t answer all your questions, but we can help you with some things.

From Bitcoin’s perspective, a transaction output (TXO) can be used at any time if it has not already been used in some confirmed transaction. This means that if you open a channel but no funding transaction is confirmed, you can use the TXO you funded for that channel, but I’m not sure how Lightningd will react to this.

They said the channel was closed. If the funds are still stuck, this means that both the funding channel and the closed channel transaction have not been confirmed in the mempool.

I would try to use TXO in a TX near me as a way for the child to pay the parent. However, when I tried to reproduce that scenario in regtest, I noticed an issue with the clightning user interface.

To simulate your situation I did the following:

  1. Create channels with colleagues
$ l1-cli fundchannel 0397d48baf82cf731fc8967c16e3d9575f10606bdf481738eb9cafeda29d0e3d67 1000000sat

   "tx": "02000000000101ee026cb7c44f482eb9b1e11f6faf11956ac26f4cdb7e0c1aa9ef94025ec412c30000000000fdffffff0240420f000000000022002075e9a102dbb348646e2f1804cc3cfec9edb6f5551a074f33a615f29cbd45eeaa4c5bd70500000000160014deb1f4e1123694ca3e418cefe496d3c26b0ddde202473044022068b402d53f16204324b28607eca046a4f7121d8f83c62e17de9c9131e307b5cf022077a3aa538469f9e0983cce98c3de4c5427731b398ed395d9614cf7b54d4f5cdd012102f5093f8fd66c909fc72ee556e70cb038ae92b03fd1b56d710cf53b3cc019868e73000000",
   "txid": "11b8967c62c584da9bbba5243d61bc95b4da210760bca04adb7c349319edba19",
   "channel_id": "9dfe0df4c502c31e92c266bfa28af18d6f6d11a0b0197b838797f8c990625168",
   "outnum": 0

  1. I closed the channel
$ l1-cli -k close id=9dfe0df4c502c31e92c266bfa28af18d6f6d11a0b0197b838797f8c990625168 
# Sending closing fee offer 139sat, with range 139sat-183sat
# Received closing fee offer 139sat, with range 139sat-1000000sat

   "tx": "020000000119baed1993347cdb4aa0bc600721dab495bc613d24a5bb9bda84c5627c96b8110000000000ffffffff01b5410f00000000001600141b420a80810dda8fd3621e6ba4ce14ce85b6877e00000000",
   "txid": "e6a7d6cc0960f0f7481a3e9a18b9d9cc18ee695dd626a597883be4599c043699",
   "type": "mutual"

At this point, funding (11b896...) and settlement (e6a7d6cc...) The transaction is in the mempool and has not been confirmed. The situation is shown in the diagram below.

tx:c312c...(confirmed) ---> tx:11b89... (funding tx unconfirmed) ---> tx:e6a7d6cc... (settlement, unconfirmed)

My idea is to consume payment results with higher fees. but i have a problem lightning-cli To do this:

When I try to use a settlement output controlled by my wallet:

$ l1-cli -k txprepare outputs="(\"bcrt1qx77wq9fyxvhsncswpl6kgqpnc49m5e5lzmls0g\":\"all\")" utxos="(\"e6a7d6cc0960f0f7481a3e9a18b9d9cc18ee695dd626a597883be4599c043699:0\")" feerate=100

   "code": -32602,
   "message": "Unknown UTXO e6a7d6cc0960f0f7481a3e9a18b9d9cc18ee695dd626a597883be4599c043699:0"

So perhaps Lightnind is saying “UTXOs are not on the blockchain and cannot be used.”

I tried the workaround and created a PSBT. bitcoin-cli:

$ bt-cli createpsbt "(\"txid\":\"e6a7d6cc0960f0f7481a3e9a18b9d9cc18ee695dd626a597883be4599c043699\",\"vout\":0)" "(\"bcrt1qx77wq9fyxvhsncswpl6kgqpnc49m5e5lzmls0g\":0.00900000)"
cHNidP8BAFICAAAAAZk2BJxZ5DuIl6Um1l1p7hjM2bkYmj4aSPfwYAnM1qfmAAAAAAD9////AaC7DQAAAAAAFgAUN7zgFSQzLwniDg/1ZAAzxUu6Zp8AAAAAAAAA

Then sign lightning-cli:

$ l1-cli signpsbt cHNidP8BAFICAAAAAZk2BJxZ5DuIl6Um1l1p7hjM2bkYmj4aSPfwYAnM1qfmAAAAAAD9////AaC7DQAAAAAAFgAUN7zgFSQzLwniDg/1ZAAzxUu6Zp8AAAAAAAAA

   "code": -1,
   "message": "No wallet inputs to sign"

clightning doesn’t seem to like signing unconfirmed transaction entries.

Since the funding transaction has not been confirmed, we will use the TXO that funded the channel.

$ l1-cli -k txprepare outputs="(\"bcrt1qx77wq9fyxvhsncswpl6kgqpnc49m5e5lzmls0g\":\"all\")" utxos="(\"c312c45e0294efa91a0c7edb4c6fc26a9511af6f1fe1b1b92e484fc4b76c02ee:0\")" feerate=100

   "code": -32602,
   "message": "UTXO c312c45e0294efa91a0c7edb4c6fc26a9511af6f1fe1b1b92e484fc4b76c02ee:0 already reserved"

so, clightning We confirm that channel funding has been spent even though the corresponding TXO has not been confirmed.

Let’s force it again using Bitcoin Core PSBT.

$ bt-cli createpsbt "(\"txid\":\"c312c45e0294efa91a0c7edb4c6fc26a9511af6f1fe1b1b92e484fc4b76c02ee\",\"vout\":0)" "(\"bcrt1qx77wq9fyxvhsncswpl6kgqpnc49m5e5lzmls0g\":0.98900000)"
cHNidP8BAFICAAAAAe4CbLfET0guubHhH2+vEZVqwm9M234MGqnvlAJexBLDAAAAAAD9////ASAY5QUAAAAAFgAUN7zgFSQzLwniDg/1ZAAzxUu6Zp8AAAAAAAAA

Then get the signature from your Lightning wallet.

$  l1-cli signpsbt cHNidP8BAFICAAAAAe4CbLfET0guubHhH2+vEZVqwm9M234MGqnvlAJexBLDAAAAAAD9////ASAY5QUAAAAAFgAUN7zgFSQzLwniDg/1ZAAzxUu6Zp8AAAAAAAAA

   "signed_psbt": "cHNidP8BAFICAAAAAe4CbLfET0guubHhH2+vEZVqwm9M234MGqnvlAJexBLDAAAAAAD9////ASAY5QUAAAAAFgAUN7zgFSQzLwniDg/1ZAAzxUu6Zp8AAAAAAAEBHyae5gUAAAAAFgAUrxY3yj79dai67Z9mJ4hHAjQSIzMiAgL1CT+P1myQn8cu5VbnDLA4rpKwP9G1bXEM9Ts8wBmGjkcwRAIgMdOln+3Bzrm5lWqUrBbtEleqYgclYdwSadbs7T8V+18CIFTRsrlwhdZrvrG+UiCGf44+TJrF+Oqj4w+hLFmucBcfASIGAvUJP4/WbJCfxy7lVucMsDiukrA/0bVtcQz1OzzAGYaOCK8WN8oAAAAAACICAoqr3sVLia14vPyrtYQRxA+wniCHWDV34AMh8C5p18haCDe84BUHAAAAAA=="

great. This time we have a signature so we can now structure the transaction.

$ bt-cli finalizepsbt "cHNidP8BAFICAAAAAe4CbLfET0guubHhH2+vEZVqwm9M234MGqnvlAJexBLDAAAAAAD9////ASAY5QUAAAAAFgAUN7zgFSQzLwniDg/1ZAAzxUu6Zp8AAAAAAAEBHyae5gUAAAAAFgAUrxY3yj79dai67Z9mJ4hHAjQSIzMiAgL1CT+P1myQn8cu5VbnDLA4rpKwP9G1bXEM9Ts8wBmGjkcwRAIgMdOln+3Bzrm5lWqUrBbtEleqYgclYdwSadbs7T8V+18CIFTRsrlwhdZrvrG+UiCGf44+TJrF+Oqj4w+hLFmucBcfASIGAvUJP4/WbJCfxy7lVucMsDiukrA/0bVtcQz1OzzAGYaOCK8WN8oAAAAAACICAoqr3sVLia14vPyrtYQRxA+wniCHWDV34AMh8C5p18haCDe84BUHAAAAAA=="

  "hex": "02000000000101ee026cb7c44f482eb9b1e11f6faf11956ac26f4cdb7e0c1aa9ef94025ec412c30000000000fdffffff012018e5050000000016001437bce01524332f09e20e0ff5640033c54bba669f02473044022031d3a59fedc1ceb9b9956a94ac16ed1257aa62072561dc1269d6eced3f15fb5f022054d1b2b97085d66bbeb1be5220867f8e3e4c9ac5f8eaa3e30fa12c59ae70171f012102f5093f8fd66c909fc72ee556e70cb038ae92b03fd1b56d710cf53b3cc019868e00000000",
  "complete": true

And broadcast it

$ bt-cli sendrawtransaction 02000000000101ee026cb7c44f482eb9b1e11f6faf11956ac26f4cdb7e0c1aa9ef94025ec412c30000000000fdffffff012018e5050000000016001437bce01524332f09e20e0ff5640033c54bba669f02473044022031d3a59fedc1ceb9b9956a94ac16ed1257aa62072561dc1269d6eced3f15fb5f022054d1b2b97085d66bbeb1be5220867f8e3e4c9ac5f8eaa3e30fa12c59ae70171f012102f5093f8fd66c909fc72ee556e70cb038ae92b03fd1b56d710cf53b3cc019868e00000000
41304c4e992a0718d29cf7c46adb0f361c319d31b92eeb8d7dbc811aebc2b39f

If the miner includes the last transaction 41304...then funds 11b896... and settlement e6a7... It becomes invalid. But there are still funds left.

tx:c312c...(confirmed) -X-> tx:11b89... (funding tx unconfirmed) -X-> tx:e6a7d6cc... (settlement, unconfirmed)
|
+---> tx:41304... (confirmed)

side effect

clightning confirms new funds but is still waiting for previous transactions to be confirmed.

$ l1-cli listfunds

   "outputs": (
      
         "txid": "11b8967c62c584da9bbba5243d61bc95b4da210760bca04adb7c349319edba19",
         "output": 1,
         "amount_msat": 97999692000,
         "scriptpubkey": "0014deb1f4e1123694ca3e418cefe496d3c26b0ddde2",
         "address": "bcrt1qm6clfcgjx62v50jp3nh7f9kncf4smh0z2v5q3d",
         "status": "unconfirmed",
         "reserved": false
      ,
      
         "txid": "41304c4e992a0718d29cf7c46adb0f361c319d31b92eeb8d7dbc811aebc2b39f",
         "output": 0,
         "amount_msat": 98900000000,
         "scriptpubkey": "001437bce01524332f09e20e0ff5640033c54bba669f",
         "address": "bcrt1qx77wq9fyxvhsncswpl6kgqpnc49m5e5lzmls0g",
         "status": "confirmed",
         "blockheight": 116,
         "reserved": false
      
   ),
   "channels": (
      
         "peer_id": "0232a73b00b1e4eb6ee1787785640dca55a67bf5e6b338e42efff6a9b21da26c93",
         "connected": true,
         "state": "CHANNELD_NORMAL",
         "channel_id": "a8664ad1bbc4debd16ea2a49b07167f35d3dd9cacac60c0ad6d60fbb76ce78e7",
         "short_channel_id": "103x1x1",
         "our_amount_msat": 1000000000,
         "amount_msat": 1000000000,
         "funding_txid": "c312c45e0294efa91a0c7edb4c6fc26a9511af6f1fe1b1b92e484fc4b76c02ee",
         "funding_output": 1
      
   )

Related Articles

Back to top button