Skip to content

Conversation

@ziggie1984
Copy link
Collaborator

@ziggie1984 ziggie1984 commented Nov 19, 2025

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.

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
@ziggie1984 ziggie1984 force-pushed the bugfix/fix-mission-control-startup branch from 798ae45 to 4749b60 Compare November 27, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

[bug]: LND not able to startup if MissionControl encounters an error deserializing payment results

1 participant