-
Notifications
You must be signed in to change notification settings - Fork 2.2k
routing: allow misson control manager to startup despite errors #10383
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
routing: allow misson control manager to startup despite errors #10383
Conversation
56f5ad6 to
967ee2a
Compare
961c474 to
798ae45
Compare
798ae45 to
4749b60
Compare
bhandras
left a comment
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.
LGTM 🎉
bitromortac
left a comment
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.
LGTM, it fixes the problem ⚡. It would be nice to remove that code again in the future if we can be sure we're in a clean state (and only allow future sane writes) for example using a possible migration to sql. Perhaps it would be good to add a TODO/issue for a future migration?
| addresses](https://github.com/lightningnetwork/lnd/pull/10341) were added to | ||
| the node announcement and `getinfo` output. | ||
|
|
||
| * [Fix a startup issue in LND when ecounntering a |
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.
nit: encountering
4749b60 to
ca9ba1c
Compare
We now allow the mission control manager to skip over deserializable errors. We cannot repair this these results but we just skip over it so we can startup properly. When fetchAll() encounters entries that fail to deserialize, in addition to skipping them, now also: - Delete the corrupted entries from the database - Remove them from the in-memory keysMap and keys tracking structures This prevents corrupted entries from: - Being counted toward maxRecords, which would cause valid entries to be pruned prematurely - Persisting in the database indefinitely - Causing inaccurate entry counts in startup logs
ca9ba1c to
17b77b6
Compare
|
added a TODO |
We now allow the mission control manager to skip over deserializable
errors. We cannot repair this these results but we just skip over
it so we can startup properly. Moreover we also delete those corrupted values.
So we still don't know why it happens so rarely now this problem is fixed anyways because we now validate the ExtraTLVData when receiving a payment error:
Invalid data gets rejected naturally: If a peer sends a ChannelUpdate with malformed ExtraOpaqueData:
- DecodeFailure() fails
- htlcswitch returns UnknownForwardingError (without the ChannelUpdate)
- Mission control stores the failure but without the corrupted ChannelUpdate data
So we basically only have to deal with old data here.