Skip to content

LSPS2 client: a failed JIT channel open spends the zero-conf approval, so the retry is refused #9715

Open

Description

@nepet

The LSPS2 client (experimental-lsps-client) keeps a single datastore record per LSP, lsps/client/<lsp_id>, to accept a zero-conf channel from it, and deletes it in the openchannel hook (on_openchannel() in plugins/lsps-plugin/src/client.rs). That's before we know whether the open succeeds.

  1. Retry after a failed open. If the open fails after the hook, e.g. we disconnect before sending funding_signed, the LSP fails the HTLC with temporary_channel_failure so that the payer can retry (bLIP-52). The LSP's open for the retry is then refused ("You required zeroconf, but you're not on our allowlist"), and the JIT invoice can't be paid.
  2. Two JIT invoices from the same LSP. lsps-lsps2-approve overwrites the same record for each buy, so once the first invoice's channel is open, the second invoice's channel is refused.

The record also has no expiry: a buy that's never paid leaves the LSP approved for a zero-conf channel indefinitely.

The approval should be per buy, valid until the buy's invoice expires, and spent only once the buy's channel is open.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions