-
Notifications
You must be signed in to change notification settings - Fork 267
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
Add failed node ID field to FailureSummary
#2042
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2042 +/- ##
==========================================
- Coverage 87.55% 87.51% -0.04%
==========================================
Files 165 165
Lines 12694 12688 -6
Branches 553 536 -17
==========================================
- Hits 11114 11104 -10
- Misses 1580 1584 +4
|
You're not handling DB migration, your codecs aren't backwards-compatible so this will fail if there is previous data in the DB, won't it? I see two ways to move forward:
|
The codecs are backwards compatible, they are working on my regtest and mainnet nodes. |
Right, I thought the Do you really need a dedicated field though or can you live with having it in the failure message (which would be a tiny change)? The |
I don't find the use of
Personally, I'd prefer to store everything in the database in dedicated fields instead of blobs of any kind. |
That's not practical at all, that would mean a DB migration would be needed every time we change this data class internally. You didn't answer the following question: do you really need a dedicated field though or can you live with having it in the failure message (which would be a tiny change)? Do you plan on processing this data (in an external app) or is it just for user information? I'm not sure how an external app would process this automatically, it feels better to let eclair internals handle penalizing faulty nodes (when necessary). I'll wait for your answer on this before reviewing the PR. |
Here's an example: https://github.com/rorp/rebalance-eclair/blob/main/eclair.py#L50
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way we used codecs here was a bit subtle, but actually quite clever.
It's easy to update these data classes without any DB update and without much code, which is a very nice property, my first pass was a bit too fast.
It's not always easy to determine which hop failed from the
getsentinfo
output.This PR adds
failedNode
field to it.