lightninglabs / lightninglabs/loop

staticaddr/deposit: deposits cache can grow without bound

Open
#1,170 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.