ViewData can pair the in-flight proposal with the prepared flag of another proposal
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
internal/bft/viewchanger.go、特に prepareViewDataMsg を読み、呼び出される InFlightData のメソッドを調べてください。issue で説明されている、提案とprepared状態への一貫性のあるアクセスを追加し、ViewDataの構築時にそれを使用してください。関連するGoパッケージのテストを実行し、報告される提案とpreparedフラグが同じ一貫した状態に由来することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Written by Claude (Anthropic's AI assistant) on behalf of Hagar Meir.
What happens
ViewChanger.prepareViewDataMsg (internal/bft/viewchanger.go) builds the ViewData from two separate calls to InFlightData:
inFlight := v.getInFlight(lastDecision) // calls v.InFlight.InFlightProposal()
prepared := v.InFlight.IsInFlightPrepared()
Each call takes the InFlightData lock on its own. While the view changer builds the ViewData, the current view can still be running, because AbortView only queues the abort. It can then store a new in-flight proposal between the two calls, through StoreProposal when it saves a pre-prepare, or StorePrepares when it saves a commit. The ViewData then reports one proposal with the prepared flag of another, for example a proposal as prepared although it never was.
How to reproduce
Build ViewData with prepareViewDataMsg repeatedly while another goroutine stores proposals, and marks only some of them as prepared. On main, a few hundred out of 100,000 ViewData messages report as prepared a proposal that was never prepared.
Proposed fix
Add InFlightData.InFlightProposalAndPrepared, which returns the proposal and its prepared flag under one lock, and use it in prepareViewDataMsg.
This doesn't change any message format. The view data simply reports a consistent pair. Making the view changer wait for the previous view to stop before it builds the ViewData is a separate, larger change.
- 主要言語
- Go
- スター
- 110
- フォーク
- 40
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 34
環境構築
このプロジェクトには開発コンテナ、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 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
hyperledger/SmartBFT#628 · コメント 12 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
hyperledger/SmartBFT#487 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
hyperledger/SmartBFT#439 ·
メンテナーはふだん 1 日以内に返信
hyperledger/SmartBFT の issue をすべて見る
似ている issue
-
[BUG] serviceenvupdater filter does not update KUBERNETES_SERVICE_HOST/PORT in init containers対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openyurtio/openyurt#2845 ·
メンテナーはふだん 7 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
fix(scan): validate and normalize output format in validate-contract対応中かも @WKr1shna が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100