wollet: Waterfalls scan sets `last_unused` to a page-relative index past the first page
评估
- 难度
- 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)
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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Blockstream/lwk 的其他 Issue
-
Ignore entry for RUSTSEC-2020-0168 no longer matches anything (`mach` is no longer in `Cargo.lock`)可能已有人在做 @zyl71 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
Blockstream/lwk#213 ·
-
C# bindings: all generated types are `internal`, `LiquidWalletKit` 0.8.2 has no usable public API可能已有人在做 @lisboaigor 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 25/100
Blockstream/lwk#210 ·
-
Applying a merged update with a txid in both `txid_height_new` and `txid_height_delete` drops its outputs from `unspent`可能已有人在做 @Jeon1691 于 4 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 78/100
Blockstream/lwk#205 ·
-
Cache `unspent` restores an input of a deleted transaction that a known replacement still spends未关闭
难度 3/5 1-2 天 新手友好度 68/100
Blockstream/lwk#204 ·
-
Cache `unspent` re-adds a spent output when its transaction is deleted and then seen again可能已有人在做 @Jeon1691 于 6 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
Blockstream/lwk#201 ·
相似的 Issue
-
Ignore entry for RUSTSEC-2026-0002 no longer matches anything (`lru` is no longer in `Cargo.lock`)未关闭
难度 1/5 1 小时以内 新手友好度 72/100
influxdata/influxdb#27767 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
manuscript-lang/manuscript#6389 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 62/100
-
难度 1/5 1 小时以内 新手友好度 68/100
-
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复