wollet: Waterfalls scan sets `last_unused` to a page-relative index past the first page

オープン 初心者向け
#209 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

2026年11月22日 から。

  • #212 @diorwave による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
blockchain

調査の方向性

lwk_wollet/src/clients/asyncr/esplora.rs を開き、765〜776行目付近の get_history_waterfalls を読んでください。i はページ内の相対位置です。last_unused の代入を、数行下でページオフセットをすでに加算している導出処理と比較してください。代入がページオフセットを含むように修正し、その後、使用済みアドレスが1,000を超えるチェーンで、報告された last_unused がウォレット相対であることを確認してください。複数ページにわたるスキャンが、すでに使用済みのアドレスを返さなくなれば完了です。そのようなスキャンを実行している既存の wollet クライアントのテストも確認してください。

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

説明

When a Waterfalls descriptor scan spans more than one page (a chain with more than 1,000 used addresses), the last_unused index in the resulting update is relative to the last page that had activity, not to the wallet. The wallet then hands out an address that is already used.

The bug is at lwk_wollet/src/clients/asyncr/esplora.rs, get_history_waterfalls
(line 772 on master at the time of writing)

https://github.com/Blockstream/lwk/blob/c1b042863d351ebc68a36e24c50be0e60816fa3e/lwk_wollet/src/clients/asyncr/esplora.rs#L765-L776

i is a position within the current page. The derivation a few lines below (776) adds the page offset, while the last_unused assignment does not, resulting in each page overwriting the value set by the previous one.

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

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

Blockstream/lwk のほかの issue

Blockstream/lwk の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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