Skip to content

signer: Lower the min sweep feerate to 75 sat/kw - #764

Merged
cdecker merged 1 commit into
mainfrom
2026m11-sweep-min-feerate
Nov 16, 2026
Merged

cdecker merged 1 commit into
mainfrom
2026m11-sweep-min-feerate

Conversation

@cdecker

@cdecker cdecker commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

Since the VLS 1.0.0-rc.1 upgrade (6eed32f5), SIGN_PENALTY_TO_US goes through validate_justice_sweep -> validate_sweep -> validate_fee, which compares the sweep tx feerate against SimplePolicy::min_feerate_per_kw — 253 sat/kw (~1 sat/vB) from make_default_simple_policy.

In Greenlight those transactions are built by CLN (lightningd/onchaind), which derives the sweep feerate from its own backend-backed estimates and applies its own floors and worth-it checks before requesting the signature. During quiet-fee periods the estimate drops below 253 sat/kw and the signer hard-fails the signature, e.g. seen in production today:

policy failure: validate_justice_sweep: validate_sweep: validate_fee: feerate below minimum: 226 < 253

The justice sweep then stays unsigned until network feerates recover — the signer's floor contradicts CLN's fee policy instead of protecting against it.

Fix

Set policy.min_feerate_per_kw = 75 (~0.3 sat/vB) in the gl-client signer setup: low enough to never second-guess a CLN-built sweep, while still rejecting zero-fee or absurdly low transactions.

Notes

  • Only affects signers built from gl-client (embedded client signer and the server-side runner); the check itself lives in VLS and is untouched.
  • The 44bfc34 (fee budgets) branch work keeps the sweep ceiling at 150k and never touches this minimum, so no conflict with it.

Test

cargo check -p gl-client passes. End-to-end: attach a local signer to a node with a pending justice sweep at low feerate and observe the sweep tx now gets signed and broadcast instead of a FailedPrecondition.

@cdecker

cdecker commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author

The impact is wider than unsigned justice sweeps: a rejected penalty signature also stalls the channel it belongs to, so payments over it fail.

Seen on the EU blackbox tester (0323484111…) on 2026-11-15/16:

  • On each revocation, channeld asks for SIGN_PENALTY_TO_US (type 14, the pre-signed penalty for the watchtower). With fees low, the signer rejects it (226 < 253), and the request stays queued: Node has queued HSM requests blocking progress: [14], logged every 10 s.
  • The channel's next HTLC waits for its commitment signature behind that request. After 30 s: Adding HTLC 18446744073709551615 too slow: killing connection. The payment fails with WIRE_TEMPORARY_CHANNEL_FAILURE (Outgoing subdaemon died) on the tester's own first hop.
  • Every scheduled test payment failed this way overnight. The signer logged the rejection 95 times on the EU worker and 76 times on the US worker.
  • It cleared on its own at 08:57Z, apparently once a penalty request came in at or above 253 sat/kw.

So until this lands, any Greenlight node can have a channel blocked whenever CLN's penalty feerate estimate drops below 253 sat/kw.

The `SimplePolicy` default `min_feerate_per_kw` of 253 sat/kw comes from
stacks where the signer builds its own sweeps. In Greenlight the
transactions gated by this check are built by CLN: lightningd and
onchaind derive the sweep feerate from their own backend-backed
estimates and apply their own floors and worth-it checks before ever
requesting a signature.

During quiet-fee periods CLN's estimates fall below 253 sat/kw, and the
signer then hard-fails `SIGN_PENALTY_TO_US` with 'policy failure:
validate_justice_sweep: validate_sweep: validate_fee: feerate below
minimum: 226 < 253', leaving justice sweeps unsigned until feerates
recover. Since CLN will not produce sweeps anywhere near this range
under normal conditions, the default floor contradicts CLN's fee policy
rather than protecting against it.

Set `min_feerate_per_kw` to 75 sat/kw (~0.3 sat/vB): low enough to never
second-guess a CLN-built sweep, yet still a sanity check that rejects
zero-fee or absurdly low transactions.
@cdecker
cdecker force-pushed the 2026m11-sweep-min-feerate branch from f84da05 to 0403c19 Compare November 16, 2026 12:54
@cdecker
cdecker enabled auto-merge (rebase) November 16, 2026 12:54
@cdecker
cdecker merged commit 1aba74c into main Nov 16, 2026
16 checks passed
@cdecker
cdecker deleted the 2026m11-sweep-min-feerate branch November 16, 2026 13:09
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