Lightning-Network

由於零的 update_fee 超出範圍,regtest 中的閃電通道關閉

  • July 5, 2021

我正在執行一個在連接到 bitcoind 後端的 Docker 容器內執行的 c-lightning 客戶端測試平台。由於 update_fee 超出範圍,我一直遇到關閉頻道的問題。總是為零,update_fee我不明白。

我認為該ignore-fee-limits選項旨在防止節點由於update_fee超出範圍而關閉通道,但如果我使用此選項執行所有節點,則沒有任何變化。

然後我認為這可能與estimatesmartfee由於數據不足而沒有返回估計有關,但是即使我生成了一堆事務以獲得足夠的數據以便bitcoin-cli estimatesmartfee 2不返回錯誤,這個錯誤仍然會發生。

問題是,我正在嘗試通過固定路線路由一組付款,經過幾次嘗試後,通道突然關閉。這些是節點的組合日誌:

mallory_1    | 2021-06-29T06:26:32.520Z INFO    lightningd: Sending 50000501msat over 2 hops to deliver 50000000msat
mallory_1    | 2021-06-29T06:26:32.728Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: htlc 1 failed from 0th node with code 0x1007 (WIRE_TEMPORARY_CHANNEL_FAILURE)
mallory_1    | 2021-06-29T06:26:32.751Z INFO    lightningd: Sending 25000251msat over 2 hops to deliver 25000000msat
mallory_1    | 2021-06-29T06:26:33.220Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: htlc 2 failed from 1th node with code 0x400f (WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS)
mallory_1    | 2021-06-29T06:26:33.239Z INFO    lightningd: Sending 37500376msat over 2 hops to deliver 37500000msat
mallory_1    | 2021-06-29T06:26:33.718Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: htlc 3 failed from 1th node with code 0x400f (WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS)
mallory_1    | 2021-06-29T06:26:33.730Z INFO    lightningd: Sending 43750439msat over 2 hops to deliver 43750000msat
mallory_1    | 2021-06-29T06:26:34.194Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: htlc 4 failed from 1th node with code 0x400f (WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS)
mallory_1    | 2021-06-29T06:26:34.213Z INFO    lightningd: Sending 46875470msat over 2 hops to deliver 46875000msat
mallory_1    | 2021-06-29T06:26:34.651Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: htlc 5 failed from 1th node with code 0x400f (WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS)
mallory_1    | 2021-06-29T06:26:34.672Z INFO    lightningd: Sending 48437986msat over 2 hops to deliver 48437500msat
mallory_1    | 2021-06-29T06:26:34.926Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: htlc 6 failed from 0th node with code 0x1007 (WIRE_TEMPORARY_CHANNEL_FAILURE)
mallory_1    | 2021-06-29T06:26:34.947Z INFO    lightningd: Sending 47656728msat over 2 hops to deliver 47656250msat
mallory_1    | 2021-06-29T06:26:35.428Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: htlc 7 failed from 1th node with code 0x400f (WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS)
mallory_1    | 2021-06-29T06:26:35.451Z INFO    lightningd: Sending 48047357msat over 2 hops to deliver 48046875msat
bob_1        | 2021-06-29T06:26:35.681Z INFO    0258a02511d0436c28be6e48411cf54f219c72821d1054131c1b424711bab2d402-chan#1: Peer transient failure in CHANNELD_NORMAL: channeld WARNING: update_fee 0 outside range 253-4294967295
alice_1      | 2021-06-29T06:26:35.716Z INFO    02094680c16a12359752a901a429d3c88bd7386829c2130933e4a8a49221293fda-channeld-chan#1: Peer connection lost
alice_1      | 2021-06-29T06:26:35.718Z INFO    02094680c16a12359752a901a429d3c88bd7386829c2130933e4a8a49221293fda-chan#1: Peer transient failure in CHANNELD_NORMAL: channeld: Owning subdaemon channeld died (62208)

我知道有WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS錯誤WIRE_TEMPORARY_CHANNEL_FAILURE。由於付款的具體情況,這些都是可以預料的,所以我認為問題不在於那裡。

比特幣版本:v0.21.1

閃電版:v0.10.0

這是 c-lightning 中的一個錯誤。在某些情況下,c-lightning 會在 regtest 上發送 0 update_fee。此PR已修復此問題,並且此修復(可能)將包含在 v0.10.1 版本中。

引用自:https://bitcoin.stackexchange.com/questions/107318