Skip to content

Commit 85aa95b

Browse files
committed
Remove musig2 crate
Taproot support is not planned we see an increase in demand for it by users. The `musig2` crate is now owned by a third-party, and ultimately won't be used by the production version of Taproot that we end up releasing.
1 parent 747788b commit 85aa95b

14 files changed

Lines changed: 5 additions & 187 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ check-cfg = [
6363
"cfg(c_bindings)",
6464
"cfg(ldk_bench)",
6565
"cfg(ldk_test_vectors)",
66-
"cfg(taproot)",
6766
"cfg(require_route_graph_test)",
6867
"cfg(simple_close)",
6968
"cfg(peer_storage)",

ci/ci-tests-cfg-flags.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ set -eox pipefail
55
source "$(dirname "$0")/ci-tests-common.sh"
66

77
echo -e "\n\nTest cfg-flag builds"
8-
RUSTFLAGS="--cfg=taproot" cargo test --quiet --color always -p lightning
9-
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
108
RUSTFLAGS="--cfg=simple_close" cargo test --quiet --color always -p lightning
119
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
1210
RUSTFLAGS="--cfg=lsps1_service" cargo test --quiet --color always -p lightning-liquidity

fuzz/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,4 @@ check-cfg = [
6262
"cfg(fuzzing)",
6363
"cfg(secp256k1_fuzz)",
6464
"cfg(hashes_fuzz)",
65-
"cfg(taproot)",
6665
]

lightning-tests/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ level = "forbid"
2929
#
3030
# Note that Cargo automatically declares corresponding cfgs for every feature
3131
# defined in the member-level [features] tables as "expected".
32-
check-cfg = [
33-
"cfg(taproot)",
34-
]
32+
check-cfg = []

lightning-tests/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[cfg_attr(test, macro_use)]
22
extern crate lightning;
33

4-
#[cfg(all(test, not(taproot)))]
4+
#[cfg(test)]
55
pub mod upgrade_downgrade_tests;

lightning/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,5 @@ features = ["bitcoinconsensus", "secp-recovery"]
6565
[target.'cfg(ldk_bench)'.dependencies]
6666
criterion = { version = "0.4", optional = true, default-features = false }
6767

68-
[target.'cfg(taproot)'.dependencies]
69-
musig2 = { git = "https://github.com/arik-so/rust-musig2", rev = "6f95a05718cbb44d8fe3fa6021aea8117aa38d50" }
70-
7168
[lints]
7269
workspace = true

lightning/src/ln/channel.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6002,8 +6002,6 @@ impl<SP: SignerProvider> ChannelContext<SP> {
60026002
signature.map(|(signature, _)| msgs::FundingSigned {
60036003
channel_id: self.channel_id(),
60046004
signature,
6005-
#[cfg(taproot)]
6006-
partial_signature_with_nonce: None,
60076005
})
60086006
}
60096007

@@ -6129,8 +6127,6 @@ impl<SP: SignerProvider> ChannelContext<SP> {
61296127
htlc_signatures,
61306128
signature,
61316129
funding_txid: funding.get_funding_txo().map(|funding_txo| funding_txo.txid),
6132-
#[cfg(taproot)]
6133-
partial_signature_with_nonce: None,
61346130
})
61356131
} else {
61366132
log_debug!(
@@ -9463,8 +9459,6 @@ where
94639459
channel_id: self.context.channel_id,
94649460
per_commitment_secret,
94659461
next_per_commitment_point: self.holder_commitment_point.next_point(),
9466-
#[cfg(taproot)]
9467-
next_local_nonce: None,
94689462
release_htlc_message_paths,
94699463
});
94709464
}
@@ -11519,7 +11513,7 @@ where
1151911513
bitcoin_signature_2: if were_node_one { their_bitcoin_sig } else { our_bitcoin_sig },
1152011514
contents: announcement,
1152111515
})
11522-
}
11516+
},
1152311517
}
1152411518
} else {
1152511519
Err(ChannelError::Ignore("Attempted to sign channel announcement before we'd received announcement_signatures".to_string()))
@@ -12729,8 +12723,6 @@ where
1272912723
signature,
1273012724
htlc_signatures,
1273112725
funding_txid: funding.get_funding_txo().map(|funding_txo| funding_txo.txid),
12732-
#[cfg(taproot)]
12733-
partial_signature_with_nonce: None,
1273412726
})
1273512727
}
1273612728
}
@@ -13310,10 +13302,6 @@ impl<SP: SignerProvider> OutboundV1Channel<SP> {
1331013302
funding_txid: self.funding.channel_transaction_parameters.funding_outpoint.as_ref().unwrap().txid,
1331113303
funding_output_index: self.funding.channel_transaction_parameters.funding_outpoint.as_ref().unwrap().index,
1331213304
signature,
13313-
#[cfg(taproot)]
13314-
partial_signature_with_nonce: None,
13315-
#[cfg(taproot)]
13316-
next_local_nonce: None,
1331713305
})
1331813306
}
1331913307

@@ -13718,8 +13706,6 @@ impl<SP: SignerProvider> InboundV1Channel<SP> {
1371813706
channel_type: Some(self.funding.get_channel_type().clone()),
1371913707
},
1372013708
channel_reserve_satoshis: self.funding.holder_selected_channel_reserve_satoshis,
13721-
#[cfg(taproot)]
13722-
next_local_nonce: None,
1372313709
})
1372413710
}
1372513711

lightning/src/ln/functional_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6699,8 +6699,6 @@ pub fn test_counterparty_raa_skip_no_crash() {
66996699
channel_id,
67006700
per_commitment_secret,
67016701
next_per_commitment_point,
6702-
#[cfg(taproot)]
6703-
next_local_nonce: None,
67046702
release_htlc_message_paths: Vec::new(),
67056703
};
67066704
nodes[1].node.handle_revoke_and_ack(node_a_id, &raa);

lightning/src/ln/htlc_reserve_unit_tests.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,6 @@ pub fn do_test_fee_spike_buffer(cfg: Option<UserConfig>, htlc_fails: bool) {
930930
signature: res.0,
931931
htlc_signatures: res.1,
932932
funding_txid: None,
933-
#[cfg(taproot)]
934-
partial_signature_with_nonce: None,
935933
};
936934

937935
// Send the commitment_signed message to the nodes[1].
@@ -943,8 +941,6 @@ pub fn do_test_fee_spike_buffer(cfg: Option<UserConfig>, htlc_fails: bool) {
943941
channel_id: chan.2,
944942
per_commitment_secret: local_secret,
945943
next_per_commitment_point: next_local_point,
946-
#[cfg(taproot)]
947-
next_local_nonce: None,
948944
release_htlc_message_paths: Vec::new(),
949945
};
950946
nodes[1].node.handle_revoke_and_ack(node_a_id, &raa_msg);
@@ -2388,8 +2384,6 @@ pub fn do_test_dust_limit_fee_accounting(can_afford: bool) {
23882384
signature: res.0,
23892385
htlc_signatures: res.1,
23902386
funding_txid: None,
2391-
#[cfg(taproot)]
2392-
partial_signature_with_nonce: None,
23932387
};
23942388

23952389
// Send the commitment_signed message to the nodes[1].
@@ -2401,8 +2395,6 @@ pub fn do_test_dust_limit_fee_accounting(can_afford: bool) {
24012395
channel_id: chan_id,
24022396
per_commitment_secret: local_secret,
24032397
next_per_commitment_point: next_local_point,
2404-
#[cfg(taproot)]
2405-
next_local_nonce: None,
24062398
release_htlc_message_paths: Vec::new(),
24072399
};
24082400
nodes[1].node.handle_revoke_and_ack(node_a_id, &raa_msg);

0 commit comments

Comments
 (0)