lightninglabs / lightninglabs/faraday
accounting: time-based balance snapshots
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 130
- Forks
- 35
- Avg merge
- 7h 54m
- Merged PRs (30d)
- 5
Description
During the recent call with several `lnd` users, the notion of being able to obtain a balance "snapshot" at any period of time came up. I think the use case here is going back and looking at the historical flow of funds within a channel.
FWIW, this is already available in `lnd` as is, since we store the entire "revocation" chain. However this isn't indexed by "time" and instead uses an auto-incrementing sequence number of each new channel state. The only notion of time for the revocation chain is the absolute expiation heights on any HTLCs possibly present on the commitment transaction.
Alternatively, this can be done by polling `lnd` periodically, or having `faraday` use the streaming balance RPCs to update its own local state.
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 by reviewing how lnd stores the revocation chain and how faraday could consume the streaming balance RPCs. Clarify whether snapshots should be indexed by time or maintained as local state, and define the historical balance and fund-flow behavior that would count as complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100