Merge PR 'Make custom signers verify holder commitment sigs synchronously' (#5616)
What changed, and why it matters
This commit hardens how Lightning Dev Kit handles custom signing modules. Previously, LDK relied on each custom signer to check that the other party's signatures on a holder commitment transaction were valid. The change adds a ready-made verification helper and updates the documentation to make clear that signers must do this check synchronously before returning success, because LDK may immediately broadcast the funding transaction or use the commitment on force-close. It also makes LDK's built-in signer verify that the holder funding key in the channel parameters actually belongs to it before trusting signatures. The commit is defensive: it reduces the chance that a buggy or malicious custom signer accidentally accepts invalid signatures and lets LDK act on them.
Treat as a security-hardening fix. Projects using custom ChannelSigner implementations should review their validate_holder_commitment to ensure it now verifies counterparty_sig and counterparty_htlc_sigs synchronously before returning Ok(()). Consider backporting to maintained release branches, especially if custom signers are supported. No immediate emergency response is indicated because the patch itself is the fix, but the pre-patch behavior created a contract gap that could lead to invalid transactions being broadcast.
Security signals we found
New synchronous signature-verification helper for holder commitment transactions
Trait documentation now mandates verification before Ok(()) because LDK acts immediately
InMemorySigner now validates that holder funding key belongs to signer before signature checks
Tests added for corrupted commitment signature, corrupted HTLC signature, and missing HTLC signature
Pending changelog frames change as API update with security-relevant contract
Evidence from the diff
The patch introduces HolderCommitmentTransaction::verify_counterparty_sigs in lightning/src/ln/chan_utils.rs, which verifies the counterparty’s ECDSA signature on the holder commitment transaction and on each non-dust HTLC transaction. InMemorySigner’s validate_holder_commitment now delegates to that helper and additionally checks that channel_parameters.holder_pubkeys.funding_pubkey matches its own funding key before trusting it. The ChannelSigner::validate_holder_commitment trait documentation is updated to require that custom implementations verify counterparty_sig and counterparty_htlc_sigs before returning Ok(()), noting that LDK may broadcast the funding transaction immediately and that holder_tx replaces the force-close commitment. Tests are added for valid signatures, corrupted commitment/HTLC signatures, truncated HTLC sigs, and rejection of foreign channel parameters.
Changed components
lightning/src/ln/chan_utils.rslightning/src/sign/mod.rslightning/src/util/test_utils.rsChannelSigner trait / validate_holder_commitmentInMemorySignerHolderCommitmentTransactionInspect captured patch +324 / −95
### lightning/src/ln/chan_utils.rs
@@ -33,6 +33,7 @@ use crate::chain::package::WEIGHT_REVOKED_OUTPUT;
use crate::ln::msgs::DecodeError;
use crate::sign::EntropySource;
use crate::types::payment::{PaymentHash, PaymentPreimage};
+use crate::util::logger::Logger;
use crate::util::ser::{Readable, ReadableArgs, RequiredWrapper, Writeable, Writer};
use crate::util::transaction_utils;
@@ -1435,6 +1436,111 @@ impl HolderCommitmentTransaction {
tx.input[0].witness.push(funding_redeemscript.as_bytes().to_vec());
tx
}
+
+ /// Verifies the counterparty's signature on this commitment transaction and their signatures
+ /// on each of its non-dust HTLC transactions, against the keys in `channel_parameters`.
+ ///
+ /// `channel_parameters` must be populated, see [`ChannelTransactionParameters::is_populated`].
+ pub fn verify_counterparty_sigs<L: Logger>(
+ &self, channel_parameters: &ChannelTransactionParameters,
+ secp_ctx: &Secp256k1<secp256k1::All>, logger: &L,
+ ) -> Result<(), ()> {
+ assert!(channel_parameters.is_populated(), "channel_parameters must be populated");
+ let funding_script = channel_parameters.make_funding_redeemscript();
+ let channel_value_satoshis = channel_parameters.channel_value_satoshis;
+ let counterparty_funding_pubkey =
+ channel_parameters.counterparty_pubkeys().unwrap().funding_pubkey;
+ let counterparty_selected_delay =
+ channel_parameters.counterparty_parameters.as_ref().unwrap().selected_contest_delay;
+ let channel_type = &channel_parameters.channel_type_features;
+ let commitment_txid = {
+ let trusted_tx = self.trust();
+ let bitcoin_tx = trusted_tx.built_transaction();
+ if bitcoin_tx.transaction.output.is_empty() {
+ log_error!(logger, "Commitment tx from peer has 0 outputs");
+ return Err(());
+ }
+
+ let sighash = bitcoin_tx.get_sighash_all(&funding_script, channel_value_satoshis);
+
+ log_trace!(logger, "Checking commitment tx signature {} by key {} against tx {} (sighash {}) with redeemscript {}.",
+ log_bytes!(self.counterparty_sig.serialize_compact()[..]),
+ log_bytes!(counterparty_funding_pubkey.serialize()),
+ bitcoin::consensus::encode::serialize_hex(&bitcoin_tx.transaction),
+ log_bytes!(sighash[..]), bitcoin::consensus::encode::serialize_hex(&funding_script),
+ );
+ if let Err(_) = secp_ctx.verify_ecdsa(
+ &sighash,
+ &self.counterparty_sig,
+ &counterparty_funding_pubkey,
+ ) {
+ log_error!(logger, "Invalid commitment tx signature from peer");
+ return Err(());
+ }
+ bitcoin_tx.txid
+ };
+
+ if self.counterparty_htlc_sigs.len() != self.nondust_htlcs().len() {
+ log_error!(
+ logger,
+ "Got wrong number of HTLC signatures ({}) from peer. It must be {}",
+ self.counterparty_htlc_sigs.len(),
+ self.nondust_htlcs().len()
+ );
+ return Err(());
+ }
+
+ let holder_keys = self.trust().keys();
+ for (htlc, counterparty_sig) in
+ self.nondust_htlcs().iter().zip(self.counterparty_htlc_sigs.iter())
+ {
+ assert!(htlc.transaction_output_index.is_some());
+ let htlc_tx = build_htlc_transaction(
+ &commitment_txid,
+ self.negotiated_feerate_per_kw(),
+ counterparty_selected_delay,
+ &htlc,
+ channel_type,
+ &holder_keys.broadcaster_delayed_payment_key,
+ &holder_keys.revocation_key,
+ );
+
+ let htlc_redeemscript = get_htlc_redeemscript(&htlc, channel_type, &holder_keys);
+ let htlc_sighashtype = if channel_type.supports_anchors_zero_fee_htlc_tx()
+ || channel_type.supports_anchor_zero_fee_commitments()
+ {
+ EcdsaSighashType::SinglePlusAnyoneCanPay
+ } else {
+ EcdsaSighashType::All
+ };
+ let htlc_sighash = hash_to_message!(
+ &sighash::SighashCache::new(&htlc_tx)
+ .p2wsh_signature_hash(
+ 0,
+ &htlc_redeemscript,
+ htlc.to_bitcoin_amount(),
+ htlc_sighashtype
+ )
+ .unwrap()[..]
+ );
+ log_trace!(logger, "Checking HTLC tx signature {} by key {} against tx {} (sighash {}) with redeemscript {}.",
+ log_bytes!(counterparty_sig.serialize_compact()[..]),
+ log_bytes!(holder_keys.countersignatory_htlc_key.to_public_key().serialize()),
+ bitcoin::consensus::encode::serialize_hex(&htlc_tx),
+ log_bytes!(htlc_sighash[..]),
+ bitcoin::consensus::encode::serialize_hex(&htlc_redeemscript),
+ );
+ if let Err(_) = secp_ctx.verify_ecdsa(
+ &htlc_sighash,
+ &counterparty_sig,
+ &holder_keys.countersignatory_htlc_key.to_public_key(),
+ ) {
+ log_error!(logger, "Invalid HTLC tx signature from peer");
+ return Err(());
+ }
+ }
+ Ok(())
+ }
}
/// A pre-built Bitcoin commitment transaction and its txid.
@@ -2285,15 +2391,17 @@ mod tests {
get_to_countersigner_keyed_anchor_redeemscript, shared_anchor_script_pubkey,
BuiltCommitmentTransaction, ChannelTransactionParameters, CommitmentTransaction,
CounterpartyChannelTransactionParameters, HTLCClaim, HTLCOutputInCommitment,
- TrustedCommitmentTransaction,
+ HolderCommitmentTransaction, TrustedCommitmentTransaction,
};
+ use crate::sign::ecdsa::EcdsaChannelSigner;
use crate::sign::{ChannelSigner, SignerProvider};
use crate::types::features::ChannelTypeFeatures;
use crate::types::payment::PaymentHash;
+ use crate::util::test_channel_signer::TestChannelSigner;
use crate::util::test_utils;
use bitcoin::hashes::Hash;
use bitcoin::hex::FromHex;
- use bitcoin::secp256k1::{self, PublicKey, Secp256k1, SecretKey};
+ use bitcoin::secp256k1::{self, ecdsa::Signature, PublicKey, Secp256k1, SecretKey};
use bitcoin::PublicKey as BitcoinPublicKey;
use bitcoin::{CompressedPublicKey, Network, ScriptBuf, Txid, Witness};
@@ -2306,6 +2414,7 @@ mod tests {
feerate_per_kw: u32,
channel_parameters: ChannelTransactionParameters,
counterparty_pubkeys: ChannelPublicKeys,
+ counterparty_signer: TestChannelSigner,
secp_ctx: Secp256k1<secp256k1::All>,
}
@@ -2339,6 +2448,7 @@ mod tests {
feerate_per_kw: 1,
channel_parameters,
counterparty_pubkeys,
+ counterparty_signer,
secp_ctx,
}
}
@@ -2358,6 +2468,64 @@ mod tests {
}
}
+ fn corrupt_signature(sig: &Signature) -> Signature {
+ let mut bytes = sig.serialize_compact();
+ bytes[0] ^= 0xff;
+ Signature::from_compact(&bytes).unwrap()
+ }
+
+ #[test]
+ #[rustfmt::skip]
+ fn test_verify_counterparty_sigs() {
+ let mut builder = TestCommitmentTxBuilder::new();
+ let logger = test_utils::TestLogger::new();
+ // The test signer tracks commitment numbers across calls, which this test doesn't care
+ // about, and commitment number 0 isn't a valid successor of its initial state.
+ builder.counterparty_signer.disable_all_state_policy_checks = true;
+
+ let offered_htlc = HTLCOutputInCommitment {
+ offered: true,
+ amount_msat: 600_000,
+ cltv_expiry: 100,
+ payment_hash: PaymentHash([42; 32]),
+ transaction_output_index: None,
+ };
+ let commitment_tx = builder.build(1000, 2000, vec![offered_htlc]);
+ let counterparty_params =
+ test_utils::counterparty_channel_parameters(&builder.channel_parameters);
+ let (counterparty_sig, counterparty_htlc_sigs) = builder.counterparty_signer
+ .sign_counterparty_commitment(
+ &counterparty_params, &commitment_tx, Vec::new(), Vec::new(), &builder.secp_ctx,
+ )
+ .unwrap();
+ let holder_commitment = HolderCommitmentTransaction::new(
+ commitment_tx, counterparty_sig, counterparty_htlc_sigs,
+ &builder.channel_parameters.holder_pubkeys.funding_pubkey,
+ &builder.counterparty_pubkeys.funding_pubkey,
+ );
+ holder_commitment
+ .verify_counterparty_sigs(&builder.channel_parameters, &builder.secp_ctx, &logger)
+ .unwrap();
+
+ let mut corrupted = holder_commitment.clone();
+ corrupted.counterparty_sig = corrupt_signature(&corrupted.counterparty_sig);
+ assert!(corrupted
+ .verify_counterparty_sigs(&builder.channel_parameters, &builder.secp_ctx, &logger)
+ .is_err());
+
+ let mut corrupted = holder_commitment.clone();
+ corrupted.counterparty_htlc_sigs[0] = corrupt_signature(&corrupted.counterparty_htlc_sigs[0]);
+ assert!(corrupted
+ .verify_counterparty_sigs(&builder.channel_parameters, &builder.secp_ctx, &logger)
+ .is_err());
+
+ let mut truncated = holder_commitment.clone();
+ truncated.counterparty_htlc_sigs.pop();
+ assert!(truncated
+ .verify_counterparty_sigs(&builder.channel_parameters, &builder.secp_ctx, &logger)
+ .is_err());
+ }
+
#[test]
#[rustfmt::skip]
fn test_anchors() {
### lightning/src/sign/mod.rs
@@ -799,9 +799,16 @@ pub trait ChannelSigner {
/// Note that all the relevant preimages will be provided, but there may also be additional
/// irrelevant or duplicate preimages.
///
+ /// LDK does not verify the counterparty's signatures anywhere else. Implementations must
+ /// verify `holder_tx.counterparty_sig` and `holder_tx.counterparty_htlc_sigs` before
+ /// returning `Ok(())`, as [`InMemorySigner`] does. ECDSA implementations can use
+ /// [`HolderCommitmentTransaction::verify_counterparty_sigs`] for this. `Ok(())` is final:
+ /// LDK may broadcast the funding transaction right after it, and `holder_tx` replaces the
+ /// commitment transaction that is broadcast on force-close.
+ ///
/// This method is *not* asynchronous. If an `Err` is returned, the channel will be immediately
- /// closed. If you wish to make this operation asynchronous, you should instead return `Ok(())`
- /// and pause future signing operations until this validation completes.
+ /// closed. Only policy checks that remain once the signatures are verified may be completed
+ /// later, by returning `Ok(())` and pausing future signing operations until they are done.
fn validate_holder_commitment(
&self, channel_parameters: &ChannelTransactionParameters,
holder_tx: &HolderCommitmentTransaction, outbound_htlc_preimages: Vec<PaymentPreimage>,
@@ -1577,99 +1584,13 @@ impl<L: Logger> ChannelSigner for InMemorySigner<L> {
holder_commitment_tx: &HolderCommitmentTransaction,
_outbound_htlc_preimages: Vec<PaymentPreimage>, secp_ctx: &Secp256k1<secp256k1::All>,
) -> Result<(), ()> {
+ // Only trust the holder funding key in `channel_parameters` once we know it is ours.
let funding_key = self.funding_key(channel_parameters.splice_parent_funding_txid);
- let funding_pubkey = funding_key.public_key(secp_ctx);
- let counterparty_funding_pubkey =
- channel_parameters.counterparty_pubkeys().expect(MISSING_PARAMS_ERR).funding_pubkey;
- let funding_script =
- make_funding_redeemscript(&funding_pubkey, &counterparty_funding_pubkey);
- let channel_value_satoshis = channel_parameters.channel_value_satoshis;
- let counterparty_selected_delay = channel_parameters
- .counterparty_parameters
- .as_ref()
- .expect(MISSING_PARAMS_ERR)
- .selected_contest_delay;
- let channel_type = &channel_parameters.channel_type_features;
- let commitment_txid = {
- let trusted_tx = holder_commitment_tx.trust();
- let bitcoin_tx = trusted_tx.built_transaction();
- if bitcoin_tx.transaction.output.is_empty() {
- log_error!(self.logger, "Commitment tx from peer has 0 outputs");
- return Err(());
- }
-
- let sighash = bitcoin_tx.get_sighash_all(&funding_script, channel_value_satoshis);
-
- log_trace!(self.logger, "Checking commitment tx signature {} by key {} against tx {} (sighash {}) with redeemscript {}.",
- log_bytes!(holder_commitment_tx.counterparty_sig.serialize_compact()[..]),
- log_bytes!(counterparty_funding_pubkey.serialize()),
- bitcoin::consensus::encode::serialize_hex(&bitcoin_tx.transaction),
- log_bytes!(sighash[..]), bitcoin::consensus::encode::serialize_hex(&funding_script),
- );
- if let Err(_) = secp_ctx.verify_ecdsa(
- &sighash,
- &holder_commitment_tx.counterparty_sig,
- &counterparty_funding_pubkey,
- ) {
- log_error!(self.logger, "Invalid commitment tx signature from peer");
- return Err(());
- }
- bitcoin_tx.txid
- };
-
- let holder_keys = holder_commitment_tx.trust().keys();
- for (htlc, counterparty_sig) in holder_commitment_tx
- .nondust_htlcs()
- .iter()
- .zip(holder_commitment_tx.counterparty_htlc_sigs.iter())
- {
- assert!(htlc.transaction_output_index.is_some());
- let htlc_tx = chan_utils::build_htlc_transaction(
- &commitment_txid,
- holder_commitment_tx.negotiated_feerate_per_kw(),
- counterparty_selected_delay,
- &htlc,
- channel_type,
- &holder_keys.broadcaster_delayed_payment_key,
- &holder_keys.revocation_key,
- );
-
- let htlc_redeemscript =
- chan_utils::get_htlc_redeemscript(&htlc, channel_type, &holder_keys);
- let htlc_sighashtype = if channel_type.supports_anchors_zero_fee_htlc_tx()
- || channel_type.supports_anchor_zero_fee_commitments()
- {
- EcdsaSighashType::SinglePlusAnyoneCanPay
- } else {
- EcdsaSighashType::All
- };
- let htlc_sighash = hash_to_message!(
- &sighash::SighashCache::new(&htlc_tx)
- .p2wsh_signature_hash(
- 0,
- &htlc_redeemscript,
- htlc.to_bitcoin_amount(),
- htlc_sighashtype
- )
- .unwrap()[..]
- );
- log_trace!(self.logger, "Checking HTLC tx signature {} by key {} against tx {} (sighash {}) with redeemscript {}.",
- log_bytes!(counterparty_sig.serialize_compact()[..]),
- log_bytes!(holder_keys.countersignatory_htlc_key.to_public_key().serialize()),
- bitcoin::consensus::encode::serialize_hex(&htlc_tx),
- log_bytes!(htlc_sighash[..]),
- bitcoin::consensus::encode::serialize_hex(&htlc_redeemscript),
- );
- if let Err(_) = secp_ctx.verify_ecdsa(
- &htlc_sighash,
- &counterparty_sig,
- &holder_keys.countersignatory_htlc_key.to_public_key(),
- ) {
- log_error!(self.logger, "Invalid HTLC tx signature from peer");
- return Err(());
- }
+ if channel_parameters.holder_pubkeys.funding_pubkey != funding_key.public_key(secp_ctx) {
+ log_error!(self.logger, "Holder funding key in channel parameters is not ours");
+ return Err(());
}
- Ok(())
+ holder_commitment_tx.verify_counterparty_sigs(channel_parameters, secp_ctx, &self.logger)
}
fn validate_counterparty_revocation(&self, _idx: u64, _secret: &SecretKey) -> Result<(), ()> {
@@ -2902,6 +2823,112 @@ fn sweep_weight_estimate_accounts_for_to_self_delay() {
}
}
+#[cfg(test)]
+mod tests {
+ use super::{ChannelTransactionParameters, InMemorySigner, KeysManager};
+ use crate::chain;
+ use crate::ln::chan_utils::{
+ CommitmentTransaction, CounterpartyChannelTransactionParameters,
+ HolderCommitmentTransaction,
+ };
+ use crate::sign::ecdsa::EcdsaChannelSigner;
+ use crate::sign::{ChannelSigner, SignerProvider};
+ use crate::sync::Arc;
+ use crate::types::features::ChannelTypeFeatures;
+ use crate::util::test_utils::{self, TestLogger};
+ use bitcoin::hashes::Hash;
+ use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
+ use bitcoin::{secp256k1, Txid};
+
+ #[allow(unused_imports)]
+ use crate::prelude::*;
+
+ fn derive_signer(seed: [u8; 32], channel_keys_id: [u8; 32]) -> InMemorySigner<Arc<TestLogger>> {
+ let keys_manager = KeysManager::new(&seed, 0, 0, false, Arc::new(TestLogger::new()));
+ keys_manager.derive_channel_signer(channel_keys_id)
+ }
+
+ fn channel_parameters(
+ holder: &InMemorySigner<Arc<TestLogger>>, counterparty: &InMemorySigner<Arc<TestLogger>>,
+ secp_ctx: &Secp256k1<secp256k1::All>,
+ ) -> ChannelTransactionParameters {
+ ChannelTransactionParameters {
+ holder_pubkeys: holder.pubkeys(secp_ctx),
+ holder_selected_contest_delay: 0,
+ is_outbound_from_holder: false,
+ counterparty_parameters: Some(CounterpartyChannelTransactionParameters {
+ pubkeys: counterparty.pubkeys(secp_ctx),
+ selected_contest_delay: 0,
+ }),
+ funding_outpoint: Some(chain::transaction::OutPoint {
+ txid: Txid::all_zeros(),
+ index: 0,
+ }),
+ splice_parent_funding_txid: None,
+ channel_type_features: ChannelTypeFeatures::only_static_remote_key(),
+ channel_value_satoshis: 4000,
+ }
+ }
+
+ #[test]
+ fn test_validate_holder_commitment_rejects_foreign_parameters() {
+ let secp_ctx = Secp256k1::new();
+ let signer = derive_signer([42; 32], [0; 32]);
+
+ // The dummy parameters' holder funding key doesn't belong to the signer, so validation
+ // must fail before any signature checks happen.
+ let parameters = ChannelTransactionParameters::test_dummy(4000);
+ let holder_commitment = HolderCommitmentTransaction::dummy(
+ 4000,
+ chain::transaction::OutPoint { txid: Txid::all_zeros(), index: 0 },
+ Vec::new(),
+ );
+ assert!(signer
+ .validate_holder_commitment(¶meters, &holder_commitment, Vec::new(), &secp_ctx)
+ .is_err());
+ }
+
+ #[test]
+ fn test_validate_holder_commitment_accepts_own_parameters() {
+ let secp_ctx = Secp256k1::new();
+ let holder = derive_signer([42; 32], [0; 32]);
+ let counterparty = derive_signer([43; 32], [1; 32]);
+ let parameters = channel_parameters(&holder, &counterparty, &secp_ctx);
+
+ let per_commitment_point =
+ PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&[5; 32]).unwrap());
+ let commitment_tx = CommitmentTransaction::new(
+ 0,
+ &per_commitment_point,
+ 1000,
+ 2000,
+ 1,
+ Vec::new(),
+ ¶meters.as_holder_broadcastable(),
+ &secp_ctx,
+ );
+ let (counterparty_sig, counterparty_htlc_sigs) = counterparty
+ .sign_counterparty_commitment(
+ &test_utils::counterparty_channel_parameters(¶meters),
+ &commitment_tx,
+ Vec::new(),
+ Vec::new(),
+ &secp_ctx,
+ )
+ .unwrap();
+ let holder_commitment = HolderCommitmentTransaction::new(
+ commitment_tx,
+ counterparty_sig,
+ counterparty_htlc_sigs,
+ ¶meters.holder_pubkeys.funding_pubkey,
+ ¶meters.counterparty_parameters.as_ref().unwrap().pubkeys.funding_pubkey,
+ );
+ holder
+ .validate_holder_commitment(¶meters, &holder_commitment, Vec::new(), &secp_ctx)
+ .unwrap();
+ }
+}
+
#[cfg(ldk_bench)]
pub mod benches {
use crate::sign::{EntropySource, KeysManager};
### lightning/src/util/test_utils.rs
@@ -1804,6 +1804,32 @@ impl BaseMessageHandler for TestRoutingMessageHandler {
}
}
+/// Rebuilds the channel parameters as the counterparty of `params` would see them, i.e. with
+/// the holder and counterparty roles swapped.
+#[cfg(test)]
+pub(crate) fn counterparty_channel_parameters(
+ params: &crate::ln::chan_utils::ChannelTransactionParameters,
+) -> crate::ln::chan_utils::ChannelTransactionParameters {
+ use crate::ln::chan_utils::{
+ ChannelTransactionParameters, CounterpartyChannelTransactionParameters,
+ };
+
+ let counterparty = params.counterparty_parameters.as_ref().unwrap();
+ ChannelTransactionParameters {
+ holder_pubkeys: counterparty.pubkeys.clone(),
+ holder_selected_contest_delay: counterparty.selected_contest_delay,
+ is_outbound_from_holder: !params.is_outbound_from_holder,
+ counterparty_parameters: Some(CounterpartyChannelTransactionParameters {
+ pubkeys: params.holder_pubkeys.clone(),
+ selected_contest_delay: params.holder_selected_contest_delay,
+ }),
+ funding_outpoint: params.funding_outpoint,
+ splice_parent_funding_txid: params.splice_parent_funding_txid,
+ channel_type_features: params.channel_type_features.clone(),
+ channel_value_satoshis: params.channel_value_satoshis,
+ }
+}
+
pub struct TestLogger {
pub(crate) id: String,
pub lines: Mutex<HashMap<(&'static str, String), usize>>,
### pending_changelog/5611-holder-commitment-sig-validation.txt
@@ -0,0 +1,8 @@
+# API Updates
+ * The new `HolderCommitmentTransaction::verify_counterparty_sigs` allows implementers of
+ `ChannelSigner` to verify the counterparty's signatures on a holder commitment transaction
+ rather than duplicating the checks `InMemorySigner` performs.
+ * The `ChannelSigner::validate_holder_commitment` documentation now requires implementations to
+ verify the counterparty's signatures before returning `Ok(())`, as LDK acts on `Ok(())`
+ immediately and may broadcast the funding transaction or replace the commitment transaction it
+ would broadcast on force-close.Why this scored 70/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.