Skip to content

signer: Default to Hard mode and allow one successful Soft migration - #766

Open
ihordiachenko wants to merge 4 commits into
mainfrom
fix/926-one-shot-soft-mode
Open

ihordiachenko wants to merge 4 commits into
mainfrom
fix/926-one-shot-soft-mode

Conversation

@ihordiachenko

Copy link
Copy Markdown
Collaborator

Refs GL #926.

Soft mode accepts unsigned server-supplied state and can re-sign it as trusted. State merged before authorization can also survive rejected requests.

Key decisions:

  • Default to Hard verification; allow one explicitly configured, successful Soft migration per device/node/network.
  • Expose persistent storage and migration configuration through Rust, Python, SDK, and CLI APIs.
  • Authorize, handle, and sign against scratch state; commit only after success.
  • Save the migration marker before publishing state or signatures. Processing failures permit retry; marker-write failures close the allowance.

Local markers do not coordinate devices and can be reset by deleting or restoring storage. An external watermarking service outside Blockstream’s control is planned separately.

Expose DeviceStorage and an optional signer configuration hook for
metadata kept on the device. Provide a file-backed implementation for
glcli with atomic replacement and durable writes.

Distinguish absent records from storage failures, and keep record
encoding independent of the storage backend.
Default to Hard state signature checks and allow one successful Soft
migration per device and node. Save the migration marker before
publishing state or signatures. Processing failures leave migration
available; marker-write failures close the allowance.

Authorize and handle requests against scratch state, committing only
after handling and state signing succeed. Rejected input and changes
made during failed processing cannot be retained and signed later.
Allow Python and UniFFI SDK callers to opt into Soft mode with a
persistent device storage directory. Keep Hard as the default and
preserve signer configuration through authentication and NodeBuilder
creation paths.

Share FileDeviceStorage through the optional gl-client file-storage
feature. Update generated Python and Swift bindings and document the
migration APIs.
@ihordiachenko
ihordiachenko force-pushed the fix/926-one-shot-soft-mode branch from 6df48e4 to 340fab9 Compare November 17, 2026 18:56
The node updates peers/ entries without a signer signature. Keep valid
addresses for channel backup recovery and skip malformed hints so a peer
update cannot block Hard mode. Keep peer hints out of signed responses.

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