Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Channel-scoped error can be lost while channeld exits

オープン
#9,424 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@vincenzopalazzo がすでに取り組んでいます。

2026年8月18日 から。

  • #9436 @vincenzopalazzo による — オープン

評価

難易度
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 の本文から書いたものです。

説明

26.06.x

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.

BOLT #1 requirements

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 ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ElementsProject/lightning のほかの issue

ElementsProject/lightning の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。