Skip to content

Commit 1121181

Browse files
committed
multi: Update LDK to v0.0.111
1 parent cc2a0b6 commit 1121181

File tree

10 files changed

+133
-65
lines changed

10 files changed

+133
-65
lines changed

Cargo.lock

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

common/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ edition = "2021"
1313
[dependencies]
1414
# --- BITCOIN --- #
1515

16-
bitcoin = { version = "0.28.1", features = ["std", "use-serde"] }
16+
bitcoin = { version = "0.29", features = ["std", "serde"] }
1717
bitcoin-bech32 = "0.12"
1818
base64 = "0.13.0"
1919

2020
# --- LIGHTNING --- #
2121

22-
lightning = { version = "0.0.110", features = ["max_level_trace"] }
23-
# lightning-block-sync = { version = "0.0.110", features = [ "rpc-client" ] }
24-
lightning-invoice = { version = "0.18" }
25-
# lightning-net-tokio = { version = "0.0.110" }
22+
lightning = { version = "0.0.111", features = ["max_level_trace"] }
23+
# lightning-block-sync = { version = "0.0.111", features = [ "rpc-client" ] }
24+
lightning-invoice = { version = "0.19" }
25+
# lightning-net-tokio = { version = "0.0.111" }
2626

2727
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = ["max_level_trace"], branch = "main" }
2828
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", features = [ "rpc-client" ], branch = "main" }

common/src/root_seed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl RootSeed {
109109
.ckd_priv(&secp_ctx, child_number)
110110
.expect("should never fail")
111111
.private_key;
112-
KeyPair::from_secret_key(&secp_ctx, node_sk)
112+
KeyPair::from_secret_key(&secp_ctx, &node_sk)
113113
}
114114

115115
/// Derive the Lightning node pubkey.

lexe-ln/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ common = { path = "../common" }
1919

2020
# --- BITCOIN --- #
2121

22-
bitcoin = { version = "0.28.1", features = ["use-serde"] }
22+
bitcoin = { version = "0.29", features = ["serde"] }
2323
bitcoin-bech32 = "0.12"
2424
# bech32 = "0.8"
2525
base64 = "0.13.0"
2626

2727
# --- LIGHTNING --- #
2828

29-
lightning = { version = "0.0.110", features = ["max_level_trace"] }
30-
lightning-block-sync = { version = "0.0.110", features = [ "rpc-client" ] }
31-
lightning-invoice = { version = "0.18" }
32-
lightning-net-tokio = { version = "0.0.110" }
29+
lightning = { version = "0.0.111", features = ["max_level_trace"] }
30+
lightning-block-sync = { version = "0.0.111", features = [ "rpc-client" ] }
31+
lightning-invoice = { version = "0.19" }
32+
lightning-net-tokio = { version = "0.0.111" }
3333

3434
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = # ["max_level_trace"], branch = "main" }
3535
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", # features = [ "rpc-client" ], branch = "main" }

node/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ lexe-ln = { path = "../lexe-ln" }
2121

2222
# --- BITCOIN --- #
2323

24-
bitcoin = { version = "0.28.1", features = ["use-serde"] }
24+
bitcoin = { version = "0.29", features = ["serde"] }
2525
bitcoin-bech32 = "0.12"
2626
# bech32 = "0.8"
2727
base64 = "0.13.0"
2828

2929
# --- LIGHTNING --- #
3030

31-
lightning = { version = "0.0.110", features = ["max_level_trace"] }
32-
lightning-block-sync = { version = "0.0.110", features = [ "rpc-client" ] }
33-
lightning-invoice = { version = "0.18" }
34-
lightning-net-tokio = { version = "0.0.110" }
31+
lightning = { version = "0.0.111", features = ["max_level_trace"] }
32+
lightning-block-sync = { version = "0.0.111", features = [ "rpc-client" ] }
33+
lightning-invoice = { version = "0.19" }
34+
lightning-net-tokio = { version = "0.0.111" }
3535

3636
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = # ["max_level_trace"], branch = "main" }
3737
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", # features = [ "rpc-client" ], branch = "main" }
@@ -122,7 +122,7 @@ tokio = { version = "=1.15.0", default-features = false, features = [
122122

123123
[target.'cfg(not(target_env = "sgx"))'.dev-dependencies]
124124
# Run bitcoin regtest for tests
125-
bitcoind = { version = "0.26", features = [ "22_0" ] }
125+
bitcoind = { version = "0.27", features = [ "22_0" ] }
126126
# Enable all default features outside SGX for better test convenience
127127
proptest = "1"
128128

node/src/init.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use lightning::chain;
3030
use lightning::chain::chainmonitor::ChainMonitor;
3131
use lightning::chain::keysinterface::KeysInterface;
3232
use lightning::chain::transaction::OutPoint;
33+
use lightning::onion_message::OnionMessenger;
3334
use lightning::routing::gossip::P2PGossipSync;
3435
use lightning_invoice::payment;
3536
use lightning_invoice::utils::DefaultRouter;
@@ -225,12 +226,17 @@ impl UserNode {
225226
scorer_res.context("Could not read probabilistic scorer")?;
226227
let scorer = Arc::new(Mutex::new(scorer));
227228

229+
// Init onion messenger
230+
let onion_messenger =
231+
Arc::new(OnionMessenger::new(keys_manager.clone(), logger.clone()));
232+
228233
// Initialize PeerManager
229234
let peer_manager = NodePeerManager::init(
230235
rng,
231236
&keys_manager,
232237
channel_manager.clone(),
233238
gossip_sync.clone(),
239+
onion_messenger,
234240
logger.clone(),
235241
);
236242

node/src/lexe/channel_manager/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ const CHANNEL_HANDSHAKE_CONFIG: ChannelHandshakeConfig =
8080
// so that it is possible to sweep all funds to an address
8181
// specified at the time of channel close.
8282
commit_upfront_shutdown_pubkey: false,
83+
// The counterparty must reserve 1% of the total channel value to be
84+
// claimable by us on-chain in the case of a channel breach.
85+
their_channel_reserve_proportional_millionths: 10_000,
8386
};
8487

8588
const CHANNEL_HANDSHAKE_LIMITS: ChannelHandshakeLimits =

0 commit comments

Comments
 (0)