Issue: Potential Blocking in BroadcastConsensus May Compromise BFT Liveness
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- go, grpc
調査の方向性
Controller.BroadcastConsensus から開始し、同期的な Comm.SendConsensus 呼び出しを追跡します。トランスポートが利用できない場合の gRPC 接続処理も含めて確認してください。ブロードキャストの動作についてコンセンサスと通信のテストを確認します。利用できない接続によって他のノードへの配信が遅延せず、コンセンサスの liveness が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The current implementation of BroadcastConsensus in the Controller may block when sending messages to other nodes, potentially compromising the BFT protocol's liveness. This occurs because:
c.Comm.SendConsensus(node, m) can block when gRPC's getTransport function has no available connections
The synchronous nature of the broadcast means a single blocked send can delay all subsequent messages
This blocking behavior could prevent timely dissemination of consensus messages, violating the protocol's liveness guarantees
func (c *Controller) BroadcastConsensus(m *protos.Message) {
for _, node := range c.NodesList {
if c.ID == node {
continue
}
c.Comm.SendConsensus(node, m) // Synchronous call that may block
}
if m.GetPrePrepare() != nil || m.GetPrepare() != nil || m.GetCommit() != nil {
if leader, _ := c.iAmTheLeader(); leader {
c.LeaderMonitor.HeartbeatWasSent()
}
}
}
the proposed solution is as follows:
func (c *Controller) BroadcastConsensus(m *protos.Message) {
for _, node := range c.NodesList {
if c.ID == node {
continue
}
go c.Comm.SendConsensus(node, m) // Asynchronous non-blocking call
}
if m.GetPrePrepare() != nil || m.GetPrepare() != nil || m.GetCommit() != nil {
if leader, _ := c.iAmTheLeader(); leader {
c.LeaderMonitor.HeartbeatWasSent()
}
}
}
- 主要言語
- Go
- スター
- 110
- フォーク
- 40
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 30
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyperledger/SmartBFT のほかの issue
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
hyperledger/SmartBFT#736 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Set up a pr projectオープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
hyperledger/SmartBFT#666 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
hyperledger/SmartBFT#487 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
hyperledger/SmartBFT#439 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
hyperledger/SmartBFT#420 ·
メンテナーはふだん 1 日以内に返信
hyperledger/SmartBFT の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
test-failure
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
teramoby/speedle-plus#129 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
containerd/containerd#14485 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信