Channel-scoped error can be lost while channeld exits
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- networking
調査の方向性
connectd/multiplex.c の read_body_from_peer_done から開始し、一致する subdaemon が存在する場合に channel スコープの WIRE_ERROR メッセージがどのようにルーティングされるかを追跡します。期待される動作の指針として、issue にリンクされている BOLT #1 の要件を使用します。regtest のエンドツーエンド検証で、lightningd が channel を失敗させ、commitment をブロードキャストすることが示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
On master f80895bac, channeld sent a warning through peer_failed_warn_nodisconnect and began exiting. connectd then decrypted the peer's channel-scoped WIRE_ERROR and queued it to that subdaemon after lightningd had begun killing it. channeld never received the error, so the channel remained open.
BOLT #1 requires a receiving node, upon receiving a channel-scoped error, to:
MUST fail the channel referred to by
channel_id, if that channel is with the sending node.
Forwarding WIRE_ERROR directly from connectd to lightningd when a matching subdaemon exists fixes the race. End-to-end regtest validation confirmed that lightningd failed the channel, and broadcasted the commitment:
diff --git a/connectd/multiplex.c b/connectd/multiplex.c
index 1051645f..696e9e1b 100644
--- a/connectd/multiplex.c
+++ b/connectd/multiplex.c
@@ -1493,6 +1493,15 @@ static struct io_plan *read_body_from_peer_done(struct io_conn *peer_conn,
/* If we don't find a subdaemon for this, create a new one. */
subd = find_subd(peer, &channel_id);
+ if (subd && type == WIRE_ERROR) {
+ daemon_conn_send(peer->daemon->master,
+ take(towire_connectd_peer_spoke(NULL, &peer->id,
+ peer->counter,
+ type,
+ &channel_id,
+ is_peer_error(tmpctx, decrypted))));
+ return next_read(peer_conn, peer);
+ }
if (!subd) {
enum peer_wire t = fromwire_peektype(decrypted);
- 主要言語
- C
- スター
- 3.1k
- フォーク
- 1k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 45
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ElementsProject/lightning のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/lightning#9593 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ElementsProject/lightning#9322 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ElementsProject/lightning#9206 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ElementsProject/lightning#9187 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
QA
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
ElementsProject/lightning#9117 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
ElementsProject/lightning の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
OpenPrinting/cups#1751 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Policy query leaks host primary block (BSL_PrimaryBlock_deinit skipped) on two early-exit pathsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NASA-AMMOS/BSL#355 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
arancormonk/dsd-neo#660 ·
メンテナーはふだん 1 日以内に返信