Skip to content

Commit 8a4ad5c

Browse files
committed
multi: Update LDK to 0.0.113 / 0.21 + fix
Like 0.0.112, 0.0.113 is broken; LDK panics with 50% probability if we use random nanos: lightningdevkit/rust-lightning#1935 This PR updates LDK past 0.0.113 to the commit that merges the fix.
1 parent 202f988 commit 8a4ad5c

File tree

15 files changed

+56
-78
lines changed

15 files changed

+56
-78
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,21 @@ sgx-isa = { git = "https://github.com/lexe-tech/rust-sgx", branch = "lexe" }
2323
sgxs-loaders = { git = "https://github.com/lexe-tech/rust-sgx", branch = "lexe" }
2424
tokio = { git = "https://github.com/lexe-tech/tokio", branch = "tokio-sgx-1.21.2" }
2525

26-
# 0.0.112 introduced a bug which breaks our integration tests. The fix is
27-
# implemented in https://github.com/lightningdevkit/rust-lightning/pull/1851.
28-
# In the meantime, we have to use a git dependency until 0.0.113 is released.
29-
# TODO(max): Comment this section out once 0.0.113 is released
30-
lightning = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.112-with-fix" }
31-
lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.112-with-fix" }
32-
lightning-invoice = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.112-with-fix" }
33-
lightning-net-tokio = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.112-with-fix" }
26+
# Like 0.0.112, 0.0.113 is broken; LDK panics with 50% probability if we use
27+
# random nanos: https://github.com/lightningdevkit/rust-lightning/pull/1935
28+
# TODO(max): Hopefully switch back to crates.io version once 0.0.114 is released
29+
30+
# For if we need to run a patched version of LDK instead of crates.io.
31+
lightning = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.113-with-fix" }
32+
lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.113-with-fix" }
33+
lightning-invoice = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.113-with-fix" }
34+
lightning-net-tokio = { git = "https://github.com/lexe-tech/rust-lightning", branch = "lexe-v0.0.113-with-fix" }
3435

3536
# For debugging LDK or testing patches during local development
36-
# lightning = { path = "../ldk/lightning", features = ["max_level_trace"]}
37-
# lightning-block-sync = { path = "../ldk/lightning-block-sync", features = [ "rpc-client" ] }
38-
# lightning-invoice = { path = "../ldk/lightning-invoice" }
39-
# lightning-net-tokio = { path = "../ldk/lightning-net-tokio" }
37+
# lightning = { path = "../../ldk/lightning", features = ["max_level_trace"]}
38+
# lightning-block-sync = { path = "../../ldk/lightning-block-sync", features = [ "rpc-client" ] }
39+
# lightning-invoice = { path = "../../ldk/lightning-invoice" }
40+
# lightning-net-tokio = { path = "../../ldk/lightning-net-tokio" }
4041

4142
[profile.dev]
4243
# This fixes 'warning: can't find symbol' when debugging, but breaks the

common/Cargo.toml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,10 @@ bip39 = { version = "1", features = [] }
2121

2222
# --- LIGHTNING --- #
2323

24-
lightning = { version = "0.0.112", features = ["max_level_trace"] }
25-
# lightning-block-sync = { version = "0.0.112", features = [ "rpc-client" ] }
26-
lightning-invoice = { version = "0.20" }
27-
# lightning-net-tokio = { version = "0.0.112" }
28-
29-
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = ["max_level_trace"], branch = "main" }
30-
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", features = [ "rpc-client" ], branch = "main" }
31-
# lightning-invoice = { git = "https://github.com/lexe-tech/rust-lightning", branch = "main" }
32-
# lightning-net-tokio = { git = "https://github.com/lexe-tech/rust-lightning", branch = "main" }
33-
34-
# For debugging and testing patches during local development
35-
# lightning = { path = "../../ldk/lightning", features = ["max_level_trace"]}
36-
# lightning-block-sync = { path = "../../ldk/lightning-block-sync", features = [ "rpc-client" ] }
37-
# lightning-invoice = { path = "../../ldk/lightning-invoice" }
38-
# lightning-net-tokio = { path = "../../ldk/lightning-net-tokio" }
24+
lightning = { version = "0.0.113", features = ["max_level_trace"] }
25+
# lightning-block-sync = { version = "0.0.113", features = [ "rpc-client" ] }
26+
lightning-invoice = { version = "0.21" }
27+
# lightning-net-tokio = { version = "0.0.113" }
3928

4029
# --- GENERAL --- #
4130

common/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub struct LxChannelDetails {
7171
pub inbound_scid_alias: Option<u64>,
7272
pub channel_value_satoshis: u64,
7373
pub unspendable_punishment_reserve: Option<u64>,
74-
pub user_channel_id: u64,
74+
pub user_channel_id: u128,
7575
pub balance_msat: u64,
7676
pub outbound_capacity_msat: u64,
7777
pub next_outbound_htlc_limit_msat: u64,

lexe-ln/Cargo.toml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,10 @@ bdk = { git = "https://github.com/lexe-tech/bdk", default-features = false, feat
2929

3030
# --- LIGHTNING --- #
3131

32-
lightning = { version = "0.0.112", features = ["max_level_trace"] }
33-
lightning-block-sync = { version = "0.0.112", features = [ "rpc-client" ] }
34-
lightning-invoice = { version = "0.20" }
35-
lightning-net-tokio = { version = "0.0.112" }
36-
37-
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = # ["max_level_trace"], branch = "main" }
38-
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", # features = [ "rpc-client" ], branch = "main" }
39-
# lightning-invoice = { git = "https://github.com/lexe-tech/rust-lightning", # branch = "main" }
40-
# lightning-net-tokio = { git = "https://github.com/lexe-tech/rust-lightning", # branch = "main" }
41-
42-
# For debugging and testing patches during local development
43-
# lightning = { path = "../../ldk/lightning", features = ["max_level_trace"]}
44-
# lightning-block-sync = { path = "../../ldk/lightning-block-sync", features = [ "rpc-client" ] }
45-
# lightning-invoice = { path = "../../ldk/lightning-invoice" }
46-
# lightning-net-tokio = { path = "../../ldk/lightning-net-tokio" }
32+
lightning = { version = "0.0.113", features = ["max_level_trace"] }
33+
lightning-block-sync = { version = "0.0.113", features = [ "rpc-client" ] }
34+
lightning-invoice = { version = "0.21" }
35+
lightning-net-tokio = { version = "0.0.113" }
4736

4837
# --- GENERAL --- #
4938

lexe-ln/src/alias.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use lightning::ln::peer_handler::{IgnoringMessageHandler, PeerManager};
1010
use lightning::ln::PaymentHash;
1111
use lightning::onion_message::OnionMessenger;
1212
use lightning::routing::gossip::{NetworkGraph, P2PGossipSync};
13+
use lightning::routing::router::DefaultRouter;
1314
use lightning::routing::scoring::ProbabilisticScorer;
1415
use lightning_invoice::payment::InvoicePayer;
15-
use lightning_invoice::utils::DefaultRouter;
1616
use lightning_net_tokio::SocketDescriptor;
1717

1818
use crate::bitcoind::LexeBitcoind;

lexe-ln/src/event.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ pub fn get_event_name(event: &Event) -> &'static str {
66
Event::OpenChannelRequest { .. } => "open channel request",
77
Event::FundingGenerationReady { .. } => "funding generation ready",
88
Event::ChannelReady { .. } => "channel ready",
9-
Event::PaymentReceived { .. } => "payment received",
9+
Event::PaymentClaimable { .. } => "payment claimable",
10+
Event::HTLCIntercepted { .. } => "HTLC intercepted",
1011
Event::PaymentClaimed { .. } => "payment claimed",
1112
Event::PaymentSent { .. } => "payment sent",
1213
Event::PaymentFailed { .. } => "payment failed",

lexe-ln/src/keys_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use common::api::NodePk;
99
use common::rng::{self, Crng};
1010
use common::root_seed::RootSeed;
1111
use lightning::chain::keysinterface::{
12-
KeysInterface, KeysManager, Recipient, SpendableOutputDescriptor,
12+
KeysManager, NodeSigner, Recipient, SpendableOutputDescriptor,
1313
};
1414
use secrecy::ExposeSecret;
1515

lexe-ln/src/test_event.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ pub enum TestEvent {
3636
ChannelReady,
3737
/// A channel monitor update was successfully persisted.
3838
ChannelMonitorPersisted,
39-
/// A [`PaymentReceived`] event was handled.
39+
/// A [`PaymentClaimable`] event was handled.
4040
///
41-
/// [`PaymentReceived`]: lightning::util::events::Event::PaymentReceived
42-
PaymentReceived,
41+
/// [`PaymentClaimable`]: lightning::util::events::Event::PaymentClaimable
42+
PaymentClaimable,
4343
/// A [`PaymentClaimed`] event was handled.
4444
///
4545
/// [`PaymentClaimed`]: lightning::util::events::Event::PaymentClaimed

node/Cargo.toml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,10 @@ base64 = "0.13.0"
2828

2929
# --- LIGHTNING --- #
3030

31-
lightning = { version = "0.0.112", features = ["max_level_trace"] }
32-
lightning-block-sync = { version = "0.0.112", features = [ "rpc-client" ] }
33-
lightning-invoice = { version = "0.20" }
34-
lightning-net-tokio = { version = "0.0.112" }
35-
36-
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = # ["max_level_trace"], branch = "main" }
37-
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", # features = [ "rpc-client" ], branch = "main" }
38-
# lightning-invoice = { git = "https://github.com/lexe-tech/rust-lightning", # branch = "main" }
39-
# lightning-net-tokio = { git = "https://github.com/lexe-tech/rust-lightning", # branch = "main" }
40-
41-
# For debugging and testing patches during local development
42-
# lightning = { path = "../../ldk/lightning", features = ["max_level_trace"]}
43-
# lightning-block-sync = { path = "../../ldk/lightning-block-sync", features = [ "rpc-client" ] }
44-
# lightning-invoice = { path = "../../ldk/lightning-invoice" }
45-
# lightning-net-tokio = { path = "../../ldk/lightning-net-tokio" }
31+
lightning = { version = "0.0.113", features = ["max_level_trace"] }
32+
lightning-block-sync = { version = "0.0.113", features = [ "rpc-client" ] }
33+
lightning-invoice = { version = "0.21" }
34+
lightning-net-tokio = { version = "0.0.113" }
4635

4736
# --- GENERAL --- #
4837

0 commit comments

Comments
 (0)