New pool account where the funding amount + tx fee leaves less balance than open channels' anchor reserves causes pool to error on startup

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
go
領域
backend

調査の方向性

まず pool のアカウント作成パスとアカウントマネージャーの起動パスから始め、次に lnd が anchor チャネルのリザーブ不足をどのように報告するかを追跡します。アカウント、手数料、リザーブに必要な合計額を下回る資金で失敗を再現します。done では、合意した起動時警告と最小資金額の動作をカバーする必要があります。

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

説明

If a user opens a new pool account, where the account funding amount + the onchain transaction fee leaves less balance than the current open channels anchor reserves, pool will accept the creation of the account but instantly error, as such a transaction is not allowed to be created by lnd.

Furthermore, when restarting pool, the startup process will error with:
unable to start account manager: unable to resume account [string]: rpc error: code = Unknown desc = the outputs to be sent would leave insufficient reserves for anchor channels in the wallet

This error will be repeated on every restart, until the user has deposited enough new onchain balance to exceed the total value of:

  • The account funding amount
  • The onchain transaction fee
  • The total channel anchor reserves of all open channels

This was reported by a user through:
https://github.com/lightninglabs/lightning-terminal/issues/1193


To resolve the issue for future users, we've discussed offline that we could potentially add the following functionality:

  • We shouldn't make pool error on startup if this occurs, but rather log it as a warning.
  • We could potentially add a 100k sats buffer, and not allow users to fund their pool accounts with the entire on-chain balance and require that the amount at least leaves out the 100k sats buffer.
主要言語
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 を短くまとめたダイジェスト。