From a11761e729987d7014bc0be2578b7c422cdf8381 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 9 Oct 2024 18:26:22 +0200 Subject: [PATCH] signer: Relax two rules to be warnings only We need to accept repeat signature requests and revocations for older states because the signer state update and the CLN state update are not atomic, i.e., the signer commits first, therefore ratchets up, before CLN stores its state, meaning we could potentially replay some prior state due to a preemption and restart inbetween. Relaxing these two should address the majority of our desync issue. --- libs/gl-client/src/signer/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/gl-client/src/signer/mod.rs b/libs/gl-client/src/signer/mod.rs index c6f579b8..b07f0512 100644 --- a/libs/gl-client/src/signer/mod.rs +++ b/libs/gl-client/src/signer/mod.rs @@ -130,6 +130,7 @@ impl Signer { rules: vec![ FilterRule::new_warn("policy-channel-safe-type-anchors"), FilterRule::new_warn("policy-routing-balanced"), + FilterRule::new_warn("policy-commitment-retry-same"), ], }); @@ -141,6 +142,16 @@ impl Signer { ], }); + // TODO: Remove once we found the desync issue + policy.filter.merge(PolicyFilter { + rules: vec![ + // "policy failure: get_per_commitment_secret: cannot + // revoke commitment_number 312 when + // next_holder_commit_num is 313" + FilterRule::new_warn("policy-revoke-new-commitment-signed"), + ], + }); + // Increase the invoices limit. Results in a larger state, but // bumping into this is rather annoying. policy.max_invoices = 10_000usize;