Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain Local Channels database #114

Open
rolznz opened this issue May 11, 2024 · 5 comments
Open

Maintain Local Channels database #114

rolznz opened this issue May 11, 2024 · 5 comments

Comments

@rolznz
Copy link
Contributor

rolznz commented May 11, 2024

From @bumi :

We need to save all the required data in our DB and define single API calls to get all data.
Right now for example we do many calls to mempool triggered from the frontend to load the alias (not sure about rate limits there)

For example we can have a DB with channels that contains all the information from funding transaction to node alias and then have one GET /channels call to get this information from there. If I want information about the channel then I have a model that contains that data. right now if I want to get the node alias I would somehow have to go through this mempool API.

From Roland:

Also, we can save channel liquidity and other info that will be useful when events happen (like channel closures).

I would like to see an email notification or nostr DM when I get a channel closure:

"Your 500,000 sat channel with Olympus was closed. Reason: XYZ. You had 200,000 sats outgoing capacity when the channel was closed and these sats will be returned to your Alby Hub savings account within N blocks (about 2 weeks).

What to do next: <Instructions here>"

@im-adithya im-adithya transferred this issue from getAlby/nostr-wallet-connect-next Jul 5, 2024
@rolznz
Copy link
Contributor Author

rolznz commented Jul 20, 2024

Feedback from @JPLACLAU

  • when a channel is forced closed maybe we should leave a message under the Savings Balance that says "x amount of sats are returning to your Savings Balance before x day. this was due to a force closed channel"
  • At last: a channel forced closed, simply disappears on the ux an this creates some confusion: what happened to that channel? maybe we should leave the las state of the channel but all sort of greyed out with a warning saying the channels was forced closed, or some sort of warning inside the hub.

@rolznz
Copy link
Contributor Author

rolznz commented Aug 26, 2024

Related: #105

@rolznz rolznz added this to the v1.7.0 milestone Aug 26, 2024
@rolznz
Copy link
Contributor Author

rolznz commented Aug 26, 2024

  • Show closed channels on the standard table (the status would be "closed" or "closing")
  • Show the balance of the closed channel as pending balance on the savings balance card (maybe an info tooltip to show that it might take up to 2 weeks)
  • For channels older than 2 weeks, have a separate page (accessible from the advanced dropdown)

@rolznz
Copy link
Contributor Author

rolznz commented Aug 28, 2024

As part of this ticket, also use the short LDK sync interval if a channel is currently opening

@rolznz
Copy link
Contributor Author

rolznz commented Sep 4, 2024

Removing the milestone for now - we made a significant improvement with #602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant