lightninglabs / lightninglabs/wavelength
walletrpc: startup recovery does not surface already-confirmed boarding outputs until next block
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 47
- Forks
- 14
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 103
Description
Environment
darepo-client:aa3e33e1ca91e85d8d45f8c3f7cc541a89b4c039- Version string:
v0.0.2-alpha-13-gaa3e33e1 - Network: signet
- Wallet backend:
lwwallet - Ark server:
arkd-signet.testnet.lightningcluster.com:443 - Esplora:
https://mempool-signet.testnet.lightningcluster.com/api/
Summary
If a persisted boarding address receives funds while the daemon is offline, and
the daemon is restarted after the funding transaction is already confirmed, the
confirmed funds are not surfaced by wallet APIs until a later chain tip arrives.
This can make a funded wallet appear empty for an arbitrary amount of time on
low-activity networks.
Expected Behavior
After restart, darepod should scan persisted boarding addresses at the current
known chain tip and surface already-confirmed boarding outputs in balance,
activity, or the raw wallet transaction surfaces without waiting for another
block.
Actual Behavior
After restarting at signet tip 306233, all wallet views stayed empty:
confirmed_sat=0pending_in_sat=0- no activity rows
- no VTXOs
- no local transactions
When the next signet block arrived at height 306234, the daemon detected the
previously confirmed outputs and started boarding.
Evidence
Funding transaction
18983d5d6f9c2dbf5166174777162f97797bed3e59d5f63b80a58833ea5391a0 was already
confirmed in block 306231 and paid two outputs of 990,064 sat to the
boarding address. A later transaction added another 283,605 sat output.
After block 306234, logs showed:
Detected new boarding UTXO
Boarding request accepted boarding_balance=2263733
Reproduction
- Start a fresh signet
lwwalletSwapDK wallet. - Run
darepocli recv --onchain. - Stop
darepod. - Fund the returned boarding address and wait for confirmation.
- Restart
darepod. - Before another block arrives, compare Esplora address state with:
darepocli balancedarepocli activitydarepocli dev daemon GetBalancedarepocli ark listtransactions
Impact
Wallets can show zero funds after restart even though the user has confirmed
deposits. This is especially confusing during onboarding, and makes recovery
look broken until a new block happens to arrive.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the restart scenario with darepod and compare darepocli balance, activity, dev daemon GetBalance, and ark listtransactions against Esplora at the current signet tip. Trace startup recovery and the boarding-address scan, then verify that already-confirmed outputs appear in wallet surfaces immediately after restart, without waiting for another block.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend, blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100