diff --git a/smite-scenarios/src/targets/cln.rs b/smite-scenarios/src/targets/cln.rs index f8684f34..461a925e 100644 --- a/smite-scenarios/src/targets/cln.rs +++ b/smite-scenarios/src/targets/cln.rs @@ -373,6 +373,17 @@ impl Target for ClnTarget { /// `open_channel` negotiation. These values should be rejected early, as /// required by BOLT 2. /// See: + /// + /// - CLN currently allows both initial commitment balances to be at or + /// below `channel_reserve_satoshis` during `open_channel` negotiation. + /// These values should be rejected early, as required by BOLT 2. + /// See: + /// + /// - CLN currently allows the funder to push out too much funds during + /// `open_channel` negotiation, not leaving enough to pay the commitment + /// fee or fund the anchor outputs. This situation should be rejected + /// early, as required by BOLT 2. + /// See: fn known_violations() -> &'static [&'static [&'static str]] { &[ &[ @@ -383,6 +394,16 @@ impl Target for ClnTarget { "accepted invalid open_channel: dust_limit_satoshis", "is below the minimum of 354 sat", ], + &["accepted invalid open_channel: neither side exceeds channel reserve"], + &["invalid accept_channel: neither side exceeds channel reserve"], + &[ + "accepted invalid open_channel: opener balance", + "sat cannot cover the commitment fee of", + ], + &[ + "accepted invalid open_channel: opener balance", + "sat cannot cover anchor cost of", + ], ] } } diff --git a/smite-scenarios/src/targets/ldk.rs b/smite-scenarios/src/targets/ldk.rs index 67bc972f..9d5a5e05 100644 --- a/smite-scenarios/src/targets/ldk.rs +++ b/smite-scenarios/src/targets/ldk.rs @@ -203,4 +203,16 @@ impl Target for LdkTarget { } Ok(()) } + + /// Known violations suppressed until fixed upstream: + /// + /// - LDK doesn't fail the channel when both initial commitment balances are + /// at or below `channel_reserve_satoshis`, as BOLT 2 requires. + /// See: + fn known_violations() -> &'static [&'static [&'static str]] { + &[ + &["accepted invalid open_channel: neither side exceeds channel reserve"], + &["invalid accept_channel: neither side exceeds channel reserve"], + ] + } } diff --git a/smite-scenarios/src/targets/lnd.rs b/smite-scenarios/src/targets/lnd.rs index bf257f0a..d6613562 100644 --- a/smite-scenarios/src/targets/lnd.rs +++ b/smite-scenarios/src/targets/lnd.rs @@ -337,7 +337,25 @@ impl Target for LndTarget { /// - LND allows `open_channel` with an omitted `channel_type`, violating /// BOLT 2 even though it signals the required `option_channel_type` feature. /// See: + /// + /// - LND doesn't fail the channel when both initial commitment balances are + /// at or below `channel_reserve_satoshis`, as BOLT 2 requires. + /// See: + /// + /// - LND accepts `push_msat` above the channel capacity, which BOLT 2 + /// requires it to reject. Its only bound is a fundee balance computed on + /// a wrapping `uint64` and then tested as an `int64`, so any push above + /// roughly 2^63 wraps back into the non-negative range. + /// See: fn known_violations() -> &'static [&'static [&'static str]] { - &[&["accepted invalid open_channel: open_channel does not include a channel_type"]] + &[ + &["accepted invalid open_channel: open_channel does not include a channel_type"], + &["accepted invalid open_channel: neither side exceeds channel reserve"], + &["invalid accept_channel: neither side exceeds channel reserve"], + &[ + "accepted invalid open_channel: push_msat", + "exceeds funding amount", + ], + ] } }