Refactor `Confirm` interface around per-block changes

オープン
#3,867 コメント 6 件 リアクション 2 件 担当者 1 名 GitHub で見る

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

2025年6月27日 から。

評価

この issue はまだ評価されていません。

説明

Currently, Confirm allows to call best_block_updated/transactions_confirmed/transaction_unconfirmed to be called independently, and even without prescribing concrete ordering requirements for the former two.

This can lead to indeterministic behavior/races. For example, we got a user report of a newly opened channel being force-closed with ClosureReason::FundingTimeOut, if the node would restart past the 2016 blocks timeout described in BOLT 2, because lightning-transaction-sync calls best_block_updated before transactions_confirmed.

While we could fix this particular race as a one-off, the real fix is a refactoring of Confirm to only take a single best_block_updated (or apply_block_changes) method that would take an UpdatedBlock object describing all the changes that happend as part of a particular block. We should then internally make sure that these changes are applied exactly in the order they need to be.

主要言語
Rust
スター
1.4k
フォーク
482
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

lightningdevkit/rust-lightning のほかの issue

lightningdevkit/rust-lightning の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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