`lightning-liquidity`: Consider ways to make event handling API more robust
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- rust
- Domaine
- api, backend, blockchain
Piste de recherche
Start from LiquidityManager::next_event and next_event_async and how they persist the event queue after #4059. Compare with lightning’s inline event-handler pattern, regeneration of critical events such as LSPS2ServiceEvent::OpenChannel on restart, and pending opens from #4101. Decide an approach that removes the crash-after-next_event race; done is a design plus API/docs that make those events idempotent or unmissable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Currently, LiquidityManager::next_event/LiquidityManager::next_event_async return the next event an repersist the event queue (post #4059), which puts the responsibility to safely handle any important events on the user.
While some events are only informational and are not even persisted, some are critical to be able to continue the flow after a restart, for example LSPS2ServiceEvent::OpenChannel.
Currently, there might be a race if the user isn't super careful about how they implement their node logic: if the service happens to shutdown/crash just after calling next_event but before actually opening the channel, the service might lose the OpenChannel event.
We should eventually consider ways how we can make this less error prone, for example
a) Mirror the lightning event handling approach where we force the user to handle the event inline before returning the event handler function.
b) Regenerate any critical events on restart, while ensuring users have ways to make all of them idempotent
c) Have users detect what channel opens are pending based on #4101
- Langage dominant
- Rust
- Étoiles
- 1.4k
- Forks
- 482
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de lightningdevkit/rust-lightning
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
lightningdevkit/rust-lightning#4767 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
lightningdevkit/rust-lightning#1849 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
lightningdevkit/rust-lightning#4764 · 3 commentaires ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 22/100
lightningdevkit/rust-lightning#4757 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 28/100
lightningdevkit/rust-lightning#4739 ·
Toutes les issues de lightningdevkit/rust-lightning
Issues similaires
-
bug help wanted ui
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
userFRM/egui-charts#4292 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
Tripstack-Corp/spyc#1352 ·
Les mainteneurs répondent en général sous 1 jour
-
marketing
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
area:tui enhancement P2
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
agent-of-empires/agent-of-empires#6077 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour