lightninglabs / lightninglabs/loop
staticaddr/deposit: deposits cache can grow without bound
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 595
- Forks
- 135
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 12
Description
The static address deposit manager keeps a deposits map[wire.OutPoint]*Deposit that appears to retain every deposit seen by the daemon.
Finalized deposits are removed from activeDeposits, but the broader deposits map is not pruned. On startup, the map is repopulated from Store.AllDeposits, including historical/final deposit rows.
For a reusable static address, this means a long-running or high-volume node could accumulate an unbounded in-memory deposit cache over time. This is especially relevant if the address receives many small deposits, dust, or spam.
This issue is a reminder to evaluate and address the memory-growth concern.
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
Start in the staticaddr/deposit deposit manager and trace how the deposits map is populated from Store.AllDeposits and how activeDeposits is finalized. Determine an appropriate bounded lifecycle for historical deposits, then add regression coverage showing that finalized or historical entries do not accumulate without limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100