Skip to content

signer: Reject malformed state before VLS restore - #777

Open
ihordiachenko wants to merge 1 commit into
fix/924-state-watermarkfrom
fix/930-signer-state-validation
Open

ihordiachenko wants to merge 1 commit into
fix/924-state-watermarkfrom
fix/930-signer-state-validation

Conversation

@ihordiachenko

Copy link
Copy Markdown
Collaborator

Depends on Blockstream/greenlight PR #769.

Problem

Malformed persisted signer state could panic VLS during restore. If the backend returned the same snapshot on reconnect, the signer could enter a crash loop. An invalid close_to_addr in an authenticated Configure request could also panic the signer. Fixes Greenlight #930.

Design

  • Validate the merged candidate state before constructing the VLS handler. Invalid state returns an error before it can be signed or saved.
  • Check tracker encoding and verify that listeners match ready channels. Use VLS’s own tracker restoration, including support for legacy tips.
  • Validate Configure addresses against the persisted node’s network before updating the allowlist. Preserve the empty fallback for missing or wrong-typed allowlists.

A malformed persisted record can make VLS abort the signer on every
attach. An invalid authenticated Configure address can also cause VLS
restore to panic.

Validate the candidate state and tracker listeners before building the
VLS handler. Use fallible persistence reads and keep tracker restoration
in VLS. Validate Configure addresses against the persisted node network
before writing them.
@cdecker
cdecker added this pull request to stack #771 November 26, 2026 16:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant