staticaddr: a deposit unlocked between the refresh and the lookup can be quoted or selected
维护者通常 1 天内回复
@claravanstaden 已经在做这个了。
开始于 2026年11月12日。
评估
调研方向
Start in staticaddr/loopin/manager.go at initiateLoopIn, then trace EnsureDepositsFresh, syncActiveDeposits, and the deposit lookup that follows the refresh. Check how the selected deposits can be validated against the refreshed UTXOs or refreshed after a failed swap returns a deposit to Deposited. Done when a replaced deposit cannot be quoted or selected in that window; the issue mentions an integration test that reproduces the race.
由索引模型根据 Issue 内容生成。
描述
EnsureDepositsFresh and the deposit lookup that follows it are two separate steps. syncActiveDeposits only drops deposits that are Deposited and gone from lnd's wallet, so a deposit that is still LoopingIn during the refresh is kept even if its funding tx was replaced. If the swap fails and unlocks that deposit before the lookup, the lookup finds it back in Deposited and uses it.
Seen in an integration test: after a restart, a stored risk rejection failed a swap whose deposit had been replaced by RBF while loopd was offline. A static loop-in quote for that outpoint arrived 5ms before the unlock and was answered. The next refresh drops the deposit.
The same two steps run before a loop-in starts (staticaddr/loopin/manager.go, initiateLoopIn), so manual or automatic selection can also pick the replaced deposit in that window. The server checks that the deposit outpoints are unspent when the swap starts, so the swap is rejected. Funds are not at risk, the user sees one failed swap attempt.
Possible fixes:
- after the lookup, check the selected deposits against the utxos the refresh just listed;
- or run the refresh again when a deposit comes back to
Depositedafter a failed swap.
Low priority.
- 主要语言
- Go
- 星标
- 593
- 派生
- 139
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 21
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lightninglabs/loop 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
lightninglabs/loop#1246 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 45/100
lightninglabs/loop#1309 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 49/100
lightninglabs/loop#1276 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 15/100
lightninglabs/loop#1274 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 50/100
lightninglabs/loop#1208 · 1 条评论 ·
维护者通常 1 天内回复
查看 lightninglabs/loop 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
Cojekt/LibreDental#258 ·
维护者通常 1 天内回复
-
go good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
opensro-dev/opensro#4949 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 3 天内回复
-
agent-execution/02 row 4: consumers Verify row lacks delivery/base binding, cannot pass post-merge未关闭bug effort:s impact:low raised-by:verifier risk:low
难度 2/5 1-3 小时 新手友好度 74/100
medici-finance/assay#7946 · 1 条评论 ·
维护者通常 1 天内回复