[bug] Account is left in `Pending Update` state after `spendAccount` fails to broadcast the new tx

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

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go
領域
backend

調査の方向性

account/manager.go の spendAccount から始め、リンクされた更新とブロードキャスト失敗の箇所に関連する account の更新を調査します。ブロードキャストが失敗したときに AccountDiff が残され、LND の入力が解放される仕組みを追跡します。失敗した更新がロールバックされ、account が Pending Update 状態のままにならなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Description

A user deposits new funds in his account calling the DepositAccount rpc method. A new AccountDiff is created and stored (client and server side).

The tx was never broadcasted to the network. The lnd node does not see it in pending txs and the lnd inputs are released. The account diff is not applied to the account because is waiting for confirmations.

Expected behavior

In the spendAccount we should rollback the account update if the broadcast fails which releases the funds in LND.

Actual behavior

The account becomes unusable because of its Pending Updating state.

Workaround

Delete the account diff from the server and make the user go through the recovery account process so it gets in sync with the server with the last state of this account before it became unusable.

Bug spotted in the wild

主要言語
Go
スター
256
フォーク
53
平均マージ
20時間 22分
マージ済み PR(30日)
5

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

lightninglabs/pool のほかの issue

lightninglabs/pool の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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