`lightning-liquidity`: Consider ways to make event handling API more robust
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- api, backend, blockchain
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Rust
- Star
- 1.4k
- Fork
- 482
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lightningdevkit/rust-lightning
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
lightningdevkit/rust-lightning#4767 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
lightningdevkit/rust-lightning#1849 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
lightningdevkit/rust-lightning#4764 · 3 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
lightningdevkit/rust-lightning#4757 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
lightningdevkit/rust-lightning#4739 ·
Tất cả issue của lightningdevkit/rust-lightning
Issue tương tự
-
bug help wanted ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
userFRM/egui-charts#4292 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Tripstack-Corp/spyc#1352 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:tui enhancement P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
agent-of-empires/agent-of-empires#6077 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày